diff -pruN 22.3.0-1/AUTHORS.md 22.6.0-1/AUTHORS.md
--- 22.3.0-1/AUTHORS.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/AUTHORS.md	2022-06-28 00:33:35.000000000 +0000
@@ -148,6 +148,7 @@ Multiple contributions by:
 - [Rishikesh Jha](mailto:rishijha424@gmail.com)
 - [Rupert Bedford](mailto:rupert@rupertb.com)
 - Russell Davis
+- [Sagi Shadur](mailto:saroad2@gmail.com)
 - [Rémi Verschelde](mailto:rverschelde@gmail.com)
 - [Sami Salonen](mailto:sakki@iki.fi)
 - [Samuel Cormier-Iijima](mailto:samuel@cormier-iijima.com)
diff -pruN 22.3.0-1/autoload/black.vim 22.6.0-1/autoload/black.vim
--- 22.3.0-1/autoload/black.vim	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/autoload/black.vim	2022-06-28 00:33:35.000000000 +0000
@@ -5,9 +5,9 @@ import sys
 import vim
 
 def strtobool(text):
-  if text.lower() in ['y', 'yes', 't', 'true' 'on', '1']:
+  if text.lower() in ['y', 'yes', 't', 'true', 'on', '1']:
     return True
-  if text.lower() in ['n', 'no', 'f', 'false' 'off', '0']:
+  if text.lower() in ['n', 'no', 'f', 'false', 'off', '0']:
     return False
   raise ValueError(f"{text} is not convertable to boolean")
 
diff -pruN 22.3.0-1/CHANGES.md 22.6.0-1/CHANGES.md
--- 22.3.0-1/CHANGES.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/CHANGES.md	2022-06-28 00:33:35.000000000 +0000
@@ -47,6 +47,46 @@
 
 <!-- Changes that improve Black's performance. -->
 
+## 22.6.0
+
+### Style
+
+- Fix unstable formatting involving `#fmt: skip` and `# fmt:skip` comments (notice the
+  lack of spaces) (#2970)
+
+### Preview style
+
+- Docstring quotes are no longer moved if it would violate the line length limit (#3044)
+- Parentheses around return annotations are now managed (#2990)
+- Remove unnecessary parentheses around awaited objects (#2991)
+- Remove unnecessary parentheses in `with` statements (#2926)
+- Remove trailing newlines after code block open (#3035)
+
+### Integrations
+
+- Add `scripts/migrate-black.py` script to ease introduction of Black to a Git project
+  (#3038)
+
+### Output
+
+- Output Python version and implementation as part of `--version` flag (#2997)
+
+### Packaging
+
+- Use `tomli` instead of `tomllib` on Python 3.11 builds where `tomllib` is not
+  available (#2987)
+
+### Parser
+
+- [PEP 654](https://peps.python.org/pep-0654/#except) syntax (for example,
+  `except *ExceptionGroup:`) is now supported (#3016)
+- [PEP 646](https://peps.python.org/pep-0646) syntax (for example,
+  `Array[Batch, *Shape]` or `def fn(*args: *T) -> None`) is now supported (#3071)
+
+### Vim Plugin
+
+- Fix `strtobool` function. It didn't parse true/on/false/off. (#3025)
+
 ## 22.3.0
 
 ### Preview style
diff -pruN 22.3.0-1/debian/black.manpages 22.6.0-1/debian/black.manpages
--- 22.3.0-1/debian/black.manpages	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/debian/black.manpages	2022-07-30 20:56:09.000000000 +0000
@@ -0,0 +1,2 @@
+debian/black.1
+debian/black-primer.1
diff -pruN 22.3.0-1/debian/changelog 22.6.0-1/debian/changelog
--- 22.3.0-1/debian/changelog	2022-04-05 07:28:05.000000000 +0000
+++ 22.6.0-1/debian/changelog	2022-07-30 21:05:32.000000000 +0000
@@ -1,3 +1,12 @@
+black (22.6.0-1) unstable; urgency=medium
+
+  * Team upload.
+  * Modernize and simplify packaging
+  * New upstream version 22.6.0
+  * Bump Standards-Version to 4.6.1
+
+ -- Timo Röhling <roehling@debian.org>  Sat, 30 Jul 2022 23:05:32 +0200
+
 black (22.3.0-1) unstable; urgency=medium
 
   * New upstream release
diff -pruN 22.3.0-1/debian/clean 22.6.0-1/debian/clean
--- 22.3.0-1/debian/clean	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/debian/clean	2022-07-30 20:56:09.000000000 +0000
@@ -0,0 +1,6 @@
+debian/black.1
+debian/black-primer.1
+docs/_build/
+docs/_static/pypi.svg
+src/_black_version.py
+src/black.egg-info/
diff -pruN 22.3.0-1/debian/control 22.6.0-1/debian/control
--- 22.3.0-1/debian/control	2022-04-05 07:28:05.000000000 +0000
+++ 22.6.0-1/debian/control	2022-07-30 21:05:25.000000000 +0000
@@ -8,25 +8,28 @@ Priority: optional
 Build-Depends:
  debhelper-compat (= 13),
  dh-python,
- python3-all:any,
- python3-setuptools,
- python3-platformdirs,
+ dh-sequence-python3,
+ dh-sequence-sphinxdoc <!nodoc>,
+ libjs-jquery <!nodoc>,
+ libjs-underscore <!nodoc>,
+ pybuild-plugin-pyproject,
+ python3-aiohttp <!nocheck>,
+ python3-all,
  python3-click,
- python3-sphinx (>= 3.2),
- python3-docutils,
- python3-pytest,
+ python3-mypy-extensions,
  python3-pathspec,
+ python3-platformdirs,
+ python3-pytest <!nocheck>,
  python3-regex,
- python3-typed-ast,
- python3-aiohttp,
+ python3-setuptools,
+ python3-setuptools-scm,
+ python3-sphinx (>= 3.2) <!nodoc>,
+ python3-sphinx-copybutton (>= 0.4.0-2) <!nodoc>,
+ python3-sphinxcontrib.programoutput <!nodoc>,
  python3-tomli,
- python3-mypy-extensions,
+ python3-typed-ast,
  python3-typing-extensions,
- libjs-underscore,
- libjs-jquery,
- python3-sphinxcontrib.programoutput,
- python3-sphinx-copybutton (>= 0.4.0-2),
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Vcs-Browser: https://salsa.debian.org/python-team/packages/black
 Vcs-Git: https://salsa.debian.org/python-team/packages/black.git
 Homepage: https://github.com/psf/black
diff -pruN 22.3.0-1/debian/copyright 22.6.0-1/debian/copyright
--- 22.3.0-1/debian/copyright	2022-04-05 07:28:05.000000000 +0000
+++ 22.6.0-1/debian/copyright	2022-07-30 21:02:39.000000000 +0000
@@ -3,7 +3,7 @@ Upstream-Name: black
 Source: https://github.com/psf/black
 
 Files: *
-Copyright: 2018 Łukasz Langa
+Copyright: 2018-2022, Łukasz Langa
     Anthony Sottile <asottile@umich.edu>
     Carol Willing <carolcode@willingconsulting.com>
     Carl Meyer <carl@oddbird.net>
@@ -30,7 +30,7 @@ Copyright: 2018 Łukasz Langa
 License: Expat
 
 Files: debian/*
-Copyright: 2018, 2021 Neil Williams <codehelp@debian.org>
+Copyright: 2018-2021, Neil Williams <codehelp@debian.org>
 License: Expat
 
 License: Expat
diff -pruN 22.3.0-1/debian/patches/black_version.patch 22.6.0-1/debian/patches/black_version.patch
--- 22.3.0-1/debian/patches/black_version.patch	2022-04-05 07:27:08.000000000 +0000
+++ 22.6.0-1/debian/patches/black_version.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
---- black.orig/setup.cfg
-+++ black/setup.cfg
-@@ -1,3 +1 @@
- [options]
--setup_requires =
--  setuptools_scm[toml]>=6.3.1
---- black.orig/setup.py
-+++ black/setup.py
-@@ -47,10 +47,7 @@ else:
- 
- setup(
-     name="black",
--    use_scm_version={
--        "write_to": "src/_black_version.py",
--        "write_to_template": 'version = "{version}"\n',
--    },
-+    version="21.10b0",
-     description="The uncompromising code formatter.",
-     long_description=get_long_description(),
-     long_description_content_type="text/markdown",
diff -pruN 22.3.0-1/debian/patches/dh_python_version_number_workaround.patch 22.6.0-1/debian/patches/dh_python_version_number_workaround.patch
--- 22.3.0-1/debian/patches/dh_python_version_number_workaround.patch	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/debian/patches/dh_python_version_number_workaround.patch	2022-07-30 21:03:21.000000000 +0000
@@ -0,0 +1,21 @@
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Sat, 30 Jul 2022 23:02:36 +0200
+Subject: Work around dh-python version number parsing bug
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 522a42a..e23a58c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -98,7 +98,7 @@ setup(
+     install_requires=[
+         "click>=8.0.0",
+         "platformdirs>=2",
+-        "tomli>=1.1.0; python_full_version < '3.11.0a7'",
++        "tomli>=1.1.0; python_version < '3.11'",
+         "typed-ast>=1.4.2; python_version < '3.8' and implementation_name == 'cpython'",
+         "pathspec>=0.9.0",
+         "dataclasses>=0.6; python_version < '3.7'",
diff -pruN 22.3.0-1/debian/patches/disable-furo-theme.diff 22.6.0-1/debian/patches/disable-furo-theme.diff
--- 22.3.0-1/debian/patches/disable-furo-theme.diff	2022-04-05 07:27:08.000000000 +0000
+++ 22.6.0-1/debian/patches/disable-furo-theme.diff	2022-07-30 21:02:39.000000000 +0000
@@ -1,8 +1,17 @@
-Index: black2/docs/conf.py
+From: Debian Python Team <team+python@tracker.debian.org>
+Date: Sat, 30 Jul 2022 22:19:43 +0200
+Subject: disable-furo-theme
+
 ===================================================================
---- black2.orig/docs/conf.py
-+++ black2/docs/conf.py
-@@ -117,7 +117,7 @@ pygments_style = "sphinx"
+---
+ docs/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/docs/conf.py b/docs/conf.py
+index 2cb3b5a..8cdd372 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -121,7 +121,7 @@ pygments_style = "sphinx"
  # The theme to use for HTML and HTML Help pages.  See the documentation for
  # a list of builtin themes.
  #
diff -pruN 22.3.0-1/debian/patches/disable_myst_parser.patch 22.6.0-1/debian/patches/disable_myst_parser.patch
--- 22.3.0-1/debian/patches/disable_myst_parser.patch	2022-04-05 07:27:08.000000000 +0000
+++ 22.6.0-1/debian/patches/disable_myst_parser.patch	2022-07-30 21:02:39.000000000 +0000
@@ -1,12 +1,19 @@
+From: Debian Python Team <team+python@tracker.debian.org>
+Date: Sat, 30 Jul 2022 22:19:43 +0200
+Subject: disable_myst_parser
+
 Remove privacy-breach links and self-host docs
 
 Remove tracking URLs from the README and sidebar of pages
 in the documentation.
+---
+ docs/conf.py | 24 +++++++++++++-----------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
 
-Index: black2/docs/conf.py
-===================================================================
---- black2.orig/docs/conf.py
-+++ black2/docs/conf.py
+diff --git a/docs/conf.py b/docs/conf.py
+index 8da9c39..2cb3b5a 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
 @@ -19,6 +19,8 @@ from pathlib import Path
  
  from pkg_resources import get_distribution
@@ -16,7 +23,7 @@ Index: black2/docs/conf.py
  CURRENT_DIR = Path(__file__).parent
  
  
-@@ -43,7 +45,7 @@ author = "Łukasz Langa and contributors
+@@ -43,7 +45,7 @@ author = "Łukasz Langa and contributors to Black"
  
  # Autopopulate version
  # The version, including alpha/beta/rc tags, but not commit hash and datestamps
@@ -41,7 +48,7 @@ Index: black2/docs/conf.py
  
  # Add any paths that contain templates here, relative to this directory.
  templates_path = ["_templates"]
-@@ -100,15 +102,15 @@ pygments_style = "sphinx"
+@@ -100,19 +102,19 @@ pygments_style = "sphinx"
  
  # We need headers to be linkable to so ask MyST-Parser to autogenerate anchor IDs for
  # headers up to and including level 3.
@@ -51,45 +58,21 @@ Index: black2/docs/conf.py
  # Prettier support formatting some MyST syntax but not all, so let's disable the
  # unsupported yet still enabled by default ones.
 -myst_disable_syntax = [
+-    "colon_fence",
 -    "myst_block_break",
 -    "myst_line_comment",
 -    "math_block",
 -]
-+# myst_disable_syntax = [
++#myst_disable_syntax = [
++#    "colon_fence",
 +#    "myst_block_break",
 +#    "myst_line_comment",
 +#    "math_block",
 +#]
  
- # -- Options for HTML output -------------------------------------------------
+ # Optional MyST Syntaxes
+-myst_enable_extensions = []
++#myst_enable_extensions = []
  
-Index: black2/docs/index.rst
-===================================================================
---- black2.orig/docs/index.rst
-+++ black2/docs/index.rst
-@@ -68,12 +68,7 @@ and `pipenv <https://docs.pipenv.org/>`_
- Show your style
- ---------------
- 
--Use the badge in your project's README.md:
--
--.. code-block:: md
--
--   [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
--
-+Use the badge in your project's README.md.
- 
- Using the badge in README.rst:
- 
-@@ -82,11 +77,6 @@ Using the badge in README.rst:
-    .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
-       :target: https://github.com/psf/black
- 
--Looks like this:
--
--.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
--   :target: https://github.com/psf/black
--
- Contents
- --------
+ # -- Options for HTML output -------------------------------------------------
  
diff -pruN 22.3.0-1/debian/patches/series 22.6.0-1/debian/patches/series
--- 22.3.0-1/debian/patches/series	2022-04-05 07:28:05.000000000 +0000
+++ 22.6.0-1/debian/patches/series	2022-07-30 21:03:21.000000000 +0000
@@ -1,3 +1,3 @@
-black_version.patch
 disable_myst_parser.patch
 disable-furo-theme.diff
+dh_python_version_number_workaround.patch
diff -pruN 22.3.0-1/debian/rules 22.6.0-1/debian/rules
--- 22.3.0-1/debian/rules	2022-04-05 07:27:08.000000000 +0000
+++ 22.6.0-1/debian/rules	2022-07-30 20:56:09.000000000 +0000
@@ -1,47 +1,27 @@
 #!/usr/bin/make -f
 
-#export DH_VERBOSE = 1
-
 include /usr/share/dpkg/pkg-info.mk
 
 export BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d @"$(SOURCE_DATE_EPOCH)")
+export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
+export PYBUILD_DESTDIR=debian/black/
 
-# Prevent setuptools/distribute from accessing the internet.
-export http_proxy = http://127.0.9.1:9
+%:
+	dh $@ --buildsystem=pybuild
 
-export PYBUILD_NAME=black
+execute_after_dh_auto_build:
+	make -C docs/ html PYTHONPATH="..:../src/" SPHINXBUILD="/usr/share/sphinx/scripts/python3/sphinx-build" SPHINXOPTS="-j 4 -D today=\"$(BUILD_DATE)\""
 
-%:
-	echo "version = '$(DEB_VERSION_UPSTREAM)'" > _black_version.py
-	mkdir -p src
-	cp _black_version.py src/
-	dh $@ --with sphinxdoc,python3 --buildsystem=pybuild
-
-override_dh_auto_build:
-	python3 setup.py build
-	PYTHONPATH="..:../src/" make -C docs/ html SPHINXBUILD="/usr/share/sphinx/scripts/python3/sphinx-build" SPHINXOPTS="-j 4 -D today=\"$(BUILD_DATE)\""
-	${RM} ./build/lib/blackd.py
+execute_after_dh_auto_install:
+	rm debian/black/usr/bin/blackd
 
-override_dh_auto_install:
-	python3 setup.py install --root=$(CURDIR)/debian/black/ --install-layout=deb
+execute_before_dh_installman:
 	rst2man debian/manpage.rst > debian/black.1
-	dh_installman debian/black.1
 	rst2man debian/manpage2.rst > debian/black-primer.1
-	dh_installman debian/black-primer.1
-	${RM} ./docs/_build/html/objects.inv
-	${RM} ./debian/black/usr/bin/blackd
 
 override_dh_auto_test:
-	# Ensure we have entry_points created
-	python3 setup.py develop --prefix=$(CURDIR)/testtmp
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	PATH=testtmp/bin:${PATH} PYTHONPATH=src pytest-3 tests --run-optional no_jupyter
+	python3 setup.py develop --prefix=$(CURDIR)/.pybuild/test-prefix
+	PATH=.pybuild/test-prefix/bin:${PATH} PYTHONPATH=src pytest-3 tests --run-optional no_jupyter
 endif
-	${RM} -rf testtmp
 
-override_dh_auto_clean:
-	python3 setup.py clean -a
-	${RM} -r debian/black docs/_build/ docs/_static/pypi.svg
-	${RM} -r __pycache__ ./blib2to3/pgen2/__pycache__ ./blib2to3/__pycache__
-	${RM} -r tests/__pycache__ _black_version.py src/_black_version.py
-	find docs/ -type l -delete
diff -pruN 22.3.0-1/debian/source/options 22.6.0-1/debian/source/options
--- 22.3.0-1/debian/source/options	2022-04-05 07:28:05.000000000 +0000
+++ 22.6.0-1/debian/source/options	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-extend-diff-ignore = "^[^/]*[.]egg-info/"
diff -pruN 22.3.0-1/docs/conf.py 22.6.0-1/docs/conf.py
--- 22.3.0-1/docs/conf.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/conf.py	2022-06-28 00:33:35.000000000 +0000
@@ -87,7 +87,7 @@ master_doc = "index"
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = None
+language = "en"
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
@@ -105,11 +105,15 @@ myst_heading_anchors = 3
 # Prettier support formatting some MyST syntax but not all, so let's disable the
 # unsupported yet still enabled by default ones.
 myst_disable_syntax = [
+    "colon_fence",
     "myst_block_break",
     "myst_line_comment",
     "math_block",
 ]
 
+# Optional MyST Syntaxes
+myst_enable_extensions = []
+
 # -- Options for HTML output -------------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
diff -pruN 22.3.0-1/docs/contributing/index.md 22.6.0-1/docs/contributing/index.md
--- 22.3.0-1/docs/contributing/index.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/contributing/index.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,49 @@
+# Contributing
+
+```{toctree}
+---
+hidden:
+---
+
+the_basics
+gauging_changes
+issue_triage
+release_process
+reference/reference_summary
+```
+
+Welcome! Happy to see you willing to make the project better. Have you read the entire
+[user documentation](https://black.readthedocs.io/en/latest/) yet?
+
+```{rubric} Bird's eye view
+
+```
+
+In terms of inspiration, _Black_ is about as configurable as _gofmt_ (which is to say,
+not very). This is deliberate. _Black_ aims to provide a consistent style and take away
+opportunities for arguing about style.
+
+Bug reports and fixes are always welcome! Please follow the
+[issue template on GitHub](https://github.com/psf/black/issues/new) for best results.
+
+Before you suggest a new feature or configuration knob, ask yourself why you want it. If
+it enables better integration with some workflow, fixes an inconsistency, speeds things
+up, and so on - go for it! On the other hand, if your answer is "because I don't like a
+particular formatting" then you're not ready to embrace _Black_ yet. Such changes are
+unlikely to get accepted. You can still try but prepare to be disappointed.
+
+```{rubric} Contents
+
+```
+
+This section covers the following topics:
+
+- {doc}`the_basics`
+- {doc}`gauging_changes`
+- {doc}`release_process`
+- {doc}`reference/reference_summary`
+
+For an overview on contributing to the _Black_, please checkout {doc}`the_basics`.
+
+If you need a reference of the functions, classes, etc. available to you while
+developing _Black_, there's the {doc}`reference/reference_summary` docs.
diff -pruN 22.3.0-1/docs/contributing/index.rst 22.6.0-1/docs/contributing/index.rst
--- 22.3.0-1/docs/contributing/index.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/contributing/index.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,43 +0,0 @@
-Contributing
-============
-
-.. toctree::
-  :hidden:
-
-  the_basics
-  gauging_changes
-  issue_triage
-  release_process
-  reference/reference_summary
-
-Welcome! Happy to see you willing to make the project better. Have you read the entire
-`user documentation <https://black.readthedocs.io/en/latest/>`_ yet?
-
-.. rubric:: Bird's eye view
-
-In terms of inspiration, *Black* is about as configurable as *gofmt* (which is to say,
-not very). This is deliberate. *Black* aims to provide a consistent style and take away
-opportunities for arguing about style.
-
-Bug reports and fixes are always welcome! Please follow the
-`issue template on GitHub <https://github.com/psf/black/issues/new>`_ for best results.
-
-Before you suggest a new feature or configuration knob, ask yourself why you want it. If
-it enables better integration with some workflow, fixes an inconsistency, speeds things
-up, and so on - go for it! On the other hand, if your answer is "because I don't like a
-particular formatting" then you're not ready to embrace *Black* yet. Such changes are
-unlikely to get accepted. You can still try but prepare to be disappointed.
-
-.. rubric:: Contents
-
-This section covers the following topics:
-
-- :doc:`the_basics`
-- :doc:`gauging_changes`
-- :doc:`release_process`
-- :doc:`reference/reference_summary`
-
-For an overview on contributing to the *Black*, please checkout :doc:`the_basics`.
-
-If you need a reference of the functions, classes, etc. available to you while
-developing *Black*, there's the :doc:`reference/reference_summary` docs.
diff -pruN 22.3.0-1/docs/faq.md 22.6.0-1/docs/faq.md
--- 22.3.0-1/docs/faq.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/faq.md	2022-06-28 00:33:35.000000000 +0000
@@ -57,7 +57,8 @@ _Black_ is timid about formatting Jupyte
 following will not be formatted:
 
 - automagics (e.g. `pip install black`)
-- non-Python cell magics (e.g. `%%writeline`)
+- non-Python cell magics (e.g. `%%writeline`). These can be added with the flag
+  `--python-cell-magics`, e.g. `black --python-cell-magics writeline hello.ipynb`.
 - multiline magics, e.g.:
 
   ```python
@@ -112,3 +113,22 @@ _Black_ is an autoformatter, not a Pytho
 errors is not a goal. It can format all code accepted by CPython (if you find an example
 where that doesn't hold, please report a bug!), but it may also format some code that
 CPython doesn't accept.
+
+## What is `compiled: yes/no` all about in the version output?
+
+While _Black_ is indeed a pure Python project, we use [mypyc] to compile _Black_ into a
+C Python extension, usually doubling performance. These compiled wheels are available
+for 64-bit versions of Windows, Linux (via the manylinux standard), and macOS across all
+supported CPython versions.
+
+Platforms including musl-based and/or ARM Linux distributions, and ARM Windows are
+currently **not** supported. These platforms will fall back to the slower pure Python
+wheel available on PyPI.
+
+If you are experiencing exceptionally weird issues or even segfaults, you can try
+passing `--no-binary black` to your pip install invocation. This flag excludes all
+wheels (including the pure Python wheel), so this command will use the [sdist].
+
+[mypyc]: https://mypyc.readthedocs.io/en/latest/
+[sdist]:
+  https://packaging.python.org/en/latest/glossary/#term-Source-Distribution-or-sdist
diff -pruN 22.3.0-1/docs/getting_started.md 22.6.0-1/docs/getting_started.md
--- 22.3.0-1/docs/getting_started.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/getting_started.md	2022-06-28 00:33:35.000000000 +0000
@@ -17,7 +17,8 @@ Also, you can try out _Black_ online for
 ## Installation
 
 _Black_ can be installed by running `pip install black`. It requires Python 3.6.2+ to
-run. If you want to format Jupyter Notebooks, install with `pip install black[jupyter]`.
+run. If you want to format Jupyter Notebooks, install with
+`pip install 'black[jupyter]'`.
 
 If you can't wait for the latest _hotness_ and want to install from GitHub, use:
 
diff -pruN 22.3.0-1/docs/guides/index.md 22.6.0-1/docs/guides/index.md
--- 22.3.0-1/docs/guides/index.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/guides/index.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,16 @@
+# Guides
+
+```{toctree}
+---
+hidden:
+---
+
+introducing_black_to_your_project
+using_black_with_other_tools
+```
+
+Wondering how to do something specific? You've found the right place! Listed below are
+topic specific guides available:
+
+- {doc}`introducing_black_to_your_project`
+- {doc}`using_black_with_other_tools`
diff -pruN 22.3.0-1/docs/guides/index.rst 22.6.0-1/docs/guides/index.rst
--- 22.3.0-1/docs/guides/index.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/guides/index.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-Guides
-======
-
-.. toctree::
-  :hidden:
-
-  introducing_black_to_your_project
-  using_black_with_other_tools
-
-Wondering how to do something specific? You've found the right place! Listed below
-are topic specific guides available:
-
-- :doc:`introducing_black_to_your_project`
-- :doc:`using_black_with_other_tools`
diff -pruN 22.3.0-1/docs/index.md 22.6.0-1/docs/index.md
--- 22.3.0-1/docs/index.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/index.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,139 @@
+<!--
+black documentation master file, created by
+sphinx-quickstart on Fri Mar 23 10:53:30 2018.
+-->
+
+# The uncompromising code formatter
+
+> “Any color you like.”
+
+By using _Black_, you agree to cede control over minutiae of hand-formatting. In return,
+_Black_ gives you speed, determinism, and freedom from `pycodestyle` nagging about
+formatting. You will save time and mental energy for more important matters.
+
+_Black_ makes code review faster by producing the smallest diffs possible. Blackened
+code looks the same regardless of the project you're reading. Formatting becomes
+transparent after a while and you can focus on the content instead.
+
+Try it out now using the [Black Playground](https://black.vercel.app).
+
+```{admonition} Note - Black is now stable!
+*Black* is [successfully used](https://github.com/psf/black#used-by) by
+many projects, small and big. *Black* has a comprehensive test suite, with efficient
+parallel tests, our own auto formatting and parallel Continuous Integration runner.
+Now that we have become stable, you should not expect large formatting to changes in
+the future. Stylistic changes will mostly be responses to bug reports and support for new Python
+syntax.
+
+Also, as a safety measure which slows down processing, *Black* will check that the
+reformatted code still produces a valid AST that is effectively equivalent to the
+original (see the
+[Pragmatism](./the_black_code_style/current_style.md#pragmatism)
+section for details). If you're feeling confident, use `--fast`.
+```
+
+```{note}
+{doc}`Black is licensed under the MIT license <license>`.
+```
+
+## Testimonials
+
+**Mike Bayer**, author of [SQLAlchemy](https://www.sqlalchemy.org/):
+
+> _I can't think of any single tool in my entire programming career that has given me a
+> bigger productivity increase by its introduction. I can now do refactorings in about
+> 1% of the keystrokes that it would have taken me previously when we had no way for
+> code to format itself._
+
+**Dusty Phillips**,
+[writer](https://smile.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=dusty+phillips):
+
+> _Black is opinionated so you don't have to be._
+
+**Hynek Schlawack**, creator of [attrs](https://www.attrs.org/), core developer of
+Twisted and CPython:
+
+> _An auto-formatter that doesn't suck is all I want for Xmas!_
+
+**Carl Meyer**, [Django](https://www.djangoproject.com/) core developer:
+
+> _At least the name is good._
+
+**Kenneth Reitz**, creator of [requests](http://python-requests.org/) and
+[pipenv](https://docs.pipenv.org/):
+
+> _This vastly improves the formatting of our code. Thanks a ton!_
+
+## Show your style
+
+Use the badge in your project's README.md:
+
+```md
+[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
+```
+
+Using the badge in README.rst:
+
+```rst
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+   :target: https://github.com/psf/black
+```
+
+Looks like this:
+
+```{image} https://img.shields.io/badge/code%20style-black-000000.svg
+:target: https://github.com/psf/black
+```
+
+## Contents
+
+```{toctree}
+---
+maxdepth: 3
+includehidden:
+---
+
+the_black_code_style/index
+```
+
+```{toctree}
+---
+maxdepth: 3
+includehidden:
+caption: User Guide
+---
+
+getting_started
+usage_and_configuration/index
+integrations/index
+guides/index
+faq
+```
+
+```{toctree}
+---
+maxdepth: 2
+includehidden:
+caption: Development
+---
+
+contributing/index
+change_log
+authors
+```
+
+```{toctree}
+---
+hidden:
+caption: Project Links
+---
+
+GitHub <https://github.com/psf/black>
+PyPI <https://pypi.org/project/black>
+Chat <https://discord.gg/RtVdv86PrH>
+```
+
+# Indices and tables
+
+- {ref}`genindex`
+- {ref}`search`
diff -pruN 22.3.0-1/docs/index.rst 22.6.0-1/docs/index.rst
--- 22.3.0-1/docs/index.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/index.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,131 +0,0 @@
-.. black documentation master file, created by
-   sphinx-quickstart on Fri Mar 23 10:53:30 2018.
-
-The uncompromising code formatter
-=================================
-
-    “Any color you like.”
-
-By using *Black*, you agree to cede control over minutiae of
-hand-formatting. In return, *Black* gives you speed, determinism, and
-freedom from `pycodestyle` nagging about formatting. You will save time
-and mental energy for more important matters.
-
-*Black* makes code review faster by producing the smallest diffs
-possible. Blackened code looks the same regardless of the project
-you're reading. Formatting becomes transparent after a while and you
-can focus on the content instead.
-
-Try it out now using the `Black Playground <https://black.vercel.app>`_.
-
-.. admonition:: Note - Black is now stable!
-
-   *Black* is `successfully used <https://github.com/psf/black#used-by>`_ by
-   many projects, small and big. *Black* has a comprehensive test suite, with efficient
-   parallel tests, our own auto formatting and parallel Continuous Integration runner.
-   Now that we have become stable, you should not expect large formatting to changes in
-   the future. Stylistic changes will mostly be responses to bug reports and support for new Python
-   syntax.
-
-   Also, as a safety measure which slows down processing, *Black* will check that the
-   reformatted code still produces a valid AST that is effectively equivalent to the
-   original (see the
-   `Pragmatism <./the_black_code_style/current_style.html#pragmatism>`_
-   section for details). If you're feeling confident, use ``--fast``.
-
-.. note::
-   :doc:`Black is licensed under the MIT license <license>`.
-
-Testimonials
-------------
-
-**Mike Bayer**, author of `SQLAlchemy <https://www.sqlalchemy.org/>`_:
-
-   *I can't think of any single tool in my entire programming career that has given me a
-   bigger productivity increase by its introduction. I can now do refactorings in about
-   1% of the keystrokes that it would have taken me previously when we had no way for
-   code to format itself.*
-
-**Dusty Phillips**, `writer <https://smile.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=dusty+phillips>`_:
-
-   *Black is opinionated so you don't have to be.*
-
-**Hynek Schlawack**, creator of `attrs <https://www.attrs.org/>`_, core
-developer of Twisted and CPython:
-
-   *An auto-formatter that doesn't suck is all I want for Xmas!*
-
-**Carl Meyer**, `Django <https://www.djangoproject.com/>`_ core developer:
-
-   *At least the name is good.*
-
-**Kenneth Reitz**, creator of `requests <http://python-requests.org/>`_
-and `pipenv <https://docs.pipenv.org/>`_:
-
-   *This vastly improves the formatting of our code. Thanks a ton!*
-
-
-Show your style
----------------
-
-Use the badge in your project's README.md:
-
-.. code-block:: md
-
-   [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
-
-
-Using the badge in README.rst:
-
-.. code-block:: rst
-
-   .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
-      :target: https://github.com/psf/black
-
-Looks like this:
-
-.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
-   :target: https://github.com/psf/black
-
-Contents
---------
-
-.. toctree::
-   :maxdepth: 3
-   :includehidden:
-
-   the_black_code_style/index
-
-.. toctree::
-   :maxdepth: 3
-   :includehidden:
-   :caption: User Guide
-
-   getting_started
-   usage_and_configuration/index
-   integrations/index
-   guides/index
-   faq
-
-.. toctree::
-   :maxdepth: 2
-   :includehidden:
-   :caption: Development
-
-   contributing/index
-   change_log
-   authors
-
-.. toctree::
-   :hidden:
-   :caption: Project Links
-
-   GitHub <https://github.com/psf/black>
-   PyPI <https://pypi.org/project/black>
-   Chat <https://discord.gg/RtVdv86PrH>
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`search`
diff -pruN 22.3.0-1/docs/integrations/editors.md 22.6.0-1/docs/integrations/editors.md
--- 22.3.0-1/docs/integrations/editors.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/integrations/editors.md	2022-06-28 00:33:35.000000000 +0000
@@ -301,9 +301,15 @@ close and reopen your File, _Black_ will
 
 ## Visual Studio Code
 
-Use the
-[Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
-([instructions](https://code.visualstudio.com/docs/python/editing#_formatting)).
+- Use the
+  [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
+  ([instructions](https://code.visualstudio.com/docs/python/editing#_formatting)).
+
+- Alternatively the pre-release
+  [Black Formatter](https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter)
+  extension can be used which runs a [Language Server Protocol](https://langserver.org/)
+  server for Black. Formatting is much more responsive using this extension, **but the
+  minimum supported version of Black is 22.3.0**.
 
 ## SublimeText 3
 
diff -pruN 22.3.0-1/docs/integrations/index.md 22.6.0-1/docs/integrations/index.md
--- 22.3.0-1/docs/integrations/index.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/integrations/index.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,31 @@
+# Integrations
+
+```{toctree}
+---
+hidden:
+---
+
+editors
+github_actions
+source_version_control
+```
+
+_Black_ can be integrated into many environments, providing a better and smoother
+experience. Documentation for integrating _Black_ with a tool can be found for the
+following areas:
+
+- {doc}`Editor / IDE <./editors>`
+- {doc}`GitHub Actions <./github_actions>`
+- {doc}`Source version control <./source_version_control>`
+
+Editors and tools not listed will require external contributions.
+
+Patches welcome! ✨ 🍰 ✨
+
+Any tool can pipe code through _Black_ using its stdio mode (just
+[use `-` as the file name](https://www.tldp.org/LDP/abs/html/special-chars.html#DASHREF2)).
+The formatted code will be returned on stdout (unless `--check` was passed). _Black_
+will still emit messages on stderr but that shouldn't affect your use case.
+
+This can be used for example with PyCharm's or IntelliJ's
+[File Watchers](https://www.jetbrains.com/help/pycharm/file-watchers.html).
diff -pruN 22.3.0-1/docs/integrations/index.rst 22.6.0-1/docs/integrations/index.rst
--- 22.3.0-1/docs/integrations/index.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/integrations/index.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,28 +0,0 @@
-Integrations
-============
-
-.. toctree::
-    :hidden:
-
-    editors
-    github_actions
-    source_version_control
-
-*Black* can be integrated into many environments, providing a better and smoother experience. Documentation for integrating *Black* with a tool can be found for the
-following areas:
-
-- :doc:`Editor / IDE <./editors>`
-- :doc:`GitHub Actions <./github_actions>`
-- :doc:`Source version control <./source_version_control>`
-
-Editors and tools not listed will require external contributions.
-
-Patches welcome! ✨ 🍰 ✨
-
-Any tool can pipe code through *Black* using its stdio mode (just
-`use \`-\` as the file name <https://www.tldp.org/LDP/abs/html/special-chars.html#DASHREF2>`_).
-The formatted code will be returned on stdout (unless ``--check`` was passed). *Black*
-will still emit messages on stderr but that shouldn't affect your use case.
-
-This can be used for example with PyCharm's or IntelliJ's
-`File Watchers <https://www.jetbrains.com/help/pycharm/file-watchers.html>`_.
diff -pruN 22.3.0-1/docs/integrations/source_version_control.md 22.6.0-1/docs/integrations/source_version_control.md
--- 22.3.0-1/docs/integrations/source_version_control.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/integrations/source_version_control.md	2022-06-28 00:33:35.000000000 +0000
@@ -7,7 +7,7 @@ Use [pre-commit](https://pre-commit.com/
 ```yaml
 repos:
   - repo: https://github.com/psf/black
-    rev: 22.3.0
+    rev: 22.6.0
     hooks:
       - id: black
         # It is recommended to specify the latest version of Python
@@ -23,8 +23,11 @@ branches or other mutable refs since the
 expect][pre-commit-mutable-rev].
 
 If you want support for Jupyter Notebooks as well, then replace `id: black` with
-`id: black-jupyter` (though note that it's only available from version `21.8b0`
-onwards).
+`id: black-jupyter`.
+
+```{note}
+The `black-jupyter` hook is only available from version 21.8b0 and onwards.
+```
 
 [black-tags]: https://github.com/psf/black/tags
 [pre-commit-mutable-rev]:
diff -pruN 22.3.0-1/docs/license.md 22.6.0-1/docs/license.md
--- 22.3.0-1/docs/license.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/license.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,9 @@
+---
+orphan: true
+---
+
+# License
+
+```{include} ../LICENSE
+
+```
diff -pruN 22.3.0-1/docs/license.rst 22.6.0-1/docs/license.rst
--- 22.3.0-1/docs/license.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/license.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-:orphan:
-
-License
-=======
-
-.. include:: ../LICENSE
diff -pruN 22.3.0-1/docs/requirements.txt 22.6.0-1/docs/requirements.txt
--- 22.3.0-1/docs/requirements.txt	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/requirements.txt	2022-06-28 00:33:35.000000000 +0000
@@ -1,7 +1,9 @@
 # Used by ReadTheDocs; pinned requirements for stability.
 
-myst-parser==0.16.1
-Sphinx==4.5.0
+myst-parser==0.18.0
+Sphinx==5.0.2
+# Older versions break Sphinx even though they're declared to be supported.
+docutils==0.18.1
 sphinxcontrib-programoutput==0.17
 sphinx_copybutton==0.5.0
-furo==2022.3.4
+furo==2022.6.21
diff -pruN 22.3.0-1/docs/the_black_code_style/current_style.md 22.6.0-1/docs/the_black_code_style/current_style.md
--- 22.3.0-1/docs/the_black_code_style/current_style.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/the_black_code_style/current_style.md	2022-06-28 00:33:35.000000000 +0000
@@ -8,9 +8,10 @@ deliberately limited and rarely added. P
 little as possible, with rare exceptions like the magic trailing comma. The coding style
 used by _Black_ can be viewed as a strict subset of PEP 8.
 
-_Black_ reformats entire files in place. It doesn't reformat blocks that start with
-`# fmt: off` and end with `# fmt: on`, or lines that ends with `# fmt: skip`.
-`# fmt: on/off` have to be on the same level of indentation. It also recognizes
+_Black_ reformats entire files in place. It doesn't reformat lines that end with
+`# fmt: skip` or blocks that start with `# fmt: off` and end with `# fmt: on`.
+`# fmt: on/off` must be on the same level of indentation and in the same block, meaning
+no unindents beyond the initial indentation level between them. It also recognizes
 [YAPF](https://github.com/google/yapf)'s block comments to the same effect, as a
 courtesy for straddling code.
 
diff -pruN 22.3.0-1/docs/the_black_code_style/future_style.md 22.6.0-1/docs/the_black_code_style/future_style.md
--- 22.3.0-1/docs/the_black_code_style/future_style.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/the_black_code_style/future_style.md	2022-06-28 00:33:35.000000000 +0000
@@ -49,3 +49,72 @@ plain strings. User-made splits are resp
 limit. Line continuation backslashes are converted into parenthesized strings.
 Unnecessary parentheses are stripped. The stability and status of this feature is
 tracked in [this issue](https://github.com/psf/black/issues/2188).
+
+### Removing newlines in the beginning of code blocks
+
+_Black_ will remove newlines in the beginning of new code blocks, i.e. when the
+indentation level is increased. For example:
+
+```python
+def my_func():
+
+    print("The line above me will be deleted!")
+```
+
+will be changed to:
+
+```python
+def my_func():
+    print("The line above me will be deleted!")
+```
+
+This new feature will be applied to **all code blocks**: `def`, `class`, `if`, `for`,
+`while`, `with`, `case` and `match`.
+
+### Improved parentheses management
+
+_Black_ will format parentheses around return annotations similarly to other sets of
+parentheses. For example:
+
+```python
+def foo() -> (int):
+    ...
+
+def foo() -> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong:
+    ...
+```
+
+will be changed to:
+
+```python
+def foo() -> int:
+    ...
+
+
+def foo() -> (
+    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
+):
+    ...
+```
+
+And, extra parentheses in `await` expressions and `with` statements are removed. For
+example:
+
+```python
+with ((open("bla.txt")) as f, open("x")):
+    ...
+
+async def main():
+    await (asyncio.sleep(1))
+```
+
+will be changed to:
+
+```python
+with open("bla.txt") as f, open("x"):
+    ...
+
+
+async def main():
+    await asyncio.sleep(1)
+```
diff -pruN 22.3.0-1/docs/the_black_code_style/index.md 22.6.0-1/docs/the_black_code_style/index.md
--- 22.3.0-1/docs/the_black_code_style/index.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/the_black_code_style/index.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,47 @@
+# The Black Code Style
+
+```{toctree}
+---
+hidden:
+---
+
+Current style <current_style>
+Future style <future_style>
+```
+
+_Black_ is a PEP 8 compliant opinionated formatter with its own style.
+
+While keeping the style unchanged throughout releases has always been a goal, the
+_Black_ code style isn't set in stone. It evolves to accommodate for new features in the
+Python language and, occasionally, in response to user feedback. Large-scale style
+preferences presented in {doc}`current_style` are very unlikely to change, but minor
+style aspects and details might change according to the stability policy presented
+below. Ongoing style considerations are tracked on GitHub with the
+[design](https://github.com/psf/black/labels/T%3A%20design) issue label.
+
+## Stability Policy
+
+The following policy applies for the _Black_ code style, in non pre-release versions of
+_Black_:
+
+- The same code, formatted with the same options, will produce the same output for all
+  releases in a given calendar year.
+
+  This means projects can safely use `black ~= 22.0` without worrying about major
+  formatting changes disrupting their project in 2022. We may still fix bugs where
+  _Black_ crashes on some code, and make other improvements that do not affect
+  formatting.
+
+- The first release in a new calendar year _may_ contain formatting changes, although
+  these will be minimised as much as possible. This is to allow for improved formatting
+  enabled by newer Python language syntax as well as due to improvements in the
+  formatting logic.
+
+- The `--preview` flag is exempt from this policy. There are no guarantees around the
+  stability of the output with that flag passed into _Black_. This flag is intended for
+  allowing experimentation with the proposed changes to the _Black_ code style.
+
+Documentation for both the current and future styles can be found:
+
+- {doc}`current_style`
+- {doc}`future_style`
diff -pruN 22.3.0-1/docs/the_black_code_style/index.rst 22.6.0-1/docs/the_black_code_style/index.rst
--- 22.3.0-1/docs/the_black_code_style/index.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/the_black_code_style/index.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,47 +0,0 @@
-The Black Code Style
-====================
-
-.. toctree::
-    :hidden:
-
-    Current style <current_style>
-    Future style <future_style>
-
-*Black* is a PEP 8 compliant opinionated formatter with its own style.
-
-While keeping the style unchanged throughout releases has always been a goal,
-the *Black* code style isn't set in stone. It evolves to accommodate for new features
-in the Python language and, occasionally, in response to user feedback.
-Large-scale style preferences presented in :doc:`current_style` are very unlikely to
-change, but minor style aspects and details might change according to the stability
-policy presented below. Ongoing style considerations are tracked on GitHub with the
-`design <https://github.com/psf/black/labels/T%3A%20design>`_ issue label.
-
-Stability Policy
-----------------
-
-The following policy applies for the *Black* code style, in non pre-release
-versions of *Black*:
-
-- The same code, formatted with the same options, will produce the same
-  output for all releases in a given calendar year.
-
-  This means projects can safely use `black ~= 22.0` without worrying about
-  major formatting changes disrupting their project in 2022. We may still
-  fix bugs where *Black* crashes on some code, and make other improvements
-  that do not affect formatting.
-
-- The first release in a new calendar year *may* contain formatting changes,
-  although these will be minimised as much as possible. This is to allow for
-  improved formatting enabled by newer Python language syntax as well as due
-  to improvements in the formatting logic.
-
-- The ``--preview`` flag is exempt from this policy. There are no guarantees
-  around the stability of the output with that flag passed into *Black*. This
-  flag is intended for allowing experimentation with the proposed changes to
-  the *Black* code style.
-
-Documentation for both the current and future styles can be found:
-
-- :doc:`current_style`
-- :doc:`future_style`
diff -pruN 22.3.0-1/docs/usage_and_configuration/black_as_a_server.md 22.6.0-1/docs/usage_and_configuration/black_as_a_server.md
--- 22.3.0-1/docs/usage_and_configuration/black_as_a_server.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/usage_and_configuration/black_as_a_server.md	2022-06-28 00:33:35.000000000 +0000
@@ -7,7 +7,7 @@ process every time you want to blacken a
 ## Usage
 
 `blackd` is not packaged alongside _Black_ by default because it has additional
-dependencies. You will need to execute `pip install black[d]` to install it.
+dependencies. You will need to execute `pip install 'black[d]'` to install it.
 
 You can start the server on the default port, binding only to the local interface by
 running `blackd`. You will see a single line mentioning the server's version, and the
diff -pruN 22.3.0-1/docs/usage_and_configuration/black_docker_image.md 22.6.0-1/docs/usage_and_configuration/black_docker_image.md
--- 22.3.0-1/docs/usage_and_configuration/black_docker_image.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/usage_and_configuration/black_docker_image.md	2022-06-28 00:33:35.000000000 +0000
@@ -1,7 +1,7 @@
 # Black Docker image
 
-Official _Black_ Docker images are available on Docker Hub:
-https://hub.docker.com/r/pyfound/black
+Official _Black_ Docker images are available on
+[Docker Hub](https://hub.docker.com/r/pyfound/black).
 
 _Black_ images with the following tags are available:
 
diff -pruN 22.3.0-1/docs/usage_and_configuration/index.md 22.6.0-1/docs/usage_and_configuration/index.md
--- 22.3.0-1/docs/usage_and_configuration/index.md	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/docs/usage_and_configuration/index.md	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,28 @@
+# Usage and Configuration
+
+```{toctree}
+---
+hidden:
+---
+
+the_basics
+file_collection_and_discovery
+black_as_a_server
+black_docker_image
+```
+
+Sometimes, running _Black_ with its defaults and passing filepaths to it just won't cut
+it. Passing each file using paths will become burdensome, and maybe you would like
+_Black_ to not touch your files and just output diffs. And yes, you _can_ tweak certain
+parts of _Black_'s style, but please know that configurability in this area is
+purposefully limited.
+
+Using many of these more advanced features of _Black_ will require some configuration.
+Configuration that will either live on the command line or in a TOML configuration file.
+
+This section covers features of _Black_ and configuring _Black_ in detail:
+
+- {doc}`The basics <./the_basics>`
+- {doc}`File collection and discovery <file_collection_and_discovery>`
+- {doc}`Black as a server (blackd) <./black_as_a_server>`
+- {doc}`Black Docker image <./black_docker_image>`
diff -pruN 22.3.0-1/docs/usage_and_configuration/index.rst 22.6.0-1/docs/usage_and_configuration/index.rst
--- 22.3.0-1/docs/usage_and_configuration/index.rst	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/usage_and_configuration/index.rst	1970-01-01 00:00:00.000000000 +0000
@@ -1,26 +0,0 @@
-Usage and Configuration
-=======================
-
-.. toctree::
-  :hidden:
-
-  the_basics
-  file_collection_and_discovery
-  black_as_a_server
-  black_docker_image
-
-Sometimes, running *Black* with its defaults and passing filepaths to it just won't cut
-it. Passing each file using paths will become burdensome, and maybe you would like
-*Black* to not touch your files and just output diffs. And yes, you *can* tweak certain
-parts of *Black*'s style, but please know that configurability in this area is
-purposefully limited.
-
-Using many of these more advanced features of *Black* will require some configuration.
-Configuration that will either live on the command line or in a TOML configuration file.
-
-This section covers features of *Black* and configuring *Black* in detail:
-
-- :doc:`The basics <./the_basics>`
-- :doc:`File collection and discovery <file_collection_and_discovery>`
-- :doc:`Black as a server (blackd) <./black_as_a_server>`
-- :doc:`Black Docker image <./black_docker_image>`
diff -pruN 22.3.0-1/docs/usage_and_configuration/the_basics.md 22.6.0-1/docs/usage_and_configuration/the_basics.md
--- 22.3.0-1/docs/usage_and_configuration/the_basics.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/docs/usage_and_configuration/the_basics.md	2022-06-28 00:33:35.000000000 +0000
@@ -173,7 +173,7 @@ You can check the version of _Black_ you
 
 ```console
 $ black --version
-black, version 22.3.0
+black, version 22.6.0
 ```
 
 An option to require a specific version to be running is also provided.
@@ -259,10 +259,14 @@ expressions by Black. Use `[ ]` to denot
 line-length = 88
 target-version = ['py37']
 include = '\.pyi?$'
+# 'extend-exclude' excludes files or directories in addition to the defaults
 extend-exclude = '''
 # A regex preceded with ^/ will apply only to files and directories
 # in the root of the project.
-^/foo.py  # exclude a file named foo.py in the root of the project (in addition to the defaults)
+(
+  ^/foo.py    # exclude a file named foo.py in the root of the project
+  | *_pb2.py  # exclude autogenerated Protocol Buffer files anywhere in the project
+)
 '''
 ```
 
diff -pruN 22.3.0-1/gallery/gallery.py 22.6.0-1/gallery/gallery.py
--- 22.3.0-1/gallery/gallery.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/gallery/gallery.py	2022-06-28 00:33:35.000000000 +0000
@@ -10,10 +10,9 @@ from argparse import ArgumentParser, Nam
 from concurrent.futures import ThreadPoolExecutor
 from functools import lru_cache, partial
 from pathlib import Path
-from typing import (  # type: ignore # typing can't see Literal
+from typing import (
     Generator,
     List,
-    Literal,
     NamedTuple,
     Optional,
     Tuple,
@@ -24,12 +23,11 @@ from urllib.request import urlopen, urlr
 
 PYPI_INSTANCE = "https://pypi.org/pypi"
 PYPI_TOP_PACKAGES = (
-    "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-{days}-days.json"
+    "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json"
 )
 INTERNAL_BLACK_REPO = f"{tempfile.gettempdir()}/__black"
 
 ArchiveKind = Union[tarfile.TarFile, zipfile.ZipFile]
-Days = Union[Literal[30], Literal[365]]
 
 subprocess.run = partial(subprocess.run, check=True)  # type: ignore
 # https://github.com/python/mypy/issues/1484
@@ -64,8 +62,8 @@ def get_pypi_download_url(package: str,
     return cast(str, source["url"])
 
 
-def get_top_packages(days: Days) -> List[str]:
-    with urlopen(PYPI_TOP_PACKAGES.format(days=days)) as page:
+def get_top_packages() -> List[str]:
+    with urlopen(PYPI_TOP_PACKAGES) as page:
         result = json.load(page)
 
     return [package["project"] for package in result["rows"]]
@@ -128,13 +126,12 @@ DEFAULT_SLICE = slice(None)  # for flake
 
 def download_and_extract_top_packages(
     directory: Path,
-    days: Days = 365,
     workers: int = 8,
     limit: slice = DEFAULT_SLICE,
 ) -> Generator[Path, None, None]:
     with ThreadPoolExecutor(max_workers=workers) as executor:
         bound_downloader = partial(get_package, version=None, directory=directory)
-        for package in executor.map(bound_downloader, get_top_packages(days)[limit]):
+        for package in executor.map(bound_downloader, get_top_packages()[limit]):
             if package is not None:
                 yield package
 
diff -pruN 22.3.0-1/.github/workflows/changelog.yml 22.6.0-1/.github/workflows/changelog.yml
--- 22.3.0-1/.github/workflows/changelog.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/changelog.yml	2022-06-28 00:33:35.000000000 +0000
@@ -4,6 +4,9 @@ on:
   pull_request:
     types: [opened, synchronize, labeled, unlabeled, reopened]
 
+permissions:
+  contents: read
+
 jobs:
   build:
     name: Changelog Entry Check
diff -pruN 22.3.0-1/.github/workflows/diff_shades_comment.yml 22.6.0-1/.github/workflows/diff_shades_comment.yml
--- 22.3.0-1/.github/workflows/diff_shades_comment.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/diff_shades_comment.yml	2022-06-28 00:33:35.000000000 +0000
@@ -13,7 +13,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v3
-      - uses: actions/setup-python@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install support dependencies
         run: |
@@ -31,7 +33,7 @@ jobs:
       - name: Try to find pre-existing PR comment
         if: steps.metadata.outputs.needs-comment == 'true'
         id: find-comment
-        uses: peter-evans/find-comment@d2dae40ed151c634e4189471272b57e76ec19ba8
+        uses: peter-evans/find-comment@1769778a0c5bd330272d749d12c036d65e70d39d
         with:
           issue-number: ${{ steps.metadata.outputs.pr-number }}
           comment-author: "github-actions[bot]"
@@ -39,7 +41,7 @@ jobs:
 
       - name: Create or update PR comment
         if: steps.metadata.outputs.needs-comment == 'true'
-        uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
+        uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
         with:
           comment-id: ${{ steps.find-comment.outputs.comment-id }}
           issue-number: ${{ steps.metadata.outputs.pr-number }}
diff -pruN 22.3.0-1/.github/workflows/diff_shades.yml 22.6.0-1/.github/workflows/diff_shades.yml
--- 22.3.0-1/.github/workflows/diff_shades.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/diff_shades.yml	2022-06-28 00:33:35.000000000 +0000
@@ -20,11 +20,13 @@ jobs:
 
     steps:
       - uses: actions/checkout@v3
-      - uses: actions/setup-python@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install diff-shades and support dependencies
         run: |
-          python -m pip install 'click<8.1.0' packaging urllib3
+          python -m pip install click packaging urllib3
           python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
 
       - name: Calculate run configuration & metadata
@@ -54,12 +56,14 @@ jobs:
           # The baseline revision could be rather old so a full clone is ideal.
           fetch-depth: 0
 
-      - uses: actions/setup-python@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install diff-shades and support dependencies
         run: |
           python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
-          python -m pip install 'click<8.1.0' packaging urllib3
+          python -m pip install click packaging urllib3
           python -m pip install -r .github/mypyc-requirements.txt
           # After checking out old revisions, this might not exist so we'll use a copy.
           cat scripts/diff_shades_gha_helper.py > helper.py
@@ -68,7 +72,7 @@ jobs:
 
       - name: Attempt to use cached baseline analysis
         id: baseline-cache
-        uses: actions/cache@v2.1.7
+        uses: actions/cache@v3
         with:
           path: ${{ matrix.baseline-analysis }}
           key: ${{ matrix.baseline-cache-key }}
@@ -108,19 +112,19 @@ jobs:
           ${{ matrix.baseline-analysis }} ${{ matrix.target-analysis }}
 
       - name: Upload diff report
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         with:
           name: ${{ matrix.mode }}-diff.html
           path: diff.html
 
       - name: Upload baseline analysis
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         with:
           name: ${{ matrix.baseline-analysis }}
           path: ${{ matrix.baseline-analysis }}
 
       - name: Upload target analysis
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         with:
           name: ${{ matrix.target-analysis }}
           path: ${{ matrix.target-analysis }}
@@ -135,7 +139,7 @@ jobs:
 
       - name: Upload summary file (PR only)
         if: github.event_name == 'pull_request' && matrix.mode == 'preview-changes'
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v3
         with:
           name: .pr-comment.json
           path: .pr-comment.json
diff -pruN 22.3.0-1/.github/workflows/docker.yml 22.6.0-1/.github/workflows/docker.yml
--- 22.3.0-1/.github/workflows/docker.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/docker.yml	2022-06-28 00:33:35.000000000 +0000
@@ -7,6 +7,9 @@ on:
   release:
     types: [published]
 
+permissions:
+  contents: read
+
 jobs:
   docker:
     if: github.repository == 'psf/black'
@@ -16,13 +19,13 @@ jobs:
         uses: actions/checkout@v3
 
       - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
+        uses: docker/setup-qemu-action@v2
 
       - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
+        uses: docker/setup-buildx-action@v2
 
       - name: Login to DockerHub
-        uses: docker/login-action@v1
+        uses: docker/login-action@v2
         with:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -33,7 +36,7 @@ jobs:
           latest_non_release)" >> $GITHUB_ENV
 
       - name: Build and push
-        uses: docker/build-push-action@v2
+        uses: docker/build-push-action@v3
         with:
           context: .
           platforms: linux/amd64,linux/arm64
@@ -42,7 +45,7 @@ jobs:
 
       - name: Build and push latest_release tag
         if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
-        uses: docker/build-push-action@v2
+        uses: docker/build-push-action@v3
         with:
           context: .
           platforms: linux/amd64,linux/arm64
diff -pruN 22.3.0-1/.github/workflows/doc.yml 22.6.0-1/.github/workflows/doc.yml
--- 22.3.0-1/.github/workflows/doc.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/doc.yml	2022-06-28 00:33:35.000000000 +0000
@@ -2,6 +2,9 @@ name: Documentation Build
 
 on: [push, pull_request]
 
+permissions:
+  contents: read
+
 jobs:
   build:
     # We want to run on external PRs, but not on our own internal PRs as they'll be run
@@ -21,7 +24,9 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up latest Python
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install dependencies
         run: |
diff -pruN 22.3.0-1/.github/workflows/fuzz.yml 22.6.0-1/.github/workflows/fuzz.yml
--- 22.3.0-1/.github/workflows/fuzz.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/fuzz.yml	2022-06-28 00:33:35.000000000 +0000
@@ -2,6 +2,9 @@ name: Fuzz
 
 on: [push, pull_request]
 
+permissions:
+  contents: read
+
 jobs:
   build:
     # We want to run on external PRs, but not on our own internal PRs as they'll be run
@@ -21,7 +24,7 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python-version }}
 
diff -pruN 22.3.0-1/.github/workflows/lint.yml 22.6.0-1/.github/workflows/lint.yml
--- 22.3.0-1/.github/workflows/lint.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/lint.yml	2022-06-28 00:33:35.000000000 +0000
@@ -17,12 +17,19 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up Python
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
           python -m pip install -e '.[d]'
+          python -m pip install tox
 
       - name: Lint
-        uses: pre-commit/action@v2.0.3
+        uses: pre-commit/action@v3.0.0
+
+      - name: Run On Self
+        run: |
+          tox -e run_self
diff -pruN 22.3.0-1/.github/workflows/pypi_upload.yml 22.6.0-1/.github/workflows/pypi_upload.yml
--- 22.3.0-1/.github/workflows/pypi_upload.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/pypi_upload.yml	2022-06-28 00:33:35.000000000 +0000
@@ -4,6 +4,9 @@ on:
   release:
     types: [published]
 
+permissions:
+  contents: read
+
 jobs:
   build:
     name: PyPI Upload
@@ -13,7 +16,9 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up Python
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install latest pip, build, twine
         run: |
diff -pruN 22.3.0-1/.github/workflows/test.yml 22.6.0-1/.github/workflows/test.yml
--- 22.3.0-1/.github/workflows/test.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/test.yml	2022-06-28 00:33:35.000000000 +0000
@@ -31,7 +31,7 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python-version }}
 
diff -pruN 22.3.0-1/.github/workflows/upload_binary.yml 22.6.0-1/.github/workflows/upload_binary.yml
--- 22.3.0-1/.github/workflows/upload_binary.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/upload_binary.yml	2022-06-28 00:33:35.000000000 +0000
@@ -4,8 +4,13 @@ on:
   release:
     types: [published]
 
+permissions:
+  contents: read
+
 jobs:
   build:
+    permissions:
+      contents: write # for actions/upload-release-asset to upload release asset
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
@@ -29,7 +34,7 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up latest Python
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
         with:
           python-version: "*"
 
diff -pruN 22.3.0-1/.github/workflows/uvloop_test.yml 22.6.0-1/.github/workflows/uvloop_test.yml
--- 22.3.0-1/.github/workflows/uvloop_test.yml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.github/workflows/uvloop_test.yml	2022-06-28 00:33:35.000000000 +0000
@@ -11,6 +11,9 @@ on:
       - "docs/**"
       - "*.md"
 
+permissions:
+  contents: read
+
 jobs:
   build:
     # We want to run on external PRs, but not on our own internal PRs as they'll be run
@@ -30,7 +33,9 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
+        with:
+          python-version: "*"
 
       - name: Install latest pip
         run: |
diff -pruN 22.3.0-1/mypy.ini 22.6.0-1/mypy.ini
--- 22.3.0-1/mypy.ini	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/mypy.ini	2022-06-28 00:33:35.000000000 +0000
@@ -32,9 +32,6 @@ warn_unreachable=True
 disallow_untyped_defs=True
 check_untyped_defs=True
 
-# No incremental mode
-cache_dir=/dev/null
-
 [mypy-black]
 # The following is because of `patch_click()`. Remove when
 # we drop Python 3.6 support.
diff -pruN 22.3.0-1/.pre-commit-config.yaml 22.6.0-1/.pre-commit-config.yaml
--- 22.3.0-1/.pre-commit-config.yaml	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/.pre-commit-config.yaml	2022-06-28 00:33:35.000000000 +0000
@@ -4,14 +4,6 @@ exclude: ^(src/blib2to3/|profiling/|test
 repos:
   - repo: local
     hooks:
-      - id: black
-        name: black
-        language: system
-        entry: black
-        minimum_pre_commit_version: 2.9.2
-        require_serial: true
-        types_or: [python, pyi]
-
       - id: check-pre-commit-rev-in-example
         name: Check pre-commit rev in example
         language: python
@@ -50,7 +42,7 @@ repos:
           - types-PyYAML
           - tomli >= 0.2.6, < 2.0.0
           - types-typed-ast >= 1.4.1
-          - click >= 8.0.0
+          - click >= 8.1.0
           - platformdirs >= 2.1.0
 
   - repo: https://github.com/pre-commit/mirrors-prettier
diff -pruN 22.3.0-1/README.md 22.6.0-1/README.md
--- 22.3.0-1/README.md	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/README.md	2022-06-28 00:33:35.000000000 +0000
@@ -39,7 +39,8 @@ Try it out now using the [Black Playgrou
 ### Installation
 
 _Black_ can be installed by running `pip install black`. It requires Python 3.6.2+ to
-run. If you want to format Jupyter Notebooks, install with `pip install black[jupyter]`.
+run. If you want to format Jupyter Notebooks, install with
+`pip install 'black[jupyter]'`.
 
 If you can't wait for the latest _hotness_ and want to install from GitHub, use:
 
@@ -69,7 +70,7 @@ tests, and our own auto formatting and p
 we have become stable, you should not expect large formatting to changes in the future.
 Stylistic changes will mostly be responses to bug reports and support for new Python
 syntax. For more information please refer to the
-[The Black Code Style](docs/the_black_code_style/index.rst).
+[The Black Code Style](https://black.readthedocs.io/en/stable/the_black_code_style/index.html).
 
 Also, as a safety measure which slows down processing, _Black_ will check that the
 reformatted code still produces a valid AST that is effectively equivalent to the
@@ -165,8 +166,8 @@ Twisted and CPython:
 
 > At least the name is good.
 
-**Kenneth Reitz**, creator of [`requests`](http://python-requests.org/) and
-[`pipenv`](https://readthedocs.org/projects/pipenv/):
+**Kenneth Reitz**, creator of [`requests`](https://requests.readthedocs.io/en/latest/)
+and [`pipenv`](https://readthedocs.org/projects/pipenv/):
 
 > This vastly improves the formatting of our code. Thanks a ton!
 
diff -pruN 22.3.0-1/scripts/migrate-black.py 22.6.0-1/scripts/migrate-black.py
--- 22.3.0-1/scripts/migrate-black.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/scripts/migrate-black.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,95 @@
+#!/usr/bin/env python3
+# check out every commit added by the current branch, blackify them,
+# and generate diffs to reconstruct the original commits, but then
+# blackified
+import logging
+import os
+import sys
+from subprocess import check_output, run, Popen, PIPE
+
+
+def git(*args: str) -> str:
+    return check_output(["git"] + list(args)).decode("utf8").strip()
+
+
+def blackify(base_branch: str, black_command: str, logger: logging.Logger) -> int:
+    current_branch = git("branch", "--show-current")
+
+    if not current_branch or base_branch == current_branch:
+        logger.error("You need to check out a feature branch to work on")
+        return 1
+
+    if not os.path.exists(".git"):
+        logger.error("Run me in the root of your repo")
+        return 1
+
+    merge_base = git("merge-base", "HEAD", base_branch)
+    if not merge_base:
+        logger.error(
+            "Could not find a common commit for current head and %s" % base_branch
+        )
+        return 1
+
+    commits = git(
+        "log", "--reverse", "--pretty=format:%H", "%s~1..HEAD" % merge_base
+    ).split()
+    for commit in commits:
+        git("checkout", commit, "-b%s-black" % commit)
+        check_output(black_command, shell=True)
+        git("commit", "-aqm", "blackify")
+
+    git("checkout", base_branch, "-b%s-black" % current_branch)
+
+    for last_commit, commit in zip(commits, commits[1:]):
+        allow_empty = (
+            b"--allow-empty" in run(["git", "apply", "-h"], stdout=PIPE).stdout
+        )
+        quiet = b"--quiet" in run(["git", "apply", "-h"], stdout=PIPE).stdout
+        git_diff = Popen(
+            [
+                "git",
+                "diff",
+                "--find-copies",
+                "%s-black..%s-black" % (last_commit, commit),
+            ],
+            stdout=PIPE,
+        )
+        git_apply = Popen(
+            [
+                "git",
+                "apply",
+            ]
+            + (["--quiet"] if quiet else [])
+            + [
+                "-3",
+                "--intent-to-add",
+            ]
+            + (["--allow-empty"] if allow_empty else [])
+            + [
+                "-",
+            ],
+            stdin=git_diff.stdout,
+        )
+        if git_diff.stdout is not None:
+            git_diff.stdout.close()
+        git_apply.communicate()
+        git("commit", "--allow-empty", "-aqC", commit)
+
+    for commit in commits:
+        git("branch", "-qD", "%s-black" % commit)
+
+    return 0
+
+
+if __name__ == "__main__":
+    import argparse
+
+    parser = argparse.ArgumentParser()
+    parser.add_argument("base_branch")
+    parser.add_argument("--black_command", default="black -q .")
+    parser.add_argument("--logfile", type=argparse.FileType("w"), default=sys.stdout)
+    args = parser.parse_args()
+    logger = logging.getLogger(__name__)
+    logger.addHandler(logging.StreamHandler(args.logfile))
+    logger.setLevel(logging.INFO)
+    sys.exit(blackify(args.base_branch, args.black_command, logger))
diff -pruN 22.3.0-1/setup.py 22.6.0-1/setup.py
--- 22.3.0-1/setup.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/setup.py	2022-06-28 00:33:35.000000000 +0000
@@ -98,7 +98,7 @@ setup(
     install_requires=[
         "click>=8.0.0",
         "platformdirs>=2",
-        "tomli>=1.1.0; python_version < '3.11'",
+        "tomli>=1.1.0; python_full_version < '3.11.0a7'",
         "typed-ast>=1.4.2; python_version < '3.8' and implementation_name == 'cpython'",
         "pathspec>=0.9.0",
         "dataclasses>=0.6; python_version < '3.7'",
diff -pruN 22.3.0-1/src/black/comments.py 22.6.0-1/src/black/comments.py
--- 22.3.0-1/src/black/comments.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/comments.py	2022-06-28 00:33:35.000000000 +0000
@@ -214,8 +214,11 @@ def generate_ignored_nodes(
     container: Optional[LN] = container_of(leaf)
     if comment.value in FMT_SKIP:
         prev_sibling = leaf.prev_sibling
-        if comment.value in leaf.prefix and prev_sibling is not None:
-            leaf.prefix = leaf.prefix.replace(comment.value, "")
+        # Need to properly format the leaf prefix to compare it to comment.value,
+        # which is also formatted
+        comments = list_comments(leaf.prefix, is_endmarker=False, preview=preview)
+        if comments and comment.value == comments[0].value and prev_sibling is not None:
+            leaf.prefix = ""
             siblings = [prev_sibling]
             while (
                 "\n" not in prev_sibling.prefix
diff -pruN 22.3.0-1/src/black/files.py 22.6.0-1/src/black/files.py
--- 22.3.0-1/src/black/files.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/files.py	2022-06-28 00:33:35.000000000 +0000
@@ -22,7 +22,11 @@ from pathspec import PathSpec
 from pathspec.patterns.gitwildmatch import GitWildMatchPatternError
 
 if sys.version_info >= (3, 11):
-    import tomllib
+    try:
+        import tomllib
+    except ImportError:
+        # Help users on older alphas
+        import tomli as tomllib
 else:
     import tomli as tomllib
 
diff -pruN 22.3.0-1/src/black/__init__.py 22.6.0-1/src/black/__init__.py
--- 22.3.0-1/src/black/__init__.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/__init__.py	2022-06-28 00:33:35.000000000 +0000
@@ -1,7 +1,6 @@
 import asyncio
 from json.decoder import JSONDecodeError
 import json
-from concurrent.futures import Executor, ThreadPoolExecutor, ProcessPoolExecutor
 from contextlib import contextmanager
 from datetime import datetime
 from enum import Enum
@@ -10,12 +9,14 @@ from multiprocessing import Manager, fre
 import os
 from pathlib import Path
 from pathspec.patterns.gitwildmatch import GitWildMatchPatternError
+import platform
 import re
 import signal
 import sys
 import tokenize
 import traceback
 from typing import (
+    TYPE_CHECKING,
     Any,
     Dict,
     Generator,
@@ -39,7 +40,7 @@ from mypy_extensions import mypyc_attr
 from black.const import DEFAULT_LINE_LENGTH, DEFAULT_INCLUDES, DEFAULT_EXCLUDES
 from black.const import STDIN_PLACEHOLDER
 from black.nodes import STARS, syms, is_simple_decorator_expression
-from black.nodes import is_string_token
+from black.nodes import is_string_token, is_number_token
 from black.lines import Line, EmptyLineTracker
 from black.linegen import transform_line, LineGenerator, LN
 from black.comments import normalize_fmt_off
@@ -76,6 +77,9 @@ from blib2to3.pgen2 import token
 
 from _black_version import version as __version__
 
+if TYPE_CHECKING:
+    from concurrent.futures import Executor
+
 COMPILED = Path(__file__).suffix in (".pyd", ".so")
 
 # types
@@ -381,7 +385,10 @@ def validate_regex(
 )
 @click.version_option(
     version=__version__,
-    message=f"%(prog)s, %(version)s (compiled: {'yes' if COMPILED else 'no'})",
+    message=(
+        f"%(prog)s, %(version)s (compiled: {'yes' if COMPILED else 'no'})\n"
+        f"Python ({platform.python_implementation()}) {platform.python_version()}"
+    ),
 )
 @click.argument(
     "src",
@@ -763,6 +770,8 @@ def reformat_many(
     workers: Optional[int],
 ) -> None:
     """Reformat multiple files using a ProcessPoolExecutor."""
+    from concurrent.futures import Executor, ThreadPoolExecutor, ProcessPoolExecutor
+
     executor: Executor
     loop = asyncio.get_event_loop()
     worker_count = workers if workers is not None else DEFAULT_WORKERS
@@ -804,7 +813,7 @@ async def schedule_formatting(
     mode: Mode,
     report: "Report",
     loop: asyncio.AbstractEventLoop,
-    executor: Executor,
+    executor: "Executor",
 ) -> None:
     """Run formatting of `sources` in parallel using the provided `executor`.
 
@@ -1163,10 +1172,10 @@ def format_str(src_contents: str, *, mod
 def _format_str_once(src_contents: str, *, mode: Mode) -> str:
     src_node = lib2to3_parse(src_contents.lstrip(), mode.target_versions)
     dst_contents = []
-    future_imports = get_future_imports(src_node)
     if mode.target_versions:
         versions = mode.target_versions
     else:
+        future_imports = get_future_imports(src_node)
         versions = detect_target_versions(src_node, future_imports=future_imports)
 
     normalize_fmt_off(src_node, preview=mode.preview)
@@ -1236,8 +1245,7 @@ def get_features_used(  # noqa: C901
             if value_head in {'f"', 'F"', "f'", "F'", "rf", "fr", "RF", "FR"}:
                 features.add(Feature.F_STRINGS)
 
-        elif n.type == token.NUMBER:
-            assert isinstance(n, Leaf)
+        elif is_number_token(n):
             if "_" in n.value:
                 features.add(Feature.NUMERIC_UNDERSCORES)
 
@@ -1292,6 +1300,25 @@ def get_features_used(  # noqa: C901
         ):
             features.add(Feature.ANN_ASSIGN_EXTENDED_RHS)
 
+        elif (
+            n.type == syms.except_clause
+            and len(n.children) >= 2
+            and n.children[1].type == token.STAR
+        ):
+            features.add(Feature.EXCEPT_STAR)
+
+        elif n.type in {syms.subscriptlist, syms.trailer} and any(
+            child.type == syms.star_expr for child in n.children
+        ):
+            features.add(Feature.VARIADIC_GENERICS)
+
+        elif (
+            n.type == syms.tname_star
+            and len(n.children) == 3
+            and n.children[2].type == syms.star_expr
+        ):
+            features.add(Feature.VARIADIC_GENERICS)
+
     return features
 
 
@@ -1435,7 +1462,9 @@ def patch_click() -> None:
     else:
         modules.append(core)
     try:
-        from click import _unicodefun
+        # Removed in Click 8.1.0 and newer; we keep this around for users who have
+        # older versions installed.
+        from click import _unicodefun  # type: ignore
     except ImportError:
         pass
     else:
diff -pruN 22.3.0-1/src/black/linegen.py 22.6.0-1/src/black/linegen.py
--- 22.3.0-1/src/black/linegen.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/linegen.py	2022-06-28 00:33:35.000000000 +0000
@@ -3,7 +3,7 @@ Generating lines of code.
 """
 from functools import partial, wraps
 import sys
-from typing import Collection, Iterator, List, Optional, Set, Union
+from typing import Collection, Iterator, List, Optional, Set, Union, cast
 
 from black.nodes import WHITESPACE, RARROW, STATEMENT, STANDALONE_COMMENT
 from black.nodes import ASSIGNMENTS, OPENING_BRACKETS, CLOSING_BRACKETS
@@ -144,6 +144,33 @@ class LineGenerator(Visitor[Line]):
 
             yield from self.visit(child)
 
+    def visit_funcdef(self, node: Node) -> Iterator[Line]:
+        """Visit function definition."""
+        if Preview.annotation_parens not in self.mode:
+            yield from self.visit_stmt(node, keywords={"def"}, parens=set())
+        else:
+            yield from self.line()
+
+            # Remove redundant brackets around return type annotation.
+            is_return_annotation = False
+            for child in node.children:
+                if child.type == token.RARROW:
+                    is_return_annotation = True
+                elif is_return_annotation:
+                    if child.type == syms.atom and child.children[0].type == token.LPAR:
+                        if maybe_make_parens_invisible_in_atom(
+                            child,
+                            parent=node,
+                            remove_brackets_around_comma=False,
+                        ):
+                            wrap_in_parentheses(node, child, visible=False)
+                    else:
+                        wrap_in_parentheses(node, child, visible=False)
+                    is_return_annotation = False
+
+            for child in node.children:
+                yield from self.visit(child)
+
     def visit_match_case(self, node: Node) -> Iterator[Line]:
         """Visit either a match or case statement."""
         normalize_invisible_parens(node, parens_after=set(), preview=self.mode.preview)
@@ -226,6 +253,9 @@ class LineGenerator(Visitor[Line]):
             ):
                 wrap_in_parentheses(node, leaf)
 
+        if Preview.remove_redundant_parens in self.mode:
+            remove_await_parens(node)
+
         yield from self.visit_default(node)
 
     def visit_SEMI(self, leaf: Leaf) -> Iterator[Line]:
@@ -275,9 +305,9 @@ class LineGenerator(Visitor[Line]):
             quote_len = 1 if docstring[1] != quote_char else 3
             docstring = docstring[quote_len:-quote_len]
             docstring_started_empty = not docstring
+            indent = " " * 4 * self.current_line.depth
 
             if is_multiline_string(leaf):
-                indent = " " * 4 * self.current_line.depth
                 docstring = fix_docstring(docstring, indent)
             else:
                 docstring = docstring.strip()
@@ -299,7 +329,29 @@ class LineGenerator(Visitor[Line]):
 
             # We could enforce triple quotes at this point.
             quote = quote_char * quote_len
-            leaf.value = prefix + quote + docstring + quote
+
+            if Preview.long_docstring_quotes_on_newline in self.mode:
+                # We need to find the length of the last line of the docstring
+                # to find if we can add the closing quotes to the line without
+                # exceeding the maximum line length.
+                # If docstring is one line, then we need to add the length
+                # of the indent, prefix, and starting quotes. Ending quote are
+                # handled later
+                lines = docstring.splitlines()
+                last_line_length = len(lines[-1]) if docstring else 0
+
+                if len(lines) == 1:
+                    last_line_length += len(indent) + len(prefix) + quote_len
+
+                # If adding closing quotes would cause the last line to exceed
+                # the maximum line length then put a line break before the
+                # closing quotes
+                if last_line_length + quote_len > self.mode.line_length:
+                    leaf.value = prefix + quote + docstring + "\n" + indent + quote
+                else:
+                    leaf.value = prefix + quote + docstring + quote
+            else:
+                leaf.value = prefix + quote + docstring + quote
 
         yield from self.visit_default(leaf)
 
@@ -322,10 +374,10 @@ class LineGenerator(Visitor[Line]):
             self.visit_except_clause = partial(
                 v, keywords={"except"}, parens={"except"}
             )
+            self.visit_with_stmt = partial(v, keywords={"with"}, parens={"with"})
         else:
             self.visit_except_clause = partial(v, keywords={"except"}, parens=Ø)
-        self.visit_with_stmt = partial(v, keywords={"with"}, parens=Ø)
-        self.visit_funcdef = partial(v, keywords={"def"}, parens=Ø)
+            self.visit_with_stmt = partial(v, keywords={"with"}, parens=Ø)
         self.visit_classdef = partial(v, keywords={"class"}, parens=Ø)
         self.visit_expr_stmt = partial(v, keywords=Ø, parens=ASSIGNMENTS)
         self.visit_return_stmt = partial(v, keywords={"return"}, parens={"return"})
@@ -477,7 +529,10 @@ def left_hand_split(line: Line, _feature
             current_leaves is body_leaves
             and leaf.type in CLOSING_BRACKETS
             and leaf.opening_bracket is matching_bracket
+            and isinstance(matching_bracket, Leaf)
         ):
+            ensure_visible(leaf)
+            ensure_visible(matching_bracket)
             current_leaves = tail_leaves if body_leaves else head_leaves
         current_leaves.append(leaf)
         if current_leaves is head_leaves:
@@ -845,11 +900,26 @@ def normalize_invisible_parens(
             check_lpar = True
 
         if check_lpar:
-            if child.type == syms.atom:
+            if (
+                preview
+                and child.type == syms.atom
+                and node.type == syms.for_stmt
+                and isinstance(child.prev_sibling, Leaf)
+                and child.prev_sibling.type == token.NAME
+                and child.prev_sibling.value == "for"
+            ):
+                if maybe_make_parens_invisible_in_atom(
+                    child,
+                    parent=node,
+                    remove_brackets_around_comma=True,
+                ):
+                    wrap_in_parentheses(node, child, visible=False)
+            elif preview and isinstance(child, Node) and node.type == syms.with_stmt:
+                remove_with_parens(child, node)
+            elif child.type == syms.atom:
                 if maybe_make_parens_invisible_in_atom(
                     child,
                     parent=node,
-                    preview=preview,
                 ):
                     wrap_in_parentheses(node, child, visible=False)
             elif is_one_tuple(child):
@@ -867,42 +937,127 @@ def normalize_invisible_parens(
                     node.insert_child(index, Leaf(token.LPAR, ""))
                     node.append_child(Leaf(token.RPAR, ""))
                 break
+            elif (
+                index == 1
+                and child.type == token.STAR
+                and node.type == syms.except_clause
+            ):
+                # In except* (PEP 654), the star is actually part of
+                # of the keyword. So we need to skip the insertion of
+                # invisible parentheses to work more precisely.
+                continue
 
             elif not (isinstance(child, Leaf) and is_multiline_string(child)):
                 wrap_in_parentheses(node, child, visible=False)
 
-        check_lpar = isinstance(child, Leaf) and child.value in parens_after
+        comma_check = child.type == token.COMMA if preview else False
+
+        check_lpar = isinstance(child, Leaf) and (
+            child.value in parens_after or comma_check
+        )
+
+
+def remove_await_parens(node: Node) -> None:
+    if node.children[0].type == token.AWAIT and len(node.children) > 1:
+        if (
+            node.children[1].type == syms.atom
+            and node.children[1].children[0].type == token.LPAR
+        ):
+            if maybe_make_parens_invisible_in_atom(
+                node.children[1],
+                parent=node,
+                remove_brackets_around_comma=True,
+            ):
+                wrap_in_parentheses(node, node.children[1], visible=False)
+
+            # Since await is an expression we shouldn't remove
+            # brackets in cases where this would change
+            # the AST due to operator precedence.
+            # Therefore we only aim to remove brackets around
+            # power nodes that aren't also await expressions themselves.
+            # https://peps.python.org/pep-0492/#updated-operator-precedence-table
+            # N.B. We've still removed any redundant nested brackets though :)
+            opening_bracket = cast(Leaf, node.children[1].children[0])
+            closing_bracket = cast(Leaf, node.children[1].children[-1])
+            bracket_contents = cast(Node, node.children[1].children[1])
+            if bracket_contents.type != syms.power:
+                ensure_visible(opening_bracket)
+                ensure_visible(closing_bracket)
+            elif (
+                bracket_contents.type == syms.power
+                and bracket_contents.children[0].type == token.AWAIT
+            ):
+                ensure_visible(opening_bracket)
+                ensure_visible(closing_bracket)
+                # If we are in a nested await then recurse down.
+                remove_await_parens(bracket_contents)
+
+
+def remove_with_parens(node: Node, parent: Node) -> None:
+    """Recursively hide optional parens in `with` statements."""
+    # Removing all unnecessary parentheses in with statements in one pass is a tad
+    # complex as different variations of bracketed statements result in pretty
+    # different parse trees:
+    #
+    # with (open("file")) as f:                       # this is an asexpr_test
+    #     ...
+    #
+    # with (open("file") as f):                       # this is an atom containing an
+    #     ...                                         # asexpr_test
+    #
+    # with (open("file")) as f, (open("file")) as f:  # this is asexpr_test, COMMA,
+    #     ...                                         # asexpr_test
+    #
+    # with (open("file") as f, open("file") as f):    # an atom containing a
+    #     ...                                         # testlist_gexp which then
+    #                                                 # contains multiple asexpr_test(s)
+    if node.type == syms.atom:
+        if maybe_make_parens_invisible_in_atom(
+            node,
+            parent=parent,
+            remove_brackets_around_comma=True,
+        ):
+            wrap_in_parentheses(parent, node, visible=False)
+        if isinstance(node.children[1], Node):
+            remove_with_parens(node.children[1], node)
+    elif node.type == syms.testlist_gexp:
+        for child in node.children:
+            if isinstance(child, Node):
+                remove_with_parens(child, node)
+    elif node.type == syms.asexpr_test and not any(
+        leaf.type == token.COLONEQUAL for leaf in node.leaves()
+    ):
+        if maybe_make_parens_invisible_in_atom(
+            node.children[0],
+            parent=node,
+            remove_brackets_around_comma=True,
+        ):
+            wrap_in_parentheses(node, node.children[0], visible=False)
 
 
 def maybe_make_parens_invisible_in_atom(
     node: LN,
     parent: LN,
-    preview: bool = False,
+    remove_brackets_around_comma: bool = False,
 ) -> bool:
     """If it's safe, make the parens in the atom `node` invisible, recursively.
     Additionally, remove repeated, adjacent invisible parens from the atom `node`
     as they are redundant.
 
     Returns whether the node should itself be wrapped in invisible parentheses.
-
     """
     if (
-        preview
-        and parent.type == syms.for_stmt
-        and isinstance(node.prev_sibling, Leaf)
-        and node.prev_sibling.type == token.NAME
-        and node.prev_sibling.value == "for"
-    ):
-        for_stmt_check = False
-    else:
-        for_stmt_check = True
-
-    if (
         node.type != syms.atom
         or is_empty_tuple(node)
         or is_one_tuple(node)
         or (is_yield(node) and parent.type != syms.expr_stmt)
-        or (max_delimiter_priority_in_atom(node) >= COMMA_PRIORITY and for_stmt_check)
+        or (
+            # This condition tries to prevent removing non-optional brackets
+            # around a tuple, however, can be a bit overzealous so we provide
+            # and option to skip this check for `for` and `with` statements.
+            not remove_brackets_around_comma
+            and max_delimiter_priority_in_atom(node) >= COMMA_PRIORITY
+        )
     ):
         return False
 
@@ -925,7 +1080,11 @@ def maybe_make_parens_invisible_in_atom(
         # make parentheses invisible
         first.value = ""
         last.value = ""
-        maybe_make_parens_invisible_in_atom(middle, parent=parent, preview=preview)
+        maybe_make_parens_invisible_in_atom(
+            middle,
+            parent=parent,
+            remove_brackets_around_comma=remove_brackets_around_comma,
+        )
 
         if is_atom_with_invisible_parens(middle):
             # Strip the invisible parens from `middle` by replacing
diff -pruN 22.3.0-1/src/black/lines.py 22.6.0-1/src/black/lines.py
--- 22.3.0-1/src/black/lines.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/lines.py	2022-06-28 00:33:35.000000000 +0000
@@ -168,6 +168,13 @@ class Line:
             and self.leaves[0].value.startswith(('"""', "'''"))
         )
 
+    @property
+    def opens_block(self) -> bool:
+        """Does this line open a new level of indentation."""
+        if len(self.leaves) == 0:
+            return False
+        return self.leaves[-1].type == token.COLON
+
     def contains_standalone_comments(self, depth_limit: int = sys.maxsize) -> bool:
         """If so, needs to be split before emitting."""
         for leaf in self.leaves:
@@ -513,6 +520,12 @@ class EmptyLineTracker:
         ):
             return before, 1
 
+        if (
+            Preview.remove_block_trailing_newline in current_line.mode
+            and self.previous_line
+            and self.previous_line.opens_block
+        ):
+            return 0, 0
         return before, 0
 
     def _maybe_empty_lines_for_class_or_def(
diff -pruN 22.3.0-1/src/black/mode.py 22.6.0-1/src/black/mode.py
--- 22.3.0-1/src/black/mode.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/mode.py	2022-06-28 00:33:35.000000000 +0000
@@ -30,6 +30,7 @@ class TargetVersion(Enum):
     PY38 = 8
     PY39 = 9
     PY310 = 10
+    PY311 = 11
 
 
 class Feature(Enum):
@@ -47,6 +48,8 @@ class Feature(Enum):
     PATTERN_MATCHING = 11
     UNPACKING_ON_FLOW = 12
     ANN_ASSIGN_EXTENDED_RHS = 13
+    EXCEPT_STAR = 14
+    VARIADIC_GENERICS = 15
     FORCE_OPTIONAL_PARENTHESES = 50
 
     # __future__ flags
@@ -116,6 +119,22 @@ VERSION_TO_FEATURES: Dict[TargetVersion,
         Feature.ANN_ASSIGN_EXTENDED_RHS,
         Feature.PATTERN_MATCHING,
     },
+    TargetVersion.PY311: {
+        Feature.F_STRINGS,
+        Feature.NUMERIC_UNDERSCORES,
+        Feature.TRAILING_COMMA_IN_CALL,
+        Feature.TRAILING_COMMA_IN_DEF,
+        Feature.ASYNC_KEYWORDS,
+        Feature.FUTURE_ANNOTATIONS,
+        Feature.ASSIGNMENT_EXPRESSIONS,
+        Feature.RELAXED_DECORATORS,
+        Feature.POS_ONLY_ARGUMENTS,
+        Feature.UNPACKING_ON_FLOW,
+        Feature.ANN_ASSIGN_EXTENDED_RHS,
+        Feature.PATTERN_MATCHING,
+        Feature.EXCEPT_STAR,
+        Feature.VARIADIC_GENERICS,
+    },
 }
 
 
@@ -129,6 +148,9 @@ class Preview(Enum):
     string_processing = auto()
     remove_redundant_parens = auto()
     one_element_subscript = auto()
+    annotation_parens = auto()
+    long_docstring_quotes_on_newline = auto()
+    remove_block_trailing_newline = auto()
 
 
 class Deprecated(UserWarning):
diff -pruN 22.3.0-1/src/black/nodes.py 22.6.0-1/src/black/nodes.py
--- 22.3.0-1/src/black/nodes.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/black/nodes.py	2022-06-28 00:33:35.000000000 +0000
@@ -120,6 +120,7 @@ TEST_DESCENDANTS: Final = {
     syms.term,
     syms.power,
 }
+TYPED_NAMES: Final = {syms.tname, syms.tname_star}
 ASSIGNMENTS: Final = {
     "=",
     "+=",
@@ -243,6 +244,14 @@ def whitespace(leaf: Leaf, *, complex_su
                     # that, too.
                     return prevp.prefix
 
+        elif (
+            prevp.type == token.STAR
+            and parent_type(prevp) == syms.star_expr
+            and parent_type(prevp.parent) == syms.subscriptlist
+        ):
+            # No space between typevar tuples.
+            return NO
+
         elif prevp.type in VARARGS_SPECIALS:
             if is_vararg(prevp, within=VARARGS_PARENTS | UNPACKING_PARENTS):
                 return NO
@@ -281,7 +290,7 @@ def whitespace(leaf: Leaf, *, complex_su
             return NO
 
         if t == token.EQUAL:
-            if prev.type != syms.tname:
+            if prev.type not in TYPED_NAMES:
                 return NO
 
         elif prev.type == token.EQUAL:
@@ -292,7 +301,7 @@ def whitespace(leaf: Leaf, *, complex_su
         elif prev.type != token.COMMA:
             return NO
 
-    elif p.type == syms.tname:
+    elif p.type in TYPED_NAMES:
         # type names
         if not prev:
             prevp = preceding_leaf(p)
@@ -401,6 +410,10 @@ def whitespace(leaf: Leaf, *, complex_su
     elif p.type == syms.sliceop:
         return NO
 
+    elif p.type == syms.except_clause:
+        if t == token.STAR:
+            return NO
+
     return SPACE
 
 
@@ -841,3 +854,7 @@ def is_rpar_token(nl: NL) -> TypeGuard[L
 
 def is_string_token(nl: NL) -> TypeGuard[Leaf]:
     return nl.type == token.STRING
+
+
+def is_number_token(nl: NL) -> TypeGuard[Leaf]:
+    return nl.type == token.NUMBER
diff -pruN 22.3.0-1/src/blib2to3/Grammar.txt 22.6.0-1/src/blib2to3/Grammar.txt
--- 22.3.0-1/src/blib2to3/Grammar.txt	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/blib2to3/Grammar.txt	2022-06-28 00:33:35.000000000 +0000
@@ -24,7 +24,7 @@ parameters: '(' [typedargslist] ')'
 #     arguments = argument (',' argument)*
 #     argument = tfpdef ['=' test]
 #     kwargs = '**' tname [',']
-#     args = '*' [tname]
+#     args = '*' [tname_star]
 #     kwonly_kwargs = (',' argument)* [',' [kwargs]]
 #     args_kwonly_kwargs = args kwonly_kwargs | kwargs
 #     poskeyword_args_kwonly_kwargs = arguments [',' [args_kwonly_kwargs]]
@@ -34,14 +34,15 @@ parameters: '(' [typedargslist] ')'
 # It needs to be fully expanded to allow our LL(1) parser to work on it.
 
 typedargslist: tfpdef ['=' test] (',' tfpdef ['=' test])* ',' '/' [
-                     ',' [((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])*
+                     ',' [((tfpdef ['=' test] ',')* ('*' [tname_star] (',' tname ['=' test])*
                             [',' ['**' tname [',']]] | '**' tname [','])
                      | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])]
-                ] | ((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])*
+                ] | ((tfpdef ['=' test] ',')* ('*' [tname_star] (',' tname ['=' test])*
                      [',' ['**' tname [',']]] | '**' tname [','])
                      | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])
 
 tname: NAME [':' test]
+tname_star: NAME [':' (test|star_expr)]
 tfpdef: tname | '(' tfplist ')'
 tfplist: tfpdef (',' tfpdef)* [',']
 
@@ -118,7 +119,7 @@ try_stmt: ('try' ':' suite
 with_stmt: 'with' asexpr_test (',' asexpr_test)*  ':' suite
 
 # NB compile.c makes sure that the default except clause is last
-except_clause: 'except' [test [(',' | 'as') test]]
+except_clause: 'except' ['*'] [test [(',' | 'as') test]]
 suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
 
 # Backward compatibility cruft to support:
@@ -163,7 +164,7 @@ listmaker: (namedexpr_test|star_expr) (
 testlist_gexp: (namedexpr_test|star_expr) ( old_comp_for | (',' (namedexpr_test|star_expr))* [','] )
 lambdef: 'lambda' [varargslist] ':' test
 trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
-subscriptlist: subscript (',' subscript)* [',']
+subscriptlist: (subscript|star_expr) (',' (subscript|star_expr))* [',']
 subscript: test [':=' test] | [test] ':' [test] [sliceop]
 sliceop: ':' [test]
 exprlist: (expr|star_expr) (',' (expr|star_expr))* [',']
diff -pruN 22.3.0-1/src/blib2to3/pygram.py 22.6.0-1/src/blib2to3/pygram.py
--- 22.3.0-1/src/blib2to3/pygram.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/src/blib2to3/pygram.py	2022-06-28 00:33:35.000000000 +0000
@@ -123,6 +123,7 @@ class _python_symbols(Symbols):
     tfpdef: int
     tfplist: int
     tname: int
+    tname_star: int
     trailer: int
     try_stmt: int
     typedargslist: int
diff -pruN 22.3.0-1/tests/data/async_as_identifier.py 22.6.0-1/tests/data/async_as_identifier.py
--- 22.3.0-1/tests/data/async_as_identifier.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/async_as_identifier.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,49 +0,0 @@
-def async():
-    pass
-
-
-def await():
-    pass
-
-
-await = lambda: None
-async = lambda: None
-async()
-await()
-
-
-def sync_fn():
-    await = lambda: None
-    async = lambda: None
-    async()
-    await()
-
-
-async def async_fn():
-    await async_fn()
-
-
-# output
-def async():
-    pass
-
-
-def await():
-    pass
-
-
-await = lambda: None
-async = lambda: None
-async()
-await()
-
-
-def sync_fn():
-    await = lambda: None
-    async = lambda: None
-    async()
-    await()
-
-
-async def async_fn():
-    await async_fn()
diff -pruN 22.3.0-1/tests/data/attribute_access_on_number_literals.py 22.6.0-1/tests/data/attribute_access_on_number_literals.py
--- 22.3.0-1/tests/data/attribute_access_on_number_literals.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/attribute_access_on_number_literals.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,47 +0,0 @@
-x = 123456789 .bit_count()
-x = (123456).__abs__()
-x = .1.is_integer()
-x = 1. .imag
-x = 1E+1.imag
-x = 1E-1.real
-x = 123456789.123456789.hex()
-x = 123456789.123456789E123456789 .real
-x = 123456789E123456789 .conjugate()
-x = 123456789J.real
-x = 123456789.123456789J.__add__(0b1011.bit_length())
-x = 0XB1ACC.conjugate()
-x = 0B1011 .conjugate()
-x = 0O777 .real
-x = 0.000000006  .hex()
-x = -100.0000J
-
-if 10 .real:
-    ...
-
-y = 100[no]
-y = 100(no)
-
-# output
-
-x = (123456789).bit_count()
-x = (123456).__abs__()
-x = (0.1).is_integer()
-x = (1.0).imag
-x = (1e1).imag
-x = (1e-1).real
-x = (123456789.123456789).hex()
-x = (123456789.123456789e123456789).real
-x = (123456789e123456789).conjugate()
-x = 123456789j.real
-x = 123456789.123456789j.__add__(0b1011.bit_length())
-x = 0xB1ACC.conjugate()
-x = 0b1011.conjugate()
-x = 0o777.real
-x = (0.000000006).hex()
-x = -100.0000j
-
-if (10).real:
-    ...
-
-y = 100[no]
-y = 100(no)
diff -pruN 22.3.0-1/tests/data/beginning_backslash.py 22.6.0-1/tests/data/beginning_backslash.py
--- 22.3.0-1/tests/data/beginning_backslash.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/beginning_backslash.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-\
-
-
-
-
-
-print("hello, world")
-
-# output
-
-
-print("hello, world")
diff -pruN 22.3.0-1/tests/data/blackd_diff.diff 22.6.0-1/tests/data/blackd_diff.diff
--- 22.3.0-1/tests/data/blackd_diff.diff	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/blackd_diff.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
---- [Deterministic header]
-+++ [Deterministic header]
-@@ -1,6 +1,5 @@
--def abc ():
--    return ["hello", "world",
--            "!"]
-+def abc():
-+    return ["hello", "world", "!"]
- 
--print(   "Incorrect formatting"    
--)
-+
-+print("Incorrect formatting")
diff -pruN 22.3.0-1/tests/data/blackd_diff.py 22.6.0-1/tests/data/blackd_diff.py
--- 22.3.0-1/tests/data/blackd_diff.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/blackd_diff.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-def abc ():
-    return ["hello", "world",
-            "!"]
-
-print(   "Incorrect formatting"    
-)
diff -pruN 22.3.0-1/tests/data/bracketmatch.py 22.6.0-1/tests/data/bracketmatch.py
--- 22.3.0-1/tests/data/bracketmatch.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/bracketmatch.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-for ((x in {}) or {})['a'] in x:
-    pass
-pem_spam = lambda l, spam = {
-    "x": 3
-}: not spam.get(l.strip())
-lambda x=lambda y={1: 3}: y['x':lambda y: {1: 2}]: x
-
-
-# output
-
-
-for ((x in {}) or {})["a"] in x:
-    pass
-pem_spam = lambda l, spam={"x": 3}: not spam.get(l.strip())
-lambda x=lambda y={1: 3}: y["x" : lambda y: {1: 2}]: x
diff -pruN 22.3.0-1/tests/data/cantfit.py 22.6.0-1/tests/data/cantfit.py
--- 22.3.0-1/tests/data/cantfit.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/cantfit.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,107 +0,0 @@
-# long variable name
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 0
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 1  # with a comment
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
-    1, 2, 3
-]
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function()
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
-    arg1, arg2, arg3
-)
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
-    [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
-)
-# long function name
-normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying()
-normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
-    arg1, arg2, arg3
-)
-normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
-    [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
-)
-# long arguments
-normal_name = normal_function_name(
-    "but with super long string arguments that on their own exceed the line limit so there's no way it can ever fit",
-    "eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs",
-    this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it=0,
-)
-string_variable_name = (
-    "a string that is waaaaaaaayyyyyyyy too long, even in parens, there's nothing you can do"  # noqa
-)
-for key in """
-    hostname
-    port
-    username
-""".split():
-    if key in self.connect_kwargs:
-        raise ValueError(err.format(key))
-concatenated_strings = "some strings that are " "concatenated implicitly, so if you put them on separate " "lines it will fit"
-del concatenated_strings, string_variable_name, normal_function_name, normal_name, need_more_to_make_the_line_long_enough
-
-
-# output
-
-
-# long variable name
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
-    0
-)
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
-    1  # with a comment
-)
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
-    1,
-    2,
-    3,
-]
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
-    function()
-)
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
-    arg1, arg2, arg3
-)
-this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
-    [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
-)
-# long function name
-normal_name = (
-    but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying()
-)
-normal_name = (
-    but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
-        arg1, arg2, arg3
-    )
-)
-normal_name = (
-    but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
-        [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
-    )
-)
-# long arguments
-normal_name = normal_function_name(
-    "but with super long string arguments that on their own exceed the line limit so"
-    " there's no way it can ever fit",
-    "eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs"
-    " with spam and eggs and spam with eggs",
-    this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it=0,
-)
-string_variable_name = "a string that is waaaaaaaayyyyyyyy too long, even in parens, there's nothing you can do"  # noqa
-for key in """
-    hostname
-    port
-    username
-""".split():
-    if key in self.connect_kwargs:
-        raise ValueError(err.format(key))
-concatenated_strings = (
-    "some strings that are "
-    "concatenated implicitly, so if you put them on separate "
-    "lines it will fit"
-)
-del (
-    concatenated_strings,
-    string_variable_name,
-    normal_function_name,
-    normal_name,
-    need_more_to_make_the_line_long_enough,
-)
diff -pruN 22.3.0-1/tests/data/class_blank_parentheses.py 22.6.0-1/tests/data/class_blank_parentheses.py
--- 22.3.0-1/tests/data/class_blank_parentheses.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/class_blank_parentheses.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,58 +0,0 @@
-class SimpleClassWithBlankParentheses():
-    pass
-class ClassWithSpaceParentheses ( ):
-    first_test_data = 90
-    second_test_data = 100
-    def test_func(self):
-        return None
-class ClassWithEmptyFunc(object):
-
-    def func_with_blank_parentheses():
-        return 5
-
-
-def public_func_with_blank_parentheses():
-    return None
-def class_under_the_func_with_blank_parentheses():
-    class InsideFunc():
-        pass
-class NormalClass (
-):
-    def func_for_testing(self, first, second):
-        sum = first + second
-        return sum
-
-
-# output
-
-
-class SimpleClassWithBlankParentheses:
-    pass
-
-
-class ClassWithSpaceParentheses:
-    first_test_data = 90
-    second_test_data = 100
-
-    def test_func(self):
-        return None
-
-
-class ClassWithEmptyFunc(object):
-    def func_with_blank_parentheses():
-        return 5
-
-
-def public_func_with_blank_parentheses():
-    return None
-
-
-def class_under_the_func_with_blank_parentheses():
-    class InsideFunc:
-        pass
-
-
-class NormalClass:
-    def func_for_testing(self, first, second):
-        sum = first + second
-        return sum
diff -pruN 22.3.0-1/tests/data/class_methods_new_line.py 22.6.0-1/tests/data/class_methods_new_line.py
--- 22.3.0-1/tests/data/class_methods_new_line.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/class_methods_new_line.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,270 +0,0 @@
-class ClassSimplest:
-    pass
-class ClassWithSingleField:
-    a = 1
-class ClassWithJustTheDocstring:
-    """Just a docstring."""
-class ClassWithInit:
-    def __init__(self):
-        pass
-class ClassWithTheDocstringAndInit:
-    """Just a docstring."""
-    def __init__(self):
-        pass
-class ClassWithInitAndVars:
-    cls_var = 100
-    def __init__(self):
-        pass
-class ClassWithInitAndVarsAndDocstring:
-    """Test class"""
-    cls_var = 100
-    def __init__(self):
-        pass
-class ClassWithDecoInit:
-    @deco
-    def __init__(self):
-        pass
-class ClassWithDecoInitAndVars:
-    cls_var = 100
-    @deco
-    def __init__(self):
-        pass
-class ClassWithDecoInitAndVarsAndDocstring:
-    """Test class"""
-    cls_var = 100
-    @deco
-    def __init__(self):
-        pass
-class ClassSimplestWithInner:
-    class Inner:
-        pass
-class ClassSimplestWithInnerWithDocstring:
-    class Inner:
-        """Just a docstring."""
-        def __init__(self):
-            pass
-class ClassWithSingleFieldWithInner:
-    a = 1
-    class Inner:
-        pass
-class ClassWithJustTheDocstringWithInner:
-    """Just a docstring."""
-    class Inner:
-        pass
-class ClassWithInitWithInner:
-    class Inner:
-        pass
-    def __init__(self):
-        pass
-class ClassWithInitAndVarsWithInner:
-    cls_var = 100
-    class Inner:
-        pass
-    def __init__(self):
-        pass
-class ClassWithInitAndVarsAndDocstringWithInner:
-    """Test class"""
-    cls_var = 100
-    class Inner:
-        pass
-    def __init__(self):
-        pass
-class ClassWithDecoInitWithInner:
-    class Inner:
-        pass
-    @deco
-    def __init__(self):
-        pass
-class ClassWithDecoInitAndVarsWithInner:
-    cls_var = 100
-    class Inner:
-        pass
-    @deco
-    def __init__(self):
-        pass
-class ClassWithDecoInitAndVarsAndDocstringWithInner:
-    """Test class"""
-    cls_var = 100
-    class Inner:
-        pass
-    @deco
-    def __init__(self):
-        pass
-class ClassWithDecoInitAndVarsAndDocstringWithInner2:
-    """Test class"""
-    class Inner:
-        pass
-    cls_var = 100
-    @deco
-    def __init__(self):
-        pass
-
-
-# output
-
-
-class ClassSimplest:
-    pass
-
-
-class ClassWithSingleField:
-    a = 1
-
-
-class ClassWithJustTheDocstring:
-    """Just a docstring."""
-
-
-class ClassWithInit:
-    def __init__(self):
-        pass
-
-
-class ClassWithTheDocstringAndInit:
-    """Just a docstring."""
-
-    def __init__(self):
-        pass
-
-
-class ClassWithInitAndVars:
-    cls_var = 100
-
-    def __init__(self):
-        pass
-
-
-class ClassWithInitAndVarsAndDocstring:
-    """Test class"""
-
-    cls_var = 100
-
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInit:
-    @deco
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInitAndVars:
-    cls_var = 100
-
-    @deco
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInitAndVarsAndDocstring:
-    """Test class"""
-
-    cls_var = 100
-
-    @deco
-    def __init__(self):
-        pass
-
-
-class ClassSimplestWithInner:
-    class Inner:
-        pass
-
-
-class ClassSimplestWithInnerWithDocstring:
-    class Inner:
-        """Just a docstring."""
-
-        def __init__(self):
-            pass
-
-
-class ClassWithSingleFieldWithInner:
-    a = 1
-
-    class Inner:
-        pass
-
-
-class ClassWithJustTheDocstringWithInner:
-    """Just a docstring."""
-
-    class Inner:
-        pass
-
-
-class ClassWithInitWithInner:
-    class Inner:
-        pass
-
-    def __init__(self):
-        pass
-
-
-class ClassWithInitAndVarsWithInner:
-    cls_var = 100
-
-    class Inner:
-        pass
-
-    def __init__(self):
-        pass
-
-
-class ClassWithInitAndVarsAndDocstringWithInner:
-    """Test class"""
-
-    cls_var = 100
-
-    class Inner:
-        pass
-
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInitWithInner:
-    class Inner:
-        pass
-
-    @deco
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInitAndVarsWithInner:
-    cls_var = 100
-
-    class Inner:
-        pass
-
-    @deco
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInitAndVarsAndDocstringWithInner:
-    """Test class"""
-
-    cls_var = 100
-
-    class Inner:
-        pass
-
-    @deco
-    def __init__(self):
-        pass
-
-
-class ClassWithDecoInitAndVarsAndDocstringWithInner2:
-    """Test class"""
-
-    class Inner:
-        pass
-
-    cls_var = 100
-
-    @deco
-    def __init__(self):
-        pass
diff -pruN 22.3.0-1/tests/data/collections.py 22.6.0-1/tests/data/collections.py
--- 22.3.0-1/tests/data/collections.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/collections.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,174 +0,0 @@
-import core, time, a
-
-from . import A, B, C
-
-# keeps existing trailing comma
-from foo import (
-    bar,
-)
-
-# also keeps existing structure
-from foo import (
-    baz,
-    qux,
-)
-
-# `as` works as well
-from foo import (
-    xyzzy as magic,
-)
-
-a = {1,2,3,}
-b = {
-1,2,
-     3}
-c = {
-    1,
-    2,
-    3,
-}
-x = 1,
-y = narf(),
-nested = {(1,2,3),(4,5,6),}
-nested_no_trailing_comma = {(1,2,3),(4,5,6)}
-nested_long_lines = ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "cccccccccccccccccccccccccccccccccccccccc", (1, 2, 3), "dddddddddddddddddddddddddddddddddddddddd"]
-{"oneple": (1,),}
-{"oneple": (1,)}
-['ls', 'lsoneple/%s' % (foo,)]
-x = {"oneple": (1,)}
-y = {"oneple": (1,),}
-assert False, ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wraps %s" % bar)
-
-# looping over a 1-tuple should also not get wrapped
-for x in (1,):
-    pass
-for (x,) in (1,), (2,), (3,):
-    pass
-
-[1, 2, 3,]
-
-division_result_tuple = (6/2,)
-print("foo %r", (foo.bar,))
-
-if True:
-    IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING = (
-        Config.IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING
-        | {pylons.controllers.WSGIController}
-    )
-
-if True:
-    ec2client.get_waiter('instance_stopped').wait(
-        InstanceIds=[instance.id],
-        WaiterConfig={
-            'Delay': 5,
-        })
-    ec2client.get_waiter("instance_stopped").wait(
-        InstanceIds=[instance.id],
-        WaiterConfig={"Delay": 5,},
-    )
-    ec2client.get_waiter("instance_stopped").wait(
-        InstanceIds=[instance.id], WaiterConfig={"Delay": 5,},
-    )
-
-# output
-
-
-import core, time, a
-
-from . import A, B, C
-
-# keeps existing trailing comma
-from foo import (
-    bar,
-)
-
-# also keeps existing structure
-from foo import (
-    baz,
-    qux,
-)
-
-# `as` works as well
-from foo import (
-    xyzzy as magic,
-)
-
-a = {
-    1,
-    2,
-    3,
-}
-b = {1, 2, 3}
-c = {
-    1,
-    2,
-    3,
-}
-x = (1,)
-y = (narf(),)
-nested = {
-    (1, 2, 3),
-    (4, 5, 6),
-}
-nested_no_trailing_comma = {(1, 2, 3), (4, 5, 6)}
-nested_long_lines = [
-    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
-    "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
-    "cccccccccccccccccccccccccccccccccccccccc",
-    (1, 2, 3),
-    "dddddddddddddddddddddddddddddddddddddddd",
-]
-{
-    "oneple": (1,),
-}
-{"oneple": (1,)}
-["ls", "lsoneple/%s" % (foo,)]
-x = {"oneple": (1,)}
-y = {
-    "oneple": (1,),
-}
-assert False, (
-    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wraps %s"
-    % bar
-)
-
-# looping over a 1-tuple should also not get wrapped
-for x in (1,):
-    pass
-for (x,) in (1,), (2,), (3,):
-    pass
-
-[
-    1,
-    2,
-    3,
-]
-
-division_result_tuple = (6 / 2,)
-print("foo %r", (foo.bar,))
-
-if True:
-    IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING = (
-        Config.IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING
-        | {pylons.controllers.WSGIController}
-    )
-
-if True:
-    ec2client.get_waiter("instance_stopped").wait(
-        InstanceIds=[instance.id],
-        WaiterConfig={
-            "Delay": 5,
-        },
-    )
-    ec2client.get_waiter("instance_stopped").wait(
-        InstanceIds=[instance.id],
-        WaiterConfig={
-            "Delay": 5,
-        },
-    )
-    ec2client.get_waiter("instance_stopped").wait(
-        InstanceIds=[instance.id],
-        WaiterConfig={
-            "Delay": 5,
-        },
-    )
diff -pruN 22.3.0-1/tests/data/comment_after_escaped_newline.py 22.6.0-1/tests/data/comment_after_escaped_newline.py
--- 22.3.0-1/tests/data/comment_after_escaped_newline.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comment_after_escaped_newline.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-def bob(): \
-         # pylint: disable=W9016
-    pass
-
-
-def bobtwo(): \
-    \
-  # some comment here
-    pass
-
-# output
-
-def bob():  # pylint: disable=W9016
-    pass
-
-
-def bobtwo():  # some comment here
-    pass
diff -pruN 22.3.0-1/tests/data/comments2.py 22.6.0-1/tests/data/comments2.py
--- 22.3.0-1/tests/data/comments2.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments2.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,342 +0,0 @@
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent  # NOT DRY
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent as component  # DRY
-)
-
-# Please keep __all__ alphabetized within each category.
-
-__all__ = [
-    # Super-special typing primitives.
-    'Any',
-    'Callable',
-    'ClassVar',
-
-    # ABCs (from collections.abc).
-    'AbstractSet',  # collections.abc.Set.
-    'ByteString',
-    'Container',
-
-    # Concrete collection types.
-    'Counter',
-    'Deque',
-    'Dict',
-    'DefaultDict',
-    'List',
-    'Set',
-    'FrozenSet',
-    'NamedTuple',  # Not really a type.
-    'Generator',
-]
-
-not_shareables = [
-    # singletons
-    True,
-    False,
-    NotImplemented, ...,
-    # builtin types and objects
-    type,
-    object,
-    object(),
-    Exception(),
-    42,
-    100.0,
-    "spam",
-    # user-defined types and objects
-    Cheese,
-    Cheese("Wensleydale"),
-    SubBytes(b"spam"),
-]
-
-if 'PYTHON' in os.environ:
-    add_compiler(compiler_from_env())
-else:
-    # for compiler in compilers.values():
-         # add_compiler(compiler)
-    add_compiler(compilers[(7.0, 32)])
-    # add_compiler(compilers[(7.1, 64)])
-
-# Comment before function.
-def inline_comments_in_brackets_ruin_everything():
-    if typedargslist:
-        parameters.children = [
-            children[0],  # (1
-            body,
-            children[-1]  # )1
-        ]
-        parameters.children = [
-            children[0],
-            body,
-            children[-1],  # type: ignore
-        ]
-    else:
-        parameters.children = [
-            parameters.children[0],  # (2 what if this was actually long
-            body,
-            parameters.children[-1],  # )2
-        ]
-        parameters.children = [parameters.what_if_this_was_actually_long.children[0], body, parameters.children[-1]]  # type: ignore
-    if (self._proc is not None
-            # has the child process finished?
-            and self._returncode is None
-            # the child process has finished, but the
-            # transport hasn't been notified yet?
-            and self._proc.poll() is None):
-        pass
-    # no newline before or after
-    short = [
-     # one
-     1,
-     # two
-     2]
-
-    # no newline after
-    call(arg1, arg2, """
-short
-""", arg3=True)
-
-    ############################################################################
-
-    call2(
-    #short
-    arg1,
-    #but
-    arg2,
-    #multiline
-    """
-short
-""",
-    # yup
-    arg3=True)
-    lcomp = [
-        element  # yup
-        for element in collection  # yup
-        if element is not None  # right
-    ]
-    lcomp2 = [
-        # hello
-        element
-        # yup
-        for element in collection
-        # right
-        if element is not None
-    ]
-    lcomp3 = [
-        # This one is actually too long to fit in a single line.
-        element.split('\n', 1)[0]
-        # yup
-        for element in collection.select_elements()
-        # right
-        if element is not None
-    ]
-    while True:
-        if False:
-            continue
-
-            # and round and round we go
-        # and round and round we go
-
-   # let's return
-    return Node(
-        syms.simple_stmt,
-        [
-            Node(statement, result),
-            Leaf(token.NEWLINE, '\n')  # FIXME: \r\n?
-        ],
-    )
-
-CONFIG_FILES = [CONFIG_FILE, ] + SHARED_CONFIG_FILES + USER_CONFIG_FILES  # type: Final
-
-class Test:
-    def _init_host(self, parsed) -> None:
-        if (parsed.hostname is None or  # type: ignore
-                not parsed.hostname.strip()):
-            pass
-
-#######################
-### SECTION COMMENT ###
-#######################
-
-
-instruction()#comment with bad spacing
-
-# END COMMENTS
-# MORE END COMMENTS
-
-
-# output
-
-
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent,  # NOT DRY
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent as component,  # DRY
-)
-
-# Please keep __all__ alphabetized within each category.
-
-__all__ = [
-    # Super-special typing primitives.
-    "Any",
-    "Callable",
-    "ClassVar",
-    # ABCs (from collections.abc).
-    "AbstractSet",  # collections.abc.Set.
-    "ByteString",
-    "Container",
-    # Concrete collection types.
-    "Counter",
-    "Deque",
-    "Dict",
-    "DefaultDict",
-    "List",
-    "Set",
-    "FrozenSet",
-    "NamedTuple",  # Not really a type.
-    "Generator",
-]
-
-not_shareables = [
-    # singletons
-    True,
-    False,
-    NotImplemented,
-    ...,
-    # builtin types and objects
-    type,
-    object,
-    object(),
-    Exception(),
-    42,
-    100.0,
-    "spam",
-    # user-defined types and objects
-    Cheese,
-    Cheese("Wensleydale"),
-    SubBytes(b"spam"),
-]
-
-if "PYTHON" in os.environ:
-    add_compiler(compiler_from_env())
-else:
-    # for compiler in compilers.values():
-    # add_compiler(compiler)
-    add_compiler(compilers[(7.0, 32)])
-    # add_compiler(compilers[(7.1, 64)])
-
-# Comment before function.
-def inline_comments_in_brackets_ruin_everything():
-    if typedargslist:
-        parameters.children = [children[0], body, children[-1]]  # (1  # )1
-        parameters.children = [
-            children[0],
-            body,
-            children[-1],  # type: ignore
-        ]
-    else:
-        parameters.children = [
-            parameters.children[0],  # (2 what if this was actually long
-            body,
-            parameters.children[-1],  # )2
-        ]
-        parameters.children = [parameters.what_if_this_was_actually_long.children[0], body, parameters.children[-1]]  # type: ignore
-    if (
-        self._proc is not None
-        # has the child process finished?
-        and self._returncode is None
-        # the child process has finished, but the
-        # transport hasn't been notified yet?
-        and self._proc.poll() is None
-    ):
-        pass
-    # no newline before or after
-    short = [
-        # one
-        1,
-        # two
-        2,
-    ]
-
-    # no newline after
-    call(
-        arg1,
-        arg2,
-        """
-short
-""",
-        arg3=True,
-    )
-
-    ############################################################################
-
-    call2(
-        # short
-        arg1,
-        # but
-        arg2,
-        # multiline
-        """
-short
-""",
-        # yup
-        arg3=True,
-    )
-    lcomp = [
-        element for element in collection if element is not None  # yup  # yup  # right
-    ]
-    lcomp2 = [
-        # hello
-        element
-        # yup
-        for element in collection
-        # right
-        if element is not None
-    ]
-    lcomp3 = [
-        # This one is actually too long to fit in a single line.
-        element.split("\n", 1)[0]
-        # yup
-        for element in collection.select_elements()
-        # right
-        if element is not None
-    ]
-    while True:
-        if False:
-            continue
-
-            # and round and round we go
-        # and round and round we go
-
-    # let's return
-    return Node(
-        syms.simple_stmt,
-        [Node(statement, result), Leaf(token.NEWLINE, "\n")],  # FIXME: \r\n?
-    )
-
-
-CONFIG_FILES = (
-    [
-        CONFIG_FILE,
-    ]
-    + SHARED_CONFIG_FILES
-    + USER_CONFIG_FILES
-)  # type: Final
-
-
-class Test:
-    def _init_host(self, parsed) -> None:
-        if parsed.hostname is None or not parsed.hostname.strip():  # type: ignore
-            pass
-
-
-#######################
-### SECTION COMMENT ###
-#######################
-
-
-instruction()  # comment with bad spacing
-
-# END COMMENTS
-# MORE END COMMENTS
diff -pruN 22.3.0-1/tests/data/comments3.py 22.6.0-1/tests/data/comments3.py
--- 22.3.0-1/tests/data/comments3.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments3.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,47 +0,0 @@
-# The percent-percent comments are Spyder IDE cells.
-
-#%%
-def func():
-    x = """
-    a really long string
-    """
-    lcomp3 = [
-        # This one is actually too long to fit in a single line.
-        element.split("\n", 1)[0]
-        # yup
-        for element in collection.select_elements()
-        # right
-        if element is not None
-    ]
-    # Capture each of the exceptions in the MultiError along with each of their causes and contexts
-    if isinstance(exc_value, MultiError):
-        embedded = []
-        for exc in exc_value.exceptions:
-            if exc not in _seen:
-                embedded.append(
-                    # This should be left alone (before)
-                    traceback.TracebackException.from_exception(
-                        exc,
-                        limit=limit,
-                        lookup_lines=lookup_lines,
-                        capture_locals=capture_locals,
-                        # copy the set of _seen exceptions so that duplicates
-                        # shared between sub-exceptions are not omitted
-                        _seen=set(_seen),
-                    )
-                    # This should be left alone (after)
-                )
-
-    # everything is fine if the expression isn't nested
-    traceback.TracebackException.from_exception(
-        exc,
-        limit=limit,
-        lookup_lines=lookup_lines,
-        capture_locals=capture_locals,
-        # copy the set of _seen exceptions so that duplicates
-        # shared between sub-exceptions are not omitted
-        _seen=set(_seen),
-    )
-
-
-#%%
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/comments4.py 22.6.0-1/tests/data/comments4.py
--- 22.3.0-1/tests/data/comments4.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments4.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,94 +0,0 @@
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent,  # NOT DRY
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent as component,  # DRY
-)
-
-
-class C:
-    @pytest.mark.parametrize(
-        ("post_data", "message"),
-        [
-            # metadata_version errors.
-            (
-                {},
-                "None is an invalid value for Metadata-Version. Error: This field is"
-                " required. see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            (
-                {"metadata_version": "-1"},
-                "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
-                " Version see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            # name errors.
-            (
-                {"metadata_version": "1.2"},
-                "'' is an invalid value for Name. Error: This field is required. see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            (
-                {"metadata_version": "1.2", "name": "foo-"},
-                "'foo-' is an invalid value for Name. Error: Must start and end with a"
-                " letter or numeral and contain only ascii numeric and '.', '_' and"
-                " '-'. see https://packaging.python.org/specifications/core-metadata",
-            ),
-            # version errors.
-            (
-                {"metadata_version": "1.2", "name": "example"},
-                "'' is an invalid value for Version. Error: This field is required. see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            (
-                {"metadata_version": "1.2", "name": "example", "version": "dog"},
-                "'dog' is an invalid value for Version. Error: Must start and end with"
-                " a letter or numeral and contain only ascii numeric and '.', '_' and"
-                " '-'. see https://packaging.python.org/specifications/core-metadata",
-            ),
-        ],
-    )
-    def test_fails_invalid_post_data(
-        self, pyramid_config, db_request, post_data, message
-    ):
-        pyramid_config.testing_securitypolicy(userid=1)
-        db_request.POST = MultiDict(post_data)
-
-
-def foo(list_a, list_b):
-    results = (
-        User.query.filter(User.foo == "bar")
-        .filter(  # Because foo.
-            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
-        )
-        .filter(User.xyz.is_(None))
-        # Another comment about the filtering on is_quux goes here.
-        .filter(db.not_(User.is_pending.astext.cast(db.Boolean).is_(True)))
-        .order_by(User.created_at.desc())
-        .with_for_update(key_share=True)
-        .all()
-    )
-    return results
-
-
-def foo2(list_a, list_b):
-    # Standalone comment reasonably placed.
-    return (
-        User.query.filter(User.foo == "bar")
-        .filter(
-            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
-        )
-        .filter(User.xyz.is_(None))
-    )
-
-
-def foo3(list_a, list_b):
-    return (
-        # Standlone comment but weirdly placed.
-        User.query.filter(User.foo == "bar")
-        .filter(
-            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
-        )
-        .filter(User.xyz.is_(None))
-    )
diff -pruN 22.3.0-1/tests/data/comments5.py 22.6.0-1/tests/data/comments5.py
--- 22.3.0-1/tests/data/comments5.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments5.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,71 +0,0 @@
-while True:
-    if something.changed:
-        do.stuff()  # trailing comment
-        # Comment belongs to the `if` block.
-    # This one belongs to the `while` block.
-
-    # Should this one, too?  I guess so.
-
-# This one is properly standalone now.
-
-for i in range(100):
-    # first we do this
-    if i % 33 == 0:
-        break
-
-    # then we do this
-    print(i)
-    # and finally we loop around
-
-with open(some_temp_file) as f:
-    data = f.read()
-
-try:
-    with open(some_other_file) as w:
-        w.write(data)
-
-except OSError:
-    print("problems")
-
-import sys
-
-
-# leading function comment
-def wat():
-    ...
-    # trailing function comment
-
-
-# SECTION COMMENT
-
-
-# leading 1
-@deco1
-# leading 2
-@deco2(with_args=True)
-# leading 3
-@deco3
-def decorated1():
-    ...
-
-
-# leading 1
-@deco1
-# leading 2
-@deco2(with_args=True)
-# leading function comment
-def decorated1():
-    ...
-
-
-# Note: crappy but inevitable.  The current design of EmptyLineTracker doesn't
-# allow this to work correctly.  The user will have to split those lines by
-# hand.
-some_instruction
-# This comment should be split from `some_instruction` by two lines but isn't.
-def g():
-    ...
-
-
-if __name__ == "__main__":
-    main()
diff -pruN 22.3.0-1/tests/data/comments6.py 22.6.0-1/tests/data/comments6.py
--- 22.3.0-1/tests/data/comments6.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments6.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,118 +0,0 @@
-from typing import Any, Tuple
-
-
-def f(
-    a,  # type: int
-):
-    pass
-
-
-# test type comments
-def f(a, b, c, d, e, f, g, h, i):
-    # type: (int, int, int, int, int, int, int, int, int) -> None
-    pass
-
-
-def f(
-    a,  # type: int
-    b,  # type: int
-    c,  # type: int
-    d,  # type: int
-    e,  # type: int
-    f,  # type: int
-    g,  # type: int
-    h,  # type: int
-    i,  # type: int
-):
-    # type: (...) -> None
-    pass
-
-
-def f(
-    arg,  # type: int
-    *args,  # type: *Any
-    default=False,  # type: bool
-    **kwargs,  # type: **Any
-):
-    # type: (...) -> None
-    pass
-
-
-def f(
-    a,  # type: int
-    b,  # type: int
-    c,  # type: int
-    d,  # type: int
-):
-    # type: (...) -> None
-
-    element = 0  # type: int
-    another_element = 1  # type: float
-    another_element_with_long_name = 2  # type: int
-    another_really_really_long_element_with_a_unnecessarily_long_name_to_describe_what_it_does_enterprise_style = (
-        3
-    )  # type: int
-    an_element_with_a_long_value = calls() or more_calls() and more()  # type: bool
-
-    tup = (
-        another_element,
-        another_really_really_long_element_with_a_unnecessarily_long_name_to_describe_what_it_does_enterprise_style,
-    )  # type: Tuple[int, int]
-
-    a = (
-        element
-        + another_element
-        + another_element_with_long_name
-        + element
-        + another_element
-        + another_element_with_long_name
-    )  # type: int
-
-
-def f(
-    x,  # not a type comment
-    y,  # type: int
-):
-    # type: (...) -> None
-    pass
-
-
-def f(
-    x,  # not a type comment
-):  # type: (int) -> None
-    pass
-
-
-def func(
-    a=some_list[0],  # type: int
-):  # type: () -> int
-    c = call(
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0456,
-        0.0789,
-        a[-1],  # type: ignore
-    )
-
-    c = call(
-        "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa"  # type: ignore
-    )
-
-
-result = (  # aaa
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-)
-
-AAAAAAAAAAAAA = [AAAAAAAAAAAAA] + SHARED_AAAAAAAAAAAAA + USER_AAAAAAAAAAAAA + AAAAAAAAAAAAA  # type: ignore
-
-call_to_some_function_asdf(
-    foo,
-    [AAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBB],  # type: ignore
-)
-
-aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items)))  # type: ignore[arg-type]
diff -pruN 22.3.0-1/tests/data/comments7.py 22.6.0-1/tests/data/comments7.py
--- 22.3.0-1/tests/data/comments7.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments7.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,271 +0,0 @@
-from .config import (
-    Any,
-    Bool,
-    ConfigType,
-    ConfigTypeAttributes,
-    Int,
-    Path,
-    #  String,
-    #  resolve_to_config_type,
-    #  DEFAULT_TYPE_ATTRIBUTES,
-)
-
-
-from .config import (
-    Any,
-    Bool,
-    ConfigType,
-    ConfigTypeAttributes,
-    Int,
-    no_comma_here_yet
-    #  and some comments,
-    #  resolve_to_config_type,
-    #  DEFAULT_TYPE_ATTRIBUTES,
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent  # NOT DRY
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent as component  # DRY
-)
-
-
-result = 1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
-result = (
-    1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-)
-
-result = (
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # aaa
-)
-
-result = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # aaa
-
-
-def func():
-    c = call(
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0789,
-        a[-1],  # type: ignore
-    )
-    c = call(
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0789,
-        a[-1]  # type: ignore
-    )
-    c = call(
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0456,
-        0.0789,
-        a[-1]  # type: ignore
-    )
-
-    # The type: ignore exception only applies to line length, not
-    # other types of formatting.
-    c = call(
-        "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa",  # type: ignore
-        "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa"
-    )
-
-
-class C:
-    @pytest.mark.parametrize(
-        ("post_data", "message"),
-        [
-            # metadata_version errors.
-            (
-                {},
-                "None is an invalid value for Metadata-Version. Error: This field is"
-                " required. see"
-                " https://packaging.python.org/specifications/core-metadata"
-            ),
-            (
-                {"metadata_version": "-1"},
-                "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
-                " Version see"
-                " https://packaging.python.org/specifications/core-metadata"
-            ),
-            # name errors.
-            (
-                {"metadata_version": "1.2"},
-                "'' is an invalid value for Name. Error: This field is required. see"
-                " https://packaging.python.org/specifications/core-metadata"
-            ),
-            (
-                {"metadata_version": "1.2", "name": "foo-"},
-                "'foo-' is an invalid value for Name. Error: Must start and end with a"
-                " letter or numeral and contain only ascii numeric and '.', '_' and"
-                " '-'. see https://packaging.python.org/specifications/core-metadata"
-            ),
-            # version errors.
-            (
-                {"metadata_version": "1.2", "name": "example"},
-                "'' is an invalid value for Version. Error: This field is required. see"
-                " https://packaging.python.org/specifications/core-metadata"
-            ),
-            (
-                {"metadata_version": "1.2", "name": "example", "version": "dog"},
-                "'dog' is an invalid value for Version. Error: Must start and end with"
-                " a letter or numeral and contain only ascii numeric and '.', '_' and"
-                " '-'. see https://packaging.python.org/specifications/core-metadata"
-            )
-        ]
-    )
-    def test_fails_invalid_post_data(
-        self, pyramid_config, db_request, post_data, message
-    ):
-        ...
-
-square = Square(4) # type: Optional[Square]
-
-# output
-
-from .config import (
-    Any,
-    Bool,
-    ConfigType,
-    ConfigTypeAttributes,
-    Int,
-    Path,
-    #  String,
-    #  resolve_to_config_type,
-    #  DEFAULT_TYPE_ATTRIBUTES,
-)
-
-
-from .config import (
-    Any,
-    Bool,
-    ConfigType,
-    ConfigTypeAttributes,
-    Int,
-    no_comma_here_yet,
-    #  and some comments,
-    #  resolve_to_config_type,
-    #  DEFAULT_TYPE_ATTRIBUTES,
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent,  # NOT DRY
-)
-from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
-    MyLovelyCompanyTeamProjectComponent as component,  # DRY
-)
-
-
-result = 1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
-result = 1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
-result = (  # aaa
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-)
-
-result = (  # aaa
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-)
-
-
-def func():
-    c = call(
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0789,
-        a[-1],  # type: ignore
-    )
-    c = call(0.0123, 0.0456, 0.0789, 0.0123, 0.0789, a[-1])  # type: ignore
-    c = call(
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0456,
-        0.0789,
-        0.0123,
-        0.0456,
-        0.0789,
-        a[-1],  # type: ignore
-    )
-
-    # The type: ignore exception only applies to line length, not
-    # other types of formatting.
-    c = call(
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",  # type: ignore
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-        "aaaaaaaa",
-    )
-
-
-class C:
-    @pytest.mark.parametrize(
-        ("post_data", "message"),
-        [
-            # metadata_version errors.
-            (
-                {},
-                "None is an invalid value for Metadata-Version. Error: This field is"
-                " required. see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            (
-                {"metadata_version": "-1"},
-                "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
-                " Version see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            # name errors.
-            (
-                {"metadata_version": "1.2"},
-                "'' is an invalid value for Name. Error: This field is required. see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            (
-                {"metadata_version": "1.2", "name": "foo-"},
-                "'foo-' is an invalid value for Name. Error: Must start and end with a"
-                " letter or numeral and contain only ascii numeric and '.', '_' and"
-                " '-'. see https://packaging.python.org/specifications/core-metadata",
-            ),
-            # version errors.
-            (
-                {"metadata_version": "1.2", "name": "example"},
-                "'' is an invalid value for Version. Error: This field is required. see"
-                " https://packaging.python.org/specifications/core-metadata",
-            ),
-            (
-                {"metadata_version": "1.2", "name": "example", "version": "dog"},
-                "'dog' is an invalid value for Version. Error: Must start and end with"
-                " a letter or numeral and contain only ascii numeric and '.', '_' and"
-                " '-'. see https://packaging.python.org/specifications/core-metadata",
-            ),
-        ],
-    )
-    def test_fails_invalid_post_data(
-        self, pyramid_config, db_request, post_data, message
-    ):
-        ...
-
-
-square = Square(4)  # type: Optional[Square]
diff -pruN 22.3.0-1/tests/data/comments8.py 22.6.0-1/tests/data/comments8.py
--- 22.3.0-1/tests/data/comments8.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments8.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-# The percent-percent comments are Spyder IDE cells.
-# Both `#%%`` and `# %%` are accepted, so `black` standardises
-# to the latter.
-
-#%%
-# %%
-
-# output
-
-# The percent-percent comments are Spyder IDE cells.
-# Both `#%%`` and `# %%` are accepted, so `black` standardises
-# to the latter.
-
-# %%
-# %%
diff -pruN 22.3.0-1/tests/data/comments_non_breaking_space.py 22.6.0-1/tests/data/comments_non_breaking_space.py
--- 22.3.0-1/tests/data/comments_non_breaking_space.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments_non_breaking_space.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-from .config import (  ConfigTypeAttributes,    Int,    Path,    # String,
-    # DEFAULT_TYPE_ATTRIBUTES,
-)
-
-result = 1  # A simple comment
-result = (    1, ) # Another one
-
-result = 1    # type: ignore
-result = 1# This comment is talking about type: ignore
-square = Square(4) # type: Optional[Square]
-
-def function(a:int=42):
-    """ This docstring is already formatted
-       a
-       b
-    """
-    #    There's a NBSP + 3 spaces before
-    #    And 4 spaces on the next line
-    pass
-
-# output
-from .config import (
-    ConfigTypeAttributes,
-    Int,
-    Path,  # String,
-    # DEFAULT_TYPE_ATTRIBUTES,
-)
-
-result = 1  # A simple comment
-result = (1,)  # Another one
-
-result = 1  #  type: ignore
-result = 1  # This comment is talking about type: ignore
-square = Square(4)  #  type: Optional[Square]
-
-
-def function(a: int = 42):
-    """This docstring is already formatted
-    a
-    b
-    """
-    #    There's a NBSP + 3 spaces before
-    #    And 4 spaces on the next line
-    pass
diff -pruN 22.3.0-1/tests/data/comments.py 22.6.0-1/tests/data/comments.py
--- 22.3.0-1/tests/data/comments.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/comments.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,96 +0,0 @@
-#!/usr/bin/env python3
-# fmt: on
-# Some license here.
-#
-# Has many lines. Many, many lines.
-# Many, many, many lines.
-"""Module docstring.
-
-Possibly also many, many lines.
-"""
-
-import os.path
-import sys
-
-import a
-from b.c import X  # some noqa comment
-
-try:
-    import fast
-except ImportError:
-    import slow as fast
-
-
-# Some comment before a function.
-y = 1
-(
-    # some strings
-    y  # type: ignore
-)
-
-
-def function(default=None):
-    """Docstring comes first.
-
-    Possibly many lines.
-    """
-    # FIXME: Some comment about why this function is crap but still in production.
-    import inner_imports
-
-    if inner_imports.are_evil():
-        # Explains why we have this if.
-        # In great detail indeed.
-        x = X()
-        return x.method1()  # type: ignore
-
-    # This return is also commented for some reason.
-    return default
-
-
-# Explains why we use global state.
-GLOBAL_STATE = {"a": a(1), "b": a(2), "c": a(3)}
-
-
-# Another comment!
-# This time two lines.
-
-
-class Foo:
-    """Docstring for class Foo.  Example from Sphinx docs."""
-
-    #: Doc comment for class attribute Foo.bar.
-    #: It can have multiple lines.
-    bar = 1
-
-    flox = 1.5  #: Doc comment for Foo.flox. One line only.
-
-    baz = 2
-    """Docstring for class attribute Foo.baz."""
-
-    def __init__(self):
-        #: Doc comment for instance attribute qux.
-        self.qux = 3
-
-        self.spam = 4
-        """Docstring for instance attribute spam."""
-
-
-#' <h1>This is pweave!</h1>
-
-
-@fast(really=True)
-async def wat():
-    # This comment, for some reason \
-    # contains a trailing backslash.
-    async with X.open_async() as x:  # Some more comments
-        result = await x.method1()
-    # Comment after ending a block.
-    if result:
-        print("A OK", file=sys.stdout)
-        # Comment between things.
-        print()
-
-
-# Some closing comments.
-# Maybe Vim or Emacs directives for formatting.
-# Who knows.
diff -pruN 22.3.0-1/tests/data/composition_no_trailing_comma.py 22.6.0-1/tests/data/composition_no_trailing_comma.py
--- 22.3.0-1/tests/data/composition_no_trailing_comma.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/composition_no_trailing_comma.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,367 +0,0 @@
-class C:
-    def test(self) -> None:
-        with patch("black.out", print):
-            self.assertEqual(
-                unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "2 files reformatted, 1 file left unchanged, 1 file failed to"
-                " reformat.",
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "2 files reformatted, 2 files left unchanged, 2 files failed to"
-                " reformat.",
-            )
-            for i in (a,):
-                if (
-                    # Rule 1
-                    i % 2 == 0
-                    # Rule 2
-                    and i % 3 == 0
-                ):
-                    while (
-                        # Just a comment
-                        call()
-                        # Another
-                    ):
-                        print(i)
-        xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
-            push_manager=context.request.resource_manager,
-            max_items_to_push=num_items,
-            batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE
-        ).push(
-            # Only send the first n items.
-            items=items[:num_items]
-        )
-        return (
-            'Utterly failed doctest test for %s\n   File "%s", line %s, in %s\n\n%s'
-            % (test.name, test.filename, lineno, lname, err)
-        )
-
-    def omitting_trailers(self) -> None:
-        get_collection(
-            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
-        )[OneLevelIndex]
-        get_collection(
-            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
-        )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
-        d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
-            22
-        ]
-        assignment = (
-            some.rather.elaborate.rule() and another.rule.ending_with.index[123]
-        )
-
-    def easy_asserts(self) -> None:
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        } == expected, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        }, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        }
-
-    def tricky_asserts(self) -> None:
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        } == expected(
-            value, is_going_to_be="too long to fit in a single line", srsly=True
-        ), "Not what we expected"
-
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        } == expected, (
-            "Not what we expected and the message is too long to fit in one line"
-        )
-
-        assert expected(
-            value, is_going_to_be="too long to fit in a single line", srsly=True
-        ) == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        }, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9
-        }, (
-            "Not what we expected and the message is too long to fit in one line"
-            " because it's too long"
-        )
-
-        dis_c_instance_method = """\
-        %3d           0 LOAD_FAST                1 (x)
-                      2 LOAD_CONST               1 (1)
-                      4 COMPARE_OP               2 (==)
-                      6 LOAD_FAST                0 (self)
-                      8 STORE_ATTR               0 (x)
-                     10 LOAD_CONST               0 (None)
-                     12 RETURN_VALUE
-        """ % (
-            _C.__init__.__code__.co_firstlineno + 1,
-        )
-
-        assert (
-            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
-            == {
-                key1: value1,
-                key2: value2,
-                key3: value3,
-                key4: value4,
-                key5: value5,
-                key6: value6,
-                key7: value7,
-                key8: value8,
-                key9: value9
-            }
-        )
-
-
-
-# output
-
-class C:
-    def test(self) -> None:
-        with patch("black.out", print):
-            self.assertEqual(
-                unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "2 files reformatted, 1 file left unchanged, 1 file failed to"
-                " reformat.",
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "2 files reformatted, 2 files left unchanged, 2 files failed to"
-                " reformat.",
-            )
-            for i in (a,):
-                if (
-                    # Rule 1
-                    i % 2 == 0
-                    # Rule 2
-                    and i % 3 == 0
-                ):
-                    while (
-                        # Just a comment
-                        call()
-                        # Another
-                    ):
-                        print(i)
-        xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
-            push_manager=context.request.resource_manager,
-            max_items_to_push=num_items,
-            batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE,
-        ).push(
-            # Only send the first n items.
-            items=items[:num_items]
-        )
-        return (
-            'Utterly failed doctest test for %s\n   File "%s", line %s, in %s\n\n%s'
-            % (test.name, test.filename, lineno, lname, err)
-        )
-
-    def omitting_trailers(self) -> None:
-        get_collection(
-            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
-        )[OneLevelIndex]
-        get_collection(
-            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
-        )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
-        d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
-            22
-        ]
-        assignment = (
-            some.rather.elaborate.rule() and another.rule.ending_with.index[123]
-        )
-
-    def easy_asserts(self) -> None:
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        } == expected, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }
-
-    def tricky_asserts(self) -> None:
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        } == expected(
-            value, is_going_to_be="too long to fit in a single line", srsly=True
-        ), "Not what we expected"
-
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        } == expected, (
-            "Not what we expected and the message is too long to fit in one line"
-        )
-
-        assert expected(
-            value, is_going_to_be="too long to fit in a single line", srsly=True
-        ) == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }, (
-            "Not what we expected and the message is too long to fit in one line"
-            " because it's too long"
-        )
-
-        dis_c_instance_method = """\
-        %3d           0 LOAD_FAST                1 (x)
-                      2 LOAD_CONST               1 (1)
-                      4 COMPARE_OP               2 (==)
-                      6 LOAD_FAST                0 (self)
-                      8 STORE_ATTR               0 (x)
-                     10 LOAD_CONST               0 (None)
-                     12 RETURN_VALUE
-        """ % (
-            _C.__init__.__code__.co_firstlineno + 1,
-        )
-
-        assert (
-            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
-            == {
-                key1: value1,
-                key2: value2,
-                key3: value3,
-                key4: value4,
-                key5: value5,
-                key6: value6,
-                key7: value7,
-                key8: value8,
-                key9: value9,
-            }
-        )
diff -pruN 22.3.0-1/tests/data/composition.py 22.6.0-1/tests/data/composition.py
--- 22.3.0-1/tests/data/composition.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/composition.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,181 +0,0 @@
-class C:
-    def test(self) -> None:
-        with patch("black.out", print):
-            self.assertEqual(
-                unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "2 files reformatted, 1 file left unchanged, 1 file failed to"
-                " reformat.",
-            )
-            self.assertEqual(
-                unstyle(str(report)),
-                "2 files reformatted, 2 files left unchanged, 2 files failed to"
-                " reformat.",
-            )
-            for i in (a,):
-                if (
-                    # Rule 1
-                    i % 2 == 0
-                    # Rule 2
-                    and i % 3 == 0
-                ):
-                    while (
-                        # Just a comment
-                        call()
-                        # Another
-                    ):
-                        print(i)
-        xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
-            push_manager=context.request.resource_manager,
-            max_items_to_push=num_items,
-            batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE,
-        ).push(
-            # Only send the first n items.
-            items=items[:num_items]
-        )
-        return (
-            'Utterly failed doctest test for %s\n   File "%s", line %s, in %s\n\n%s'
-            % (test.name, test.filename, lineno, lname, err)
-        )
-
-    def omitting_trailers(self) -> None:
-        get_collection(
-            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
-        )[OneLevelIndex]
-        get_collection(
-            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
-        )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
-        d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
-            22
-        ]
-        assignment = (
-            some.rather.elaborate.rule() and another.rule.ending_with.index[123]
-        )
-
-    def easy_asserts(self) -> None:
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        } == expected, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }
-
-    def tricky_asserts(self) -> None:
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        } == expected(
-            value, is_going_to_be="too long to fit in a single line", srsly=True
-        ), "Not what we expected"
-
-        assert {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        } == expected, (
-            "Not what we expected and the message is too long to fit in one line"
-        )
-
-        assert expected(
-            value, is_going_to_be="too long to fit in a single line", srsly=True
-        ) == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }, "Not what we expected"
-
-        assert expected == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }, (
-            "Not what we expected and the message is too long to fit in one line"
-            " because it's too long"
-        )
-
-        dis_c_instance_method = """\
-        %3d           0 LOAD_FAST                1 (x)
-                      2 LOAD_CONST               1 (1)
-                      4 COMPARE_OP               2 (==)
-                      6 LOAD_FAST                0 (self)
-                      8 STORE_ATTR               0 (x)
-                     10 LOAD_CONST               0 (None)
-                     12 RETURN_VALUE
-        """ % (
-            _C.__init__.__code__.co_firstlineno + 1,
-        )
-
-        assert (
-            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
-            == {
-                key1: value1,
-                key2: value2,
-                key3: value3,
-                key4: value4,
-                key5: value5,
-                key6: value6,
-                key7: value7,
-                key8: value8,
-                key9: value9,
-            }
-        )
diff -pruN 22.3.0-1/tests/data/debug_visitor.out 22.6.0-1/tests/data/debug_visitor.out
--- 22.3.0-1/tests/data/debug_visitor.out	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/debug_visitor.out	1970-01-01 00:00:00.000000000 +0000
@@ -1,810 +0,0 @@
-file_input
-  decorated
-    decorator
-      AT
- '@'
-      NAME
- 'dataclass'
-      NEWLINE
- '\n'
-    /decorator
-    classdef
-      NAME
- 'class'
-      NAME
- ' '
- 'DebugVisitor'
-      LPAR
- '('
-      power
-        NAME
- 'Visitor'
-        trailer
-          LSQB
- '['
-          NAME
- 'T'
-          RSQB
- ']'
-        /trailer
-      /power
-      RPAR
- ')'
-      COLON
- ':'
-      suite
-        NEWLINE
- '\n'
-        INDENT
- ''
-        simple_stmt
-          expr_stmt
-            NAME
- '    '
- 'tree_depth'
-            annassign
-              COLON
- ':'
-              NAME
- ' '
- 'int'
-              EQUAL
- ' '
- '='
-              NUMBER
- ' '
- '0'
-            /annassign
-          /expr_stmt
-          NEWLINE
- '\n'
-        /simple_stmt
-        funcdef
-          NAME
- '\n    '
- 'def'
-          NAME
- ' '
- 'visit_default'
-          parameters
-            LPAR
- '('
-            typedargslist
-              NAME
- 'self'
-              COMMA
- ','
-              tname
-                NAME
- ' '
- 'node'
-                COLON
- ':'
-                NAME
- ' '
- 'LN'
-              /tname
-            /typedargslist
-            RPAR
- ')'
-          /parameters
-          RARROW
- ' '
- '->'
-          power
-            NAME
- ' '
- 'Iterator'
-            trailer
-              LSQB
- '['
-              NAME
- 'T'
-              RSQB
- ']'
-            /trailer
-          /power
-          COLON
- ':'
-          suite
-            NEWLINE
- '\n'
-            INDENT
- ''
-            simple_stmt
-              expr_stmt
-                NAME
- '        '
- 'indent'
-                EQUAL
- ' '
- '='
-                term
-                  STRING
- ' '
- "' '"
-                  STAR
- ' '
- '*'
-                  atom
-                    LPAR
- ' '
- '('
-                    term
-                      NUMBER
- '2'
-                      STAR
- ' '
- '*'
-                      power
-                        NAME
- ' '
- 'self'
-                        trailer
-                          DOT
- '.'
-                          NAME
- 'tree_depth'
-                        /trailer
-                      /power
-                    /term
-                    RPAR
- ')'
-                  /atom
-                /term
-              /expr_stmt
-              NEWLINE
- '\n'
-            /simple_stmt
-            if_stmt
-              NAME
- '        '
- 'if'
-              power
-                NAME
- ' '
- 'isinstance'
-                trailer
-                  LPAR
- '('
-                  arglist
-                    NAME
- 'node'
-                    COMMA
- ','
-                    NAME
- ' '
- 'Node'
-                  /arglist
-                  RPAR
- ')'
-                /trailer
-              /power
-              COLON
- ':'
-              suite
-                NEWLINE
- '\n'
-                INDENT
- ''
-                simple_stmt
-                  expr_stmt
-                    NAME
- '            '
- '_type'
-                    EQUAL
- ' '
- '='
-                    power
-                      NAME
- ' '
- 'type_repr'
-                      trailer
-                        LPAR
- '('
-                        power
-                          NAME
- 'node'
-                          trailer
-                            DOT
- '.'
-                            NAME
- 'type'
-                          /trailer
-                        /power
-                        RPAR
- ')'
-                      /trailer
-                    /power
-                  /expr_stmt
-                  NEWLINE
- '\n'
-                /simple_stmt
-                simple_stmt
-                  power
-                    NAME
- '            '
- 'out'
-                    trailer
-                      LPAR
- '('
-                      arglist
-                        STRING
- "f'{indent}{_type}'"
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'fg'
-                          EQUAL
- '='
-                          STRING
- "'yellow'"
-                        /argument
-                      /arglist
-                      RPAR
- ')'
-                    /trailer
-                  /power
-                  NEWLINE
- '\n'
-                /simple_stmt
-                simple_stmt
-                  expr_stmt
-                    power
-                      NAME
- '            '
- 'self'
-                      trailer
-                        DOT
- '.'
-                        NAME
- 'tree_depth'
-                      /trailer
-                    /power
-                    PLUSEQUAL
- ' '
- '+='
-                    NUMBER
- ' '
- '1'
-                  /expr_stmt
-                  NEWLINE
- '\n'
-                /simple_stmt
-                for_stmt
-                  NAME
- '            '
- 'for'
-                  NAME
- ' '
- 'child'
-                  NAME
- ' '
- 'in'
-                  power
-                    NAME
- ' '
- 'node'
-                    trailer
-                      DOT
- '.'
-                      NAME
- 'children'
-                    /trailer
-                  /power
-                  COLON
- ':'
-                  suite
-                    NEWLINE
- '\n'
-                    INDENT
- ''
-                    simple_stmt
-                      yield_expr
-                        NAME
- '                '
- 'yield'
-                        yield_arg
-                          NAME
- ' '
- 'from'
-                          power
-                            NAME
- ' '
- 'self'
-                            trailer
-                              DOT
- '.'
-                              NAME
- 'visit'
-                            /trailer
-                            trailer
-                              LPAR
- '('
-                              NAME
- 'child'
-                              RPAR
- ')'
-                            /trailer
-                          /power
-                        /yield_arg
-                      /yield_expr
-                      NEWLINE
- '\n'
-                    /simple_stmt
-                    DEDENT
- ''
-                  /suite
-                /for_stmt
-                simple_stmt
-                  expr_stmt
-                    power
-                      NAME
- '\n            '
- 'self'
-                      trailer
-                        DOT
- '.'
-                        NAME
- 'tree_depth'
-                      /trailer
-                    /power
-                    MINEQUAL
- ' '
- '-='
-                    NUMBER
- ' '
- '1'
-                  /expr_stmt
-                  NEWLINE
- '\n'
-                /simple_stmt
-                simple_stmt
-                  power
-                    NAME
- '            '
- 'out'
-                    trailer
-                      LPAR
- '('
-                      arglist
-                        STRING
- "f'{indent}/{_type}'"
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'fg'
-                          EQUAL
- '='
-                          STRING
- "'yellow'"
-                        /argument
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'bold'
-                          EQUAL
- '='
-                          NAME
- 'False'
-                        /argument
-                      /arglist
-                      RPAR
- ')'
-                    /trailer
-                  /power
-                  NEWLINE
- '\n'
-                /simple_stmt
-                DEDENT
- ''
-              /suite
-              NAME
- '        '
- 'else'
-              COLON
- ':'
-              suite
-                NEWLINE
- '\n'
-                INDENT
- ''
-                simple_stmt
-                  expr_stmt
-                    NAME
- '            '
- '_type'
-                    EQUAL
- ' '
- '='
-                    power
-                      NAME
- ' '
- 'token'
-                      trailer
-                        DOT
- '.'
-                        NAME
- 'tok_name'
-                      /trailer
-                      trailer
-                        DOT
- '.'
-                        NAME
- 'get'
-                      /trailer
-                      trailer
-                        LPAR
- '('
-                        arglist
-                          power
-                            NAME
- 'node'
-                            trailer
-                              DOT
- '.'
-                              NAME
- 'type'
-                            /trailer
-                          /power
-                          COMMA
- ','
-                          power
-                            NAME
- ' '
- 'str'
-                            trailer
-                              LPAR
- '('
-                              power
-                                NAME
- 'node'
-                                trailer
-                                  DOT
- '.'
-                                  NAME
- 'type'
-                                /trailer
-                              /power
-                              RPAR
- ')'
-                            /trailer
-                          /power
-                        /arglist
-                        RPAR
- ')'
-                      /trailer
-                    /power
-                  /expr_stmt
-                  NEWLINE
- '\n'
-                /simple_stmt
-                simple_stmt
-                  power
-                    NAME
- '            '
- 'out'
-                    trailer
-                      LPAR
- '('
-                      arglist
-                        STRING
- "f'{indent}{_type}'"
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'fg'
-                          EQUAL
- '='
-                          STRING
- "'blue'"
-                        /argument
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'nl'
-                          EQUAL
- '='
-                          NAME
- 'False'
-                        /argument
-                      /arglist
-                      RPAR
- ')'
-                    /trailer
-                  /power
-                  NEWLINE
- '\n'
-                /simple_stmt
-                if_stmt
-                  NAME
- '            '
- 'if'
-                  power
-                    NAME
- ' '
- 'node'
-                    trailer
-                      DOT
- '.'
-                      NAME
- 'prefix'
-                    /trailer
-                  /power
-                  COLON
- ':'
-                  suite
-                    NEWLINE
- '\n'
-                    INDENT
- ''
-                    simple_stmt
-                      power
-                        NAME
- "                # We don't have to handle prefixes for `Node` objects since\n                # that delegates to the first child anyway.\n                "
- 'out'
-                        trailer
-                          LPAR
- '('
-                          arglist
-                            STRING
- "f' {node.prefix!r}'"
-                            COMMA
- ','
-                            argument
-                              NAME
- ' '
- 'fg'
-                              EQUAL
- '='
-                              STRING
- "'green'"
-                            /argument
-                            COMMA
- ','
-                            argument
-                              NAME
- ' '
- 'bold'
-                              EQUAL
- '='
-                              NAME
- 'False'
-                            /argument
-                            COMMA
- ','
-                            argument
-                              NAME
- ' '
- 'nl'
-                              EQUAL
- '='
-                              NAME
- 'False'
-                            /argument
-                          /arglist
-                          RPAR
- ')'
-                        /trailer
-                      /power
-                      NEWLINE
- '\n'
-                    /simple_stmt
-                    DEDENT
- ''
-                  /suite
-                /if_stmt
-                simple_stmt
-                  power
-                    NAME
- '            '
- 'out'
-                    trailer
-                      LPAR
- '('
-                      arglist
-                        STRING
- "f' {node.value!r}'"
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'fg'
-                          EQUAL
- '='
-                          STRING
- "'blue'"
-                        /argument
-                        COMMA
- ','
-                        argument
-                          NAME
- ' '
- 'bold'
-                          EQUAL
- '='
-                          NAME
- 'False'
-                        /argument
-                      /arglist
-                      RPAR
- ')'
-                    /trailer
-                  /power
-                  NEWLINE
- '\n'
-                /simple_stmt
-                DEDENT
- ''
-              /suite
-            /if_stmt
-            DEDENT
- ''
-          /suite
-        /funcdef
-        decorated
-          decorator
-            AT
- '\n    '
- '@'
-            NAME
- 'classmethod'
-            NEWLINE
- '\n'
-          /decorator
-          funcdef
-            NAME
- '    '
- 'def'
-            NAME
- ' '
- 'show'
-            parameters
-              LPAR
- '('
-              typedargslist
-                NAME
- 'cls'
-                COMMA
- ','
-                tname
-                  NAME
- ' '
- 'code'
-                  COLON
- ':'
-                  NAME
- ' '
- 'str'
-                /tname
-              /typedargslist
-              RPAR
- ')'
-            /parameters
-            RARROW
- ' '
- '->'
-            NAME
- ' '
- 'None'
-            COLON
- ':'
-            suite
-              NEWLINE
- '\n'
-              INDENT
- ''
-              simple_stmt
-                STRING
- '        '
- '"""Pretty-prints a given string of `code`.\n\n        Convenience method for debugging.\n        """'
-                NEWLINE
- '\n'
-              /simple_stmt
-              simple_stmt
-                expr_stmt
-                  NAME
- '        '
- 'v'
-                  annassign
-                    COLON
- ':'
-                    power
-                      NAME
- ' '
- 'DebugVisitor'
-                      trailer
-                        LSQB
- '['
-                        NAME
- 'None'
-                        RSQB
- ']'
-                      /trailer
-                    /power
-                    EQUAL
- ' '
- '='
-                    power
-                      NAME
- ' '
- 'DebugVisitor'
-                      trailer
-                        LPAR
- '('
-                        RPAR
- ')'
-                      /trailer
-                    /power
-                  /annassign
-                /expr_stmt
-                NEWLINE
- '\n'
-              /simple_stmt
-              simple_stmt
-                power
-                  NAME
- '        '
- 'list'
-                  trailer
-                    LPAR
- '('
-                    power
-                      NAME
- 'v'
-                      trailer
-                        DOT
- '.'
-                        NAME
- 'visit'
-                      /trailer
-                      trailer
-                        LPAR
- '('
-                        power
-                          NAME
- 'lib2to3_parse'
-                          trailer
-                            LPAR
- '('
-                            NAME
- 'code'
-                            RPAR
- ')'
-                          /trailer
-                        /power
-                        RPAR
- ')'
-                      /trailer
-                    /power
-                    RPAR
- ')'
-                  /trailer
-                /power
-                NEWLINE
- '\n'
-              /simple_stmt
-              DEDENT
- ''
-            /suite
-          /funcdef
-        /decorated
-        DEDENT
- ''
-      /suite
-    /classdef
-  /decorated
-  ENDMARKER
- ''
-/file_input
diff -pruN 22.3.0-1/tests/data/debug_visitor.py 22.6.0-1/tests/data/debug_visitor.py
--- 22.3.0-1/tests/data/debug_visitor.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/debug_visitor.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-@dataclass
-class DebugVisitor(Visitor[T]):
-    tree_depth: int = 0
-
-    def visit_default(self, node: LN) -> Iterator[T]:
-        indent = ' ' * (2 * self.tree_depth)
-        if isinstance(node, Node):
-            _type = type_repr(node.type)
-            out(f'{indent}{_type}', fg='yellow')
-            self.tree_depth += 1
-            for child in node.children:
-                yield from self.visit(child)
-
-            self.tree_depth -= 1
-            out(f'{indent}/{_type}', fg='yellow', bold=False)
-        else:
-            _type = token.tok_name.get(node.type, str(node.type))
-            out(f'{indent}{_type}', fg='blue', nl=False)
-            if node.prefix:
-                # We don't have to handle prefixes for `Node` objects since
-                # that delegates to the first child anyway.
-                out(f' {node.prefix!r}', fg='green', bold=False, nl=False)
-            out(f' {node.value!r}', fg='blue', bold=False)
-
-    @classmethod
-    def show(cls, code: str) -> None:
-        """Pretty-prints a given string of `code`.
-
-        Convenience method for debugging.
-        """
-        v: DebugVisitor[None] = DebugVisitor()
-        list(v.visit(lib2to3_parse(code)))
diff -pruN 22.3.0-1/tests/data/decorators.py 22.6.0-1/tests/data/decorators.py
--- 22.3.0-1/tests/data/decorators.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/decorators.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,182 +0,0 @@
-# This file doesn't use the standard decomposition.
-# Decorator syntax test cases are separated by double # comments.
-# Those before the 'output' comment are valid under the old syntax.
-# Those after the 'ouput' comment require PEP614 relaxed syntax.
-# Do not remove the double # separator before the first test case, it allows
-# the comment before the test case to be ignored.
-
-##
-
-@decorator
-def f():
-    ...
-
-##
-
-@decorator()
-def f():
-    ...
-
-##
-
-@decorator(arg)
-def f():
-    ...
-    
-##
-
-@decorator(kwarg=0)
-def f():
-    ...
-
-##
-
-@decorator(*args)
-def f():
-    ...
-
-##
-
-@decorator(**kwargs)
-def f():
-    ...
-
-##
-
-@decorator(*args, **kwargs)
-def f():
-    ...
-
-##
-
-@decorator(*args, **kwargs,)
-def f():
-    ...
-
-##
-
-@dotted.decorator
-def f():
-    ...
-
-##
-
-@dotted.decorator(arg)
-def f():
-    ...
-    
-##
-
-@dotted.decorator(kwarg=0)
-def f():
-    ...
-
-##
-
-@dotted.decorator(*args)
-def f():
-    ...
-
-##
-
-@dotted.decorator(**kwargs)
-def f():
-    ...
-
-##
-
-@dotted.decorator(*args, **kwargs)
-def f():
-    ...
-
-##
-
-@dotted.decorator(*args, **kwargs,)
-def f():
-    ...
-
-##
-
-@double.dotted.decorator
-def f():
-    ...
-
-##
-
-@double.dotted.decorator(arg)
-def f():
-    ...
-    
-##
-
-@double.dotted.decorator(kwarg=0)
-def f():
-    ...
-
-##
-
-@double.dotted.decorator(*args)
-def f():
-    ...
-
-##
-
-@double.dotted.decorator(**kwargs)
-def f():
-    ...
-
-##
-
-@double.dotted.decorator(*args, **kwargs)
-def f():
-    ...
-
-##
-
-@double.dotted.decorator(*args, **kwargs,)
-def f():
-    ...
-
-##
-
-@_(sequence["decorator"])
-def f():
-    ...
-
-##
-
-@eval("sequence['decorator']")
-def f():
-    ...
-
-# output
-
-##
-
-@decorator()()
-def f():
-    ...
-
-##
-
-@(decorator)
-def f():
-    ...
-
-##
-
-@sequence["decorator"]
-def f():
-    ...
-
-##
-
-@decorator[List[str]]
-def f():
-    ...
-
-##
-
-@var := decorator
-def f():
-    ...
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/docstring_no_string_normalization.py 22.6.0-1/tests/data/docstring_no_string_normalization.py
--- 22.3.0-1/tests/data/docstring_no_string_normalization.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/docstring_no_string_normalization.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,249 +0,0 @@
-class ALonelyClass:
-    '''
-    A multiline class docstring.
-    '''
-    def AnEquallyLonelyMethod(self):
-        '''
-        A multiline method docstring'''
-        pass
-
-
-def one_function():
-    '''This is a docstring with a single line of text.'''
-    pass
-
-
-def shockingly_the_quotes_are_normalized():
-    '''This is a multiline docstring.
-    This is a multiline docstring.
-    This is a multiline docstring.
-    '''
-    pass
-
-
-def foo():
-  """This is a docstring with             
-  some lines of text here
-  """
-  return
-
-
-def baz():
-  '''"This" is a string with some
-  embedded "quotes"'''
-  return
-
-
-def poit():
-  """
-  Lorem ipsum dolor sit amet.       
-
-  Consectetur adipiscing elit:
-   - sed do eiusmod tempor incididunt ut labore
-   - dolore magna aliqua
-     - enim ad minim veniam
-     - quis nostrud exercitation ullamco laboris nisi
-   - aliquip ex ea commodo consequat
-  """
-  pass
-
-
-def under_indent():
-  """
-  These lines are indented in a way that does not
-make sense.
-  """
-  pass
-
-
-def over_indent():
-  """
-  This has a shallow indent
-    - But some lines are deeper
-    - And the closing quote is too deep
-    """
-  pass
-
-
-def single_line():
-    """But with a newline after it!
-
-    """
-    pass
-
-
-def this():
-    r"""
-    'hey ho'
-    """
-
-
-def that():
-  """ "hey yah" """
-
-
-def and_that():
-  """
-  "hey yah" """
-
-
-def and_this():
-  ''' 
-  "hey yah"'''
-
-
-def believe_it_or_not_this_is_in_the_py_stdlib(): ''' 
-"hey yah"'''
-
-
-def shockingly_the_quotes_are_normalized_v2():
-    '''
-    Docstring Docstring Docstring
-    '''
-    pass
-
-
-def backslash_space():
-    '\ '
-
-
-def multiline_backslash_1():
-  '''
-  hey\there\
-  \ '''
-
-
-def multiline_backslash_2():
-  '''
-  hey there \ '''
-
-
-def multiline_backslash_3():
-  '''
-  already escaped \\ '''
-
-# output
-
-class ALonelyClass:
-    '''
-    A multiline class docstring.
-    '''
-
-    def AnEquallyLonelyMethod(self):
-        '''
-        A multiline method docstring'''
-        pass
-
-
-def one_function():
-    '''This is a docstring with a single line of text.'''
-    pass
-
-
-def shockingly_the_quotes_are_normalized():
-    '''This is a multiline docstring.
-    This is a multiline docstring.
-    This is a multiline docstring.
-    '''
-    pass
-
-
-def foo():
-    """This is a docstring with
-    some lines of text here
-    """
-    return
-
-
-def baz():
-    '''"This" is a string with some
-    embedded "quotes"'''
-    return
-
-
-def poit():
-    """
-    Lorem ipsum dolor sit amet.
-
-    Consectetur adipiscing elit:
-     - sed do eiusmod tempor incididunt ut labore
-     - dolore magna aliqua
-       - enim ad minim veniam
-       - quis nostrud exercitation ullamco laboris nisi
-     - aliquip ex ea commodo consequat
-    """
-    pass
-
-
-def under_indent():
-    """
-      These lines are indented in a way that does not
-    make sense.
-    """
-    pass
-
-
-def over_indent():
-    """
-    This has a shallow indent
-      - But some lines are deeper
-      - And the closing quote is too deep
-    """
-    pass
-
-
-def single_line():
-    """But with a newline after it!"""
-    pass
-
-
-def this():
-    r"""
-    'hey ho'
-    """
-
-
-def that():
-    """ "hey yah" """
-
-
-def and_that():
-    """
-    "hey yah" """
-
-
-def and_this():
-    '''
-    "hey yah"'''
-
-
-def believe_it_or_not_this_is_in_the_py_stdlib():
-    '''
-    "hey yah"'''
-
-
-def shockingly_the_quotes_are_normalized_v2():
-    '''
-    Docstring Docstring Docstring
-    '''
-    pass
-
-
-def backslash_space():
-    '\ '
-
-
-def multiline_backslash_1():
-    '''
-  hey\there\
-  \ '''
-
-
-def multiline_backslash_2():
-    '''
-    hey there \ '''
-
-
-def multiline_backslash_3():
-    '''
-    already escaped \\'''
diff -pruN 22.3.0-1/tests/data/docstring.py 22.6.0-1/tests/data/docstring.py
--- 22.3.0-1/tests/data/docstring.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/docstring.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,377 +0,0 @@
-class MyClass:
-  """ Multiline
-  class docstring
-  """
-
-  def method(self):
-    """Multiline
-    method docstring
-    """
-    pass
-
-
-def foo():
-  """This is a docstring with             
-  some lines of text here
-  """
-  return
-
-
-def bar():
-  '''This is another docstring
-  with more lines of text
-  '''
-  return
-
-
-def baz():
-  '''"This" is a string with some
-  embedded "quotes"'''
-  return
-
-
-def troz():
-	'''Indentation with tabs
-	is just as OK
-	'''
-	return
-
-
-def zort():
-        """Another
-        multiline
-        docstring
-        """
-        pass
-
-def poit():
-  """
-  Lorem ipsum dolor sit amet.       
-
-  Consectetur adipiscing elit:
-   - sed do eiusmod tempor incididunt ut labore
-   - dolore magna aliqua
-     - enim ad minim veniam
-     - quis nostrud exercitation ullamco laboris nisi
-   - aliquip ex ea commodo consequat
-  """
-  pass
-
-
-def under_indent():
-  """
-  These lines are indented in a way that does not
-make sense.
-  """
-  pass
-
-
-def over_indent():
-  """
-  This has a shallow indent
-    - But some lines are deeper
-    - And the closing quote is too deep
-    """
-  pass
-
-
-def single_line():
-    """But with a newline after it!
-
-    """
-    pass
-
-
-def this():
-    r"""
-    'hey ho'
-    """
-
-
-def that():
-  """ "hey yah" """
-
-
-def and_that():
-  """
-  "hey yah" """
-
-
-def and_this():
-  ''' 
-  "hey yah"'''
-
-
-def multiline_whitespace():
-    '''
-    
-    
-    
-    
-    '''
-
-
-def oneline_whitespace():
-    '''      '''
-
-
-def empty():
-    """"""
-
-
-def single_quotes():
-    'testing'
-
-
-def believe_it_or_not_this_is_in_the_py_stdlib(): ''' 
-"hey yah"'''
-
-
-def ignored_docstring():
-    """a => \
-b"""  
-
-def single_line_docstring_with_whitespace():
-    """   This should be stripped """
-
-def docstring_with_inline_tabs_and_space_indentation():
-    """hey
-
-    tab	separated	value
-    	tab at start of line and then a tab	separated	value
-    				multiple tabs at the beginning	and	inline
-    	 	  	mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
-    			 	  		
-    line ends with some tabs		
-    """
-
-
-def docstring_with_inline_tabs_and_tab_indentation():
-	"""hey
-
-	tab	separated	value
-		tab at start of line and then a tab	separated	value
-					multiple tabs at the beginning	and	inline
-		 	  	mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
-				 	  		
-	line ends with some tabs		
-	"""
-	pass
-
-
-def backslash_space():
-    """\ """
-
-
-def multiline_backslash_1():
-  '''
-  hey\there\
-  \ '''
-
-
-def multiline_backslash_2():
-  '''
-  hey there \ '''
-
-
-def multiline_backslash_3():
-  '''
-  already escaped \\ '''
-
-
-def my_god_its_full_of_stars_1():
-    "I'm sorry Dave\u2001"
-
-
-# the space below is actually a \u2001, removed in output
-def my_god_its_full_of_stars_2():
-    "I'm sorry Dave "
-
-
-# output
-
-class MyClass:
-    """Multiline
-    class docstring
-    """
-
-    def method(self):
-        """Multiline
-        method docstring
-        """
-        pass
-
-
-def foo():
-    """This is a docstring with
-    some lines of text here
-    """
-    return
-
-
-def bar():
-    """This is another docstring
-    with more lines of text
-    """
-    return
-
-
-def baz():
-    '''"This" is a string with some
-    embedded "quotes"'''
-    return
-
-
-def troz():
-    """Indentation with tabs
-    is just as OK
-    """
-    return
-
-
-def zort():
-    """Another
-    multiline
-    docstring
-    """
-    pass
-
-
-def poit():
-    """
-    Lorem ipsum dolor sit amet.
-
-    Consectetur adipiscing elit:
-     - sed do eiusmod tempor incididunt ut labore
-     - dolore magna aliqua
-       - enim ad minim veniam
-       - quis nostrud exercitation ullamco laboris nisi
-     - aliquip ex ea commodo consequat
-    """
-    pass
-
-
-def under_indent():
-    """
-      These lines are indented in a way that does not
-    make sense.
-    """
-    pass
-
-
-def over_indent():
-    """
-    This has a shallow indent
-      - But some lines are deeper
-      - And the closing quote is too deep
-    """
-    pass
-
-
-def single_line():
-    """But with a newline after it!"""
-    pass
-
-
-def this():
-    r"""
-    'hey ho'
-    """
-
-
-def that():
-    """ "hey yah" """
-
-
-def and_that():
-    """
-    "hey yah" """
-
-
-def and_this():
-    '''
-    "hey yah"'''
-
-
-def multiline_whitespace():
-    """ """
-
-
-def oneline_whitespace():
-    """ """
-
-
-def empty():
-    """"""
-
-
-def single_quotes():
-    "testing"
-
-
-def believe_it_or_not_this_is_in_the_py_stdlib():
-    '''
-    "hey yah"'''
-
-
-def ignored_docstring():
-    """a => \
-b"""
-
-
-def single_line_docstring_with_whitespace():
-    """This should be stripped"""
-
-
-def docstring_with_inline_tabs_and_space_indentation():
-    """hey
-
-    tab	separated	value
-        tab at start of line and then a tab	separated	value
-                                multiple tabs at the beginning	and	inline
-                        mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
-
-    line ends with some tabs
-    """
-
-
-def docstring_with_inline_tabs_and_tab_indentation():
-    """hey
-
-    tab	separated	value
-            tab at start of line and then a tab	separated	value
-                                    multiple tabs at the beginning	and	inline
-                            mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
-
-    line ends with some tabs
-    """
-    pass
-
-
-def backslash_space():
-    """\ """
-
-
-def multiline_backslash_1():
-    """
-  hey\there\
-  \ """
-
-
-def multiline_backslash_2():
-    """
-    hey there \ """
-
-
-def multiline_backslash_3():
-    """
-    already escaped \\"""
-
-
-def my_god_its_full_of_stars_1():
-    "I'm sorry Dave\u2001"
-
-
-# the space below is actually a \u2001, removed in output
-def my_god_its_full_of_stars_2():
-    "I'm sorry Dave"
diff -pruN 22.3.0-1/tests/data/empty_lines.py 22.6.0-1/tests/data/empty_lines.py
--- 22.3.0-1/tests/data/empty_lines.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/empty_lines.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,187 +0,0 @@
-"""Docstring."""
-
-
-# leading comment
-def f():
-    NO = ''
-    SPACE = ' '
-    DOUBLESPACE = '  '
-
-    t = leaf.type
-    p = leaf.parent  # trailing comment
-    v = leaf.value
-
-    if t in ALWAYS_NO_SPACE:
-        pass
-    if t == token.COMMENT:  # another trailing comment
-        return DOUBLESPACE
-
-
-    assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
-
-
-    prev = leaf.prev_sibling
-    if not prev:
-        prevp = preceding_leaf(p)
-        if not prevp or prevp.type in OPENING_BRACKETS:
-
-
-            return NO
-
-
-        if prevp.type == token.EQUAL:
-            if prevp.parent and prevp.parent.type in {
-                syms.typedargslist,
-                syms.varargslist,
-                syms.parameters,
-                syms.arglist,
-                syms.argument,
-            }:
-                return NO
-
-        elif prevp.type == token.DOUBLESTAR:
-            if prevp.parent and prevp.parent.type in {
-                syms.typedargslist,
-                syms.varargslist,
-                syms.parameters,
-                syms.arglist,
-                syms.dictsetmaker,
-            }:
-                return NO
-
-###############################################################################
-# SECTION BECAUSE SECTIONS
-###############################################################################
-
-def g():
-    NO = ''
-    SPACE = ' '
-    DOUBLESPACE = '  '
-
-    t = leaf.type
-    p = leaf.parent
-    v = leaf.value
-
-    # Comment because comments
-
-    if t in ALWAYS_NO_SPACE:
-        pass
-    if t == token.COMMENT:
-        return DOUBLESPACE
-
-    # Another comment because more comments
-    assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}'
-
-    prev = leaf.prev_sibling
-    if not prev:
-        prevp = preceding_leaf(p)
-
-        if not prevp or prevp.type in OPENING_BRACKETS:
-            # Start of the line or a bracketed expression.
-            # More than one line for the comment.
-            return NO
-
-        if prevp.type == token.EQUAL:
-            if prevp.parent and prevp.parent.type in {
-                syms.typedargslist,
-                syms.varargslist,
-                syms.parameters,
-                syms.arglist,
-                syms.argument,
-            }:
-                return NO
-
-
-# output
-
-
-"""Docstring."""
-
-
-# leading comment
-def f():
-    NO = ""
-    SPACE = " "
-    DOUBLESPACE = "  "
-
-    t = leaf.type
-    p = leaf.parent  # trailing comment
-    v = leaf.value
-
-    if t in ALWAYS_NO_SPACE:
-        pass
-    if t == token.COMMENT:  # another trailing comment
-        return DOUBLESPACE
-
-    assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
-
-    prev = leaf.prev_sibling
-    if not prev:
-        prevp = preceding_leaf(p)
-        if not prevp or prevp.type in OPENING_BRACKETS:
-
-            return NO
-
-        if prevp.type == token.EQUAL:
-            if prevp.parent and prevp.parent.type in {
-                syms.typedargslist,
-                syms.varargslist,
-                syms.parameters,
-                syms.arglist,
-                syms.argument,
-            }:
-                return NO
-
-        elif prevp.type == token.DOUBLESTAR:
-            if prevp.parent and prevp.parent.type in {
-                syms.typedargslist,
-                syms.varargslist,
-                syms.parameters,
-                syms.arglist,
-                syms.dictsetmaker,
-            }:
-                return NO
-
-
-###############################################################################
-# SECTION BECAUSE SECTIONS
-###############################################################################
-
-
-def g():
-    NO = ""
-    SPACE = " "
-    DOUBLESPACE = "  "
-
-    t = leaf.type
-    p = leaf.parent
-    v = leaf.value
-
-    # Comment because comments
-
-    if t in ALWAYS_NO_SPACE:
-        pass
-    if t == token.COMMENT:
-        return DOUBLESPACE
-
-    # Another comment because more comments
-    assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
-
-    prev = leaf.prev_sibling
-    if not prev:
-        prevp = preceding_leaf(p)
-
-        if not prevp or prevp.type in OPENING_BRACKETS:
-            # Start of the line or a bracketed expression.
-            # More than one line for the comment.
-            return NO
-
-        if prevp.type == token.EQUAL:
-            if prevp.parent and prevp.parent.type in {
-                syms.typedargslist,
-                syms.varargslist,
-                syms.parameters,
-                syms.arglist,
-                syms.argument,
-            }:
-                return NO
diff -pruN 22.3.0-1/tests/data/expression.diff 22.6.0-1/tests/data/expression.diff
--- 22.3.0-1/tests/data/expression.diff	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/expression.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,466 +0,0 @@
---- [Deterministic header]
-+++ [Deterministic header]
-@@ -1,8 +1,8 @@
- ...
--'some_string'
--b'\\xa3'
-+"some_string"
-+b"\\xa3"
- Name
- None
- True
- False
- 1
-@@ -21,99 +21,135 @@
- Name1 or (Name2 and Name3) or Name4
- Name1 or Name2 and Name3 or Name4
- v1 << 2
- 1 >> v2
- 1 % finished
--1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
--((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
-+1 + v2 - v3 * 4 ^ 5**v6 / 7 // 8
-+((1 + v2) - (v3 * 4)) ^ (((5**v6) / 7) // 8)
- not great
- ~great
- +value
- -1
- ~int and not v1 ^ 123 + v2 | True
- (~int) and (not ((v1 ^ (123 + v2)) | True))
--+really ** -confusing ** ~operator ** -precedence
--flags & ~ select.EPOLLIN and waiters.write_task is not None
-++(really ** -(confusing ** ~(operator**-precedence)))
-+flags & ~select.EPOLLIN and waiters.write_task is not None
- lambda arg: None
- lambda a=True: a
- lambda a, b, c=True: a
--lambda a, b, c=True, *, d=(1 << v2), e='str': a
--lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
-+lambda a, b, c=True, *, d=(1 << v2), e="str": a
-+lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
- manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
--foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
-+foo = lambda port_id, ignore_missing: {
-+    "port1": port1_resource,
-+    "port2": port2_resource,
-+}[port_id]
- 1 if True else 2
- str or None if True else str or bytes or None
- (str or None) if True else (str or bytes or None)
- str or None if (1 if True else 2) else str or bytes or None
- (str or None) if (1 if True else 2) else (str or bytes or None)
--((super_long_variable_name or None) if (1 if super_long_test_name else 2) else (str or bytes or None))
--{'2.7': dead, '3.7': (long_live or die_hard)}
--{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
-+(
-+    (super_long_variable_name or None)
-+    if (1 if super_long_test_name else 2)
-+    else (str or bytes or None)
-+)
-+{"2.7": dead, "3.7": (long_live or die_hard)}
-+{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
- {**a, **b, **c}
--{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
--({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
-+{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
-+({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
- ()
- (1,)
- (1, 2)
- (1, 2, 3)
- []
- [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
--[1, 2, 3,]
-+[
-+    1,
-+    2,
-+    3,
-+]
- [*a]
- [*range(10)]
--[*a, 4, 5,]
--[4, *a, 5,]
--[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
-+[
-+    *a,
-+    4,
-+    5,
-+]
-+[
-+    4,
-+    *a,
-+    5,
-+]
-+[
-+    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
-+    element,
-+    another,
-+    *more,
-+]
- {i for i in (1, 2, 3)}
--{(i ** 2) for i in (1, 2, 3)}
--{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
--{((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
-+{(i**2) for i in (1, 2, 3)}
-+{(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
-+{((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
- [i for i in (1, 2, 3)]
--[(i ** 2) for i in (1, 2, 3)]
--[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
--[((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
-+[(i**2) for i in (1, 2, 3)]
-+[(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
-+[((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
- {i: 0 for i in (1, 2, 3)}
--{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
-+{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
- {a: b * 2 for a, b in dictionary.items()}
- {a: b * -2 for a, b in dictionary.items()}
--{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
-+{
-+    k: v
-+    for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
-+}
- Python3 > Python2 > COBOL
- Life is Life
- call()
- call(arg)
--call(kwarg='hey')
--call(arg, kwarg='hey')
--call(arg, another, kwarg='hey', **kwargs)
--call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs)  # note: no trailing comma pre-3.6
-+call(kwarg="hey")
-+call(arg, kwarg="hey")
-+call(arg, another, kwarg="hey", **kwargs)
-+call(
-+    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
-+    arg,
-+    another,
-+    kwarg="hey",
-+    **kwargs
-+)  # note: no trailing comma pre-3.6
- call(*gidgets[:2])
- call(a, *gidgets[:2])
- call(**self.screen_kwargs)
- call(b, **self.screen_kwargs)
- lukasz.langa.pl
- call.me(maybe)
--1 .real
--1.0 .real
-+(1).real
-+(1.0).real
- ....__class__
- list[str]
- dict[str, int]
- tuple[str, ...]
-+tuple[str, int, float, dict[str, int]]
- tuple[
--    str, int, float, dict[str, int]
--]
--tuple[str, int, float, dict[str, int],]
-+    str,
-+    int,
-+    float,
-+    dict[str, int],
-+]
- very_long_variable_name_filters: t.List[
-     t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
- ]
- xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
- )
- xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
- )
--xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[
--    ..., List[SomeClass]
--] = classmethod(sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__))  # type: ignore
-+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(
-+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-+)  # type: ignore
- slice[0]
- slice[0:1]
- slice[0:1:2]
- slice[:]
- slice[:-1]
-@@ -137,118 +173,199 @@
- numpy[-(c + 1) :, d]
- numpy[:, l[-2]]
- numpy[:, ::-1]
- numpy[np.newaxis, :]
- (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
--{'2.7': dead, '3.7': long_live or die_hard}
--{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
-+{"2.7": dead, "3.7": long_live or die_hard}
-+{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
- (SomeName)
- SomeName
- (Good, Bad, Ugly)
- (i for i in (1, 2, 3))
--((i ** 2) for i in (1, 2, 3))
--((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
--(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
-+((i**2) for i in (1, 2, 3))
-+((i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
-+(((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
- (*starred,)
--{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
-+{
-+    "id": "1",
-+    "type": "type",
-+    "started_at": now(),
-+    "ended_at": now() + timedelta(days=10),
-+    "priority": 1,
-+    "import_session_id": 1,
-+    **kwargs,
-+}
- a = (1,)
--b = 1,
-+b = (1,)
- c = 1
- d = (1,) + a + (2,)
- e = (1,).count(1)
- f = 1, *range(10)
- g = 1, *"ten"
--what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
--what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
--result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc()).all()
--result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
-+what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
-+    vars_to_remove
-+)
-+what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
-+    vars_to_remove
-+)
-+result = (
-+    session.query(models.Customer.id)
-+    .filter(
-+        models.Customer.account_id == account_id, models.Customer.email == email_address
-+    )
-+    .order_by(models.Customer.id.asc())
-+    .all()
-+)
-+result = (
-+    session.query(models.Customer.id)
-+    .filter(
-+        models.Customer.account_id == account_id, models.Customer.email == email_address
-+    )
-+    .order_by(
-+        models.Customer.id.asc(),
-+    )
-+    .all()
-+)
- Ø = set()
- authors.łukasz.say_thanks()
- mapping = {
-     A: 0.25 * (10.0 / 12),
-     B: 0.1 * (10.0 / 12),
-     C: 0.1 * (10.0 / 12),
-     D: 0.1 * (10.0 / 12),
- }
- 
-+
- def gen():
-     yield from outside_of_generator
--    a = (yield)
--    b = ((yield))
--    c = (((yield)))
-+    a = yield
-+    b = yield
-+    c = yield
-+
- 
- async def f():
-     await some.complicated[0].call(with_args=(True or (1 is not 1)))
--print(* [] or [1])
-+
-+
-+print(*[] or [1])
- print(**{1: 3} if False else {x: x for x in range(3)})
--print(* lambda x: x)
--assert(not Test),("Short message")
--assert this is ComplexTest and not requirements.fit_in_a_single_line(force=False), "Short message"
--assert(((parens is TooMany)))
--for x, in (1,), (2,), (3,): ...
--for y in (): ...
--for z in (i for i in (1, 2, 3)): ...
--for i in (call()): ...
--for j in (1 + (2 + 3)): ...
--while(this and that): ...
--for addr_family, addr_type, addr_proto, addr_canonname, addr_sockaddr in socket.getaddrinfo('google.com', 'http'):
-+print(*lambda x: x)
-+assert not Test, "Short message"
-+assert this is ComplexTest and not requirements.fit_in_a_single_line(
-+    force=False
-+), "Short message"
-+assert parens is TooMany
-+for (x,) in (1,), (2,), (3,):
-+    ...
-+for y in ():
-+    ...
-+for z in (i for i in (1, 2, 3)):
-+    ...
-+for i in call():
-+    ...
-+for j in 1 + (2 + 3):
-+    ...
-+while this and that:
-+    ...
-+for (
-+    addr_family,
-+    addr_type,
-+    addr_proto,
-+    addr_canonname,
-+    addr_sockaddr,
-+) in socket.getaddrinfo("google.com", "http"):
-     pass
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--if (
--    threading.current_thread() != threading.main_thread() and
--    threading.current_thread() != threading.main_thread() or
--    signal.getsignal(signal.SIGINT) != signal.default_int_handler
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    ~ aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l ** aaaa.m // aaaa.n
--):
--    return True
--if (
--    ~ aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l ** aaaaaaaa.m // aaaaaaaa.n
--):
--    return True
--if (
--    ~ aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l ** aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
--):
--    return True
--aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaa * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa) / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+if (
-+    threading.current_thread() != threading.main_thread()
-+    and threading.current_thread() != threading.main_thread()
-+    or signal.getsignal(signal.SIGINT) != signal.default_int_handler
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e
-+    | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n
-+):
-+    return True
-+if (
-+    ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e
-+    | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h
-+    ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n
-+):
-+    return True
-+if (
-+    ~aaaaaaaaaaaaaaaa.a
-+    + aaaaaaaaaaaaaaaa.b
-+    - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e
-+    | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h
-+    ^ aaaaaaaaaaaaaaaa.i
-+    << aaaaaaaaaaaaaaaa.k
-+    >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
-+):
-+    return True
-+(
-+    aaaaaaaaaaaaaaaa
-+    + aaaaaaaaaaaaaaaa
-+    - aaaaaaaaaaaaaaaa
-+    * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-+    / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-+)
- aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+(
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+)
- bbbb >> bbbb * bbbb
--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ^bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+(
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    ^ bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    ^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+)
- last_call()
- # standalone comment at ENDMARKER
diff -pruN 22.3.0-1/tests/data/expression.py 22.6.0-1/tests/data/expression.py
--- 22.3.0-1/tests/data/expression.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/expression.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,630 +0,0 @@
-...
-'some_string'
-b'\\xa3'
-Name
-None
-True
-False
-1
-1.0
-1j
-True or False
-True or False or None
-True and False
-True and False and None
-(Name1 and Name2) or Name3
-Name1 and Name2 or Name3
-Name1 or (Name2 and Name3)
-Name1 or Name2 and Name3
-(Name1 and Name2) or (Name3 and Name4)
-Name1 and Name2 or Name3 and Name4
-Name1 or (Name2 and Name3) or Name4
-Name1 or Name2 and Name3 or Name4
-v1 << 2
-1 >> v2
-1 % finished
-1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
-((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
-not great
-~great
-+value
--1
-~int and not v1 ^ 123 + v2 | True
-(~int) and (not ((v1 ^ (123 + v2)) | True))
-+really ** -confusing ** ~operator ** -precedence
-flags & ~ select.EPOLLIN and waiters.write_task is not None
-lambda arg: None
-lambda a=True: a
-lambda a, b, c=True: a
-lambda a, b, c=True, *, d=(1 << v2), e='str': a
-lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
-manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
-foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
-1 if True else 2
-str or None if True else str or bytes or None
-(str or None) if True else (str or bytes or None)
-str or None if (1 if True else 2) else str or bytes or None
-(str or None) if (1 if True else 2) else (str or bytes or None)
-((super_long_variable_name or None) if (1 if super_long_test_name else 2) else (str or bytes or None))
-{'2.7': dead, '3.7': (long_live or die_hard)}
-{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
-{**a, **b, **c}
-{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
-({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
-()
-(1,)
-(1, 2)
-(1, 2, 3)
-[]
-[1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
-[1, 2, 3,]
-[*a]
-[*range(10)]
-[*a, 4, 5,]
-[4, *a, 5,]
-[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
-{i for i in (1, 2, 3)}
-{(i ** 2) for i in (1, 2, 3)}
-{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
-{((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
-[i for i in (1, 2, 3)]
-[(i ** 2) for i in (1, 2, 3)]
-[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
-[((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
-{i: 0 for i in (1, 2, 3)}
-{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
-{a: b * 2 for a, b in dictionary.items()}
-{a: b * -2 for a, b in dictionary.items()}
-{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
-Python3 > Python2 > COBOL
-Life is Life
-call()
-call(arg)
-call(kwarg='hey')
-call(arg, kwarg='hey')
-call(arg, another, kwarg='hey', **kwargs)
-call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs)  # note: no trailing comma pre-3.6
-call(*gidgets[:2])
-call(a, *gidgets[:2])
-call(**self.screen_kwargs)
-call(b, **self.screen_kwargs)
-lukasz.langa.pl
-call.me(maybe)
-1 .real
-1.0 .real
-....__class__
-list[str]
-dict[str, int]
-tuple[str, ...]
-tuple[
-    str, int, float, dict[str, int]
-]
-tuple[str, int, float, dict[str, int],]
-very_long_variable_name_filters: t.List[
-    t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
-]
-xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-)
-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-)
-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[
-    ..., List[SomeClass]
-] = classmethod(sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__))  # type: ignore
-slice[0]
-slice[0:1]
-slice[0:1:2]
-slice[:]
-slice[:-1]
-slice[1:]
-slice[::-1]
-slice[d :: d + 1]
-slice[:c, c - 1]
-numpy[:, 0:1]
-numpy[:, :-1]
-numpy[0, :]
-numpy[:, i]
-numpy[0, :2]
-numpy[:N, 0]
-numpy[:2, :4]
-numpy[2:4, 1:5]
-numpy[4:, 2:]
-numpy[:, (0, 1, 2, 5)]
-numpy[0, [0]]
-numpy[:, [i]]
-numpy[1 : c + 1, c]
-numpy[-(c + 1) :, d]
-numpy[:, l[-2]]
-numpy[:, ::-1]
-numpy[np.newaxis, :]
-(str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
-{'2.7': dead, '3.7': long_live or die_hard}
-{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
-[1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
-(SomeName)
-SomeName
-(Good, Bad, Ugly)
-(i for i in (1, 2, 3))
-((i ** 2) for i in (1, 2, 3))
-((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
-(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
-(*starred,)
-{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
-a = (1,)
-b = 1,
-c = 1
-d = (1,) + a + (2,)
-e = (1,).count(1)
-f = 1, *range(10)
-g = 1, *"ten"
-what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
-what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc()).all()
-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
-Ø = set()
-authors.łukasz.say_thanks()
-mapping = {
-    A: 0.25 * (10.0 / 12),
-    B: 0.1 * (10.0 / 12),
-    C: 0.1 * (10.0 / 12),
-    D: 0.1 * (10.0 / 12),
-}
-
-def gen():
-    yield from outside_of_generator
-    a = (yield)
-    b = ((yield))
-    c = (((yield)))
-
-async def f():
-    await some.complicated[0].call(with_args=(True or (1 is not 1)))
-print(* [] or [1])
-print(**{1: 3} if False else {x: x for x in range(3)})
-print(* lambda x: x)
-assert(not Test),("Short message")
-assert this is ComplexTest and not requirements.fit_in_a_single_line(force=False), "Short message"
-assert(((parens is TooMany)))
-for x, in (1,), (2,), (3,): ...
-for y in (): ...
-for z in (i for i in (1, 2, 3)): ...
-for i in (call()): ...
-for j in (1 + (2 + 3)): ...
-while(this and that): ...
-for addr_family, addr_type, addr_proto, addr_canonname, addr_sockaddr in socket.getaddrinfo('google.com', 'http'):
-    pass
-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-if (
-    threading.current_thread() != threading.main_thread() and
-    threading.current_thread() != threading.main_thread() or
-    signal.getsignal(signal.SIGINT) != signal.default_int_handler
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    ~ aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l ** aaaa.m // aaaa.n
-):
-    return True
-if (
-    ~ aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l ** aaaaaaaa.m // aaaaaaaa.n
-):
-    return True
-if (
-    ~ aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l ** aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
-):
-    return True
-aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaa * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa) / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-bbbb >> bbbb * bbbb
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ^bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-last_call()
-# standalone comment at ENDMARKER
-
-
-# output
-
-
-...
-"some_string"
-b"\\xa3"
-Name
-None
-True
-False
-1
-1.0
-1j
-True or False
-True or False or None
-True and False
-True and False and None
-(Name1 and Name2) or Name3
-Name1 and Name2 or Name3
-Name1 or (Name2 and Name3)
-Name1 or Name2 and Name3
-(Name1 and Name2) or (Name3 and Name4)
-Name1 and Name2 or Name3 and Name4
-Name1 or (Name2 and Name3) or Name4
-Name1 or Name2 and Name3 or Name4
-v1 << 2
-1 >> v2
-1 % finished
-1 + v2 - v3 * 4 ^ 5**v6 / 7 // 8
-((1 + v2) - (v3 * 4)) ^ (((5**v6) / 7) // 8)
-not great
-~great
-+value
--1
-~int and not v1 ^ 123 + v2 | True
-(~int) and (not ((v1 ^ (123 + v2)) | True))
-+(really ** -(confusing ** ~(operator**-precedence)))
-flags & ~select.EPOLLIN and waiters.write_task is not None
-lambda arg: None
-lambda a=True: a
-lambda a, b, c=True: a
-lambda a, b, c=True, *, d=(1 << v2), e="str": a
-lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
-manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
-foo = lambda port_id, ignore_missing: {
-    "port1": port1_resource,
-    "port2": port2_resource,
-}[port_id]
-1 if True else 2
-str or None if True else str or bytes or None
-(str or None) if True else (str or bytes or None)
-str or None if (1 if True else 2) else str or bytes or None
-(str or None) if (1 if True else 2) else (str or bytes or None)
-(
-    (super_long_variable_name or None)
-    if (1 if super_long_test_name else 2)
-    else (str or bytes or None)
-)
-{"2.7": dead, "3.7": (long_live or die_hard)}
-{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
-{**a, **b, **c}
-{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
-({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
-()
-(1,)
-(1, 2)
-(1, 2, 3)
-[]
-[1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
-[
-    1,
-    2,
-    3,
-]
-[*a]
-[*range(10)]
-[
-    *a,
-    4,
-    5,
-]
-[
-    4,
-    *a,
-    5,
-]
-[
-    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
-    element,
-    another,
-    *more,
-]
-{i for i in (1, 2, 3)}
-{(i**2) for i in (1, 2, 3)}
-{(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
-{((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
-[i for i in (1, 2, 3)]
-[(i**2) for i in (1, 2, 3)]
-[(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
-[((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
-{i: 0 for i in (1, 2, 3)}
-{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
-{a: b * 2 for a, b in dictionary.items()}
-{a: b * -2 for a, b in dictionary.items()}
-{
-    k: v
-    for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
-}
-Python3 > Python2 > COBOL
-Life is Life
-call()
-call(arg)
-call(kwarg="hey")
-call(arg, kwarg="hey")
-call(arg, another, kwarg="hey", **kwargs)
-call(
-    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
-    arg,
-    another,
-    kwarg="hey",
-    **kwargs
-)  # note: no trailing comma pre-3.6
-call(*gidgets[:2])
-call(a, *gidgets[:2])
-call(**self.screen_kwargs)
-call(b, **self.screen_kwargs)
-lukasz.langa.pl
-call.me(maybe)
-(1).real
-(1.0).real
-....__class__
-list[str]
-dict[str, int]
-tuple[str, ...]
-tuple[str, int, float, dict[str, int]]
-tuple[
-    str,
-    int,
-    float,
-    dict[str, int],
-]
-very_long_variable_name_filters: t.List[
-    t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
-]
-xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-)
-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-)
-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(
-    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-)  # type: ignore
-slice[0]
-slice[0:1]
-slice[0:1:2]
-slice[:]
-slice[:-1]
-slice[1:]
-slice[::-1]
-slice[d :: d + 1]
-slice[:c, c - 1]
-numpy[:, 0:1]
-numpy[:, :-1]
-numpy[0, :]
-numpy[:, i]
-numpy[0, :2]
-numpy[:N, 0]
-numpy[:2, :4]
-numpy[2:4, 1:5]
-numpy[4:, 2:]
-numpy[:, (0, 1, 2, 5)]
-numpy[0, [0]]
-numpy[:, [i]]
-numpy[1 : c + 1, c]
-numpy[-(c + 1) :, d]
-numpy[:, l[-2]]
-numpy[:, ::-1]
-numpy[np.newaxis, :]
-(str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
-{"2.7": dead, "3.7": long_live or die_hard}
-{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
-[1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
-(SomeName)
-SomeName
-(Good, Bad, Ugly)
-(i for i in (1, 2, 3))
-((i**2) for i in (1, 2, 3))
-((i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
-(((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
-(*starred,)
-{
-    "id": "1",
-    "type": "type",
-    "started_at": now(),
-    "ended_at": now() + timedelta(days=10),
-    "priority": 1,
-    "import_session_id": 1,
-    **kwargs,
-}
-a = (1,)
-b = (1,)
-c = 1
-d = (1,) + a + (2,)
-e = (1,).count(1)
-f = 1, *range(10)
-g = 1, *"ten"
-what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
-    vars_to_remove
-)
-what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
-    vars_to_remove
-)
-result = (
-    session.query(models.Customer.id)
-    .filter(
-        models.Customer.account_id == account_id, models.Customer.email == email_address
-    )
-    .order_by(models.Customer.id.asc())
-    .all()
-)
-result = (
-    session.query(models.Customer.id)
-    .filter(
-        models.Customer.account_id == account_id, models.Customer.email == email_address
-    )
-    .order_by(
-        models.Customer.id.asc(),
-    )
-    .all()
-)
-Ø = set()
-authors.łukasz.say_thanks()
-mapping = {
-    A: 0.25 * (10.0 / 12),
-    B: 0.1 * (10.0 / 12),
-    C: 0.1 * (10.0 / 12),
-    D: 0.1 * (10.0 / 12),
-}
-
-
-def gen():
-    yield from outside_of_generator
-    a = yield
-    b = yield
-    c = yield
-
-
-async def f():
-    await some.complicated[0].call(with_args=(True or (1 is not 1)))
-
-
-print(*[] or [1])
-print(**{1: 3} if False else {x: x for x in range(3)})
-print(*lambda x: x)
-assert not Test, "Short message"
-assert this is ComplexTest and not requirements.fit_in_a_single_line(
-    force=False
-), "Short message"
-assert parens is TooMany
-for (x,) in (1,), (2,), (3,):
-    ...
-for y in ():
-    ...
-for z in (i for i in (1, 2, 3)):
-    ...
-for i in call():
-    ...
-for j in 1 + (2 + 3):
-    ...
-while this and that:
-    ...
-for (
-    addr_family,
-    addr_type,
-    addr_proto,
-    addr_canonname,
-    addr_sockaddr,
-) in socket.getaddrinfo("google.com", "http"):
-    pass
-a = (
-    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-    in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-)
-a = (
-    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-    not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-)
-a = (
-    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-    is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-)
-a = (
-    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-    is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-)
-if (
-    threading.current_thread() != threading.main_thread()
-    and threading.current_thread() != threading.main_thread()
-    or signal.getsignal(signal.SIGINT) != signal.default_int_handler
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-):
-    return True
-if (
-    ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e
-    | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n
-):
-    return True
-if (
-    ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e
-    | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h
-    ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n
-):
-    return True
-if (
-    ~aaaaaaaaaaaaaaaa.a
-    + aaaaaaaaaaaaaaaa.b
-    - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e
-    | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h
-    ^ aaaaaaaaaaaaaaaa.i
-    << aaaaaaaaaaaaaaaa.k
-    >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
-):
-    return True
-(
-    aaaaaaaaaaaaaaaa
-    + aaaaaaaaaaaaaaaa
-    - aaaaaaaaaaaaaaaa
-    * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-    / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-)
-aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
-(
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-)
-bbbb >> bbbb * bbbb
-(
-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    ^ bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    ^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-)
-last_call()
-# standalone comment at ENDMARKER
diff -pruN 22.3.0-1/tests/data/expression_skip_magic_trailing_comma.diff 22.6.0-1/tests/data/expression_skip_magic_trailing_comma.diff
--- 22.3.0-1/tests/data/expression_skip_magic_trailing_comma.diff	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/expression_skip_magic_trailing_comma.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,447 +0,0 @@
---- [Deterministic header]
-+++ [Deterministic header]
-@@ -1,8 +1,8 @@
- ...
--'some_string'
--b'\\xa3'
-+"some_string"
-+b"\\xa3"
- Name
- None
- True
- False
- 1
-@@ -21,99 +21,118 @@
- Name1 or (Name2 and Name3) or Name4
- Name1 or Name2 and Name3 or Name4
- v1 << 2
- 1 >> v2
- 1 % finished
--1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
--((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
-+1 + v2 - v3 * 4 ^ 5**v6 / 7 // 8
-+((1 + v2) - (v3 * 4)) ^ (((5**v6) / 7) // 8)
- not great
- ~great
- +value
- -1
- ~int and not v1 ^ 123 + v2 | True
- (~int) and (not ((v1 ^ (123 + v2)) | True))
--+really ** -confusing ** ~operator ** -precedence
--flags & ~ select.EPOLLIN and waiters.write_task is not None
-++(really ** -(confusing ** ~(operator**-precedence)))
-+flags & ~select.EPOLLIN and waiters.write_task is not None
- lambda arg: None
- lambda a=True: a
- lambda a, b, c=True: a
--lambda a, b, c=True, *, d=(1 << v2), e='str': a
--lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
-+lambda a, b, c=True, *, d=(1 << v2), e="str": a
-+lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
- manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
--foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
-+foo = lambda port_id, ignore_missing: {
-+    "port1": port1_resource,
-+    "port2": port2_resource,
-+}[port_id]
- 1 if True else 2
- str or None if True else str or bytes or None
- (str or None) if True else (str or bytes or None)
- str or None if (1 if True else 2) else str or bytes or None
- (str or None) if (1 if True else 2) else (str or bytes or None)
--((super_long_variable_name or None) if (1 if super_long_test_name else 2) else (str or bytes or None))
--{'2.7': dead, '3.7': (long_live or die_hard)}
--{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
-+(
-+    (super_long_variable_name or None)
-+    if (1 if super_long_test_name else 2)
-+    else (str or bytes or None)
-+)
-+{"2.7": dead, "3.7": (long_live or die_hard)}
-+{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
- {**a, **b, **c}
--{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
--({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
-+{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
-+({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
- ()
- (1,)
- (1, 2)
- (1, 2, 3)
- []
- [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
--[1, 2, 3,]
-+[1, 2, 3]
- [*a]
- [*range(10)]
--[*a, 4, 5,]
--[4, *a, 5,]
--[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
-+[*a, 4, 5]
-+[4, *a, 5]
-+[
-+    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
-+    element,
-+    another,
-+    *more,
-+]
- {i for i in (1, 2, 3)}
--{(i ** 2) for i in (1, 2, 3)}
--{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
--{((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
-+{(i**2) for i in (1, 2, 3)}
-+{(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
-+{((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
- [i for i in (1, 2, 3)]
--[(i ** 2) for i in (1, 2, 3)]
--[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
--[((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
-+[(i**2) for i in (1, 2, 3)]
-+[(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
-+[((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
- {i: 0 for i in (1, 2, 3)}
--{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
-+{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
- {a: b * 2 for a, b in dictionary.items()}
- {a: b * -2 for a, b in dictionary.items()}
--{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
-+{
-+    k: v
-+    for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
-+}
- Python3 > Python2 > COBOL
- Life is Life
- call()
- call(arg)
--call(kwarg='hey')
--call(arg, kwarg='hey')
--call(arg, another, kwarg='hey', **kwargs)
--call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs)  # note: no trailing comma pre-3.6
-+call(kwarg="hey")
-+call(arg, kwarg="hey")
-+call(arg, another, kwarg="hey", **kwargs)
-+call(
-+    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
-+    arg,
-+    another,
-+    kwarg="hey",
-+    **kwargs
-+)  # note: no trailing comma pre-3.6
- call(*gidgets[:2])
- call(a, *gidgets[:2])
- call(**self.screen_kwargs)
- call(b, **self.screen_kwargs)
- lukasz.langa.pl
- call.me(maybe)
--1 .real
--1.0 .real
-+(1).real
-+(1.0).real
- ....__class__
- list[str]
- dict[str, int]
- tuple[str, ...]
--tuple[
--    str, int, float, dict[str, int]
--]
-+tuple[str, int, float, dict[str, int]]
- tuple[str, int, float, dict[str, int],]
- very_long_variable_name_filters: t.List[
-     t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
- ]
- xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
- )
- xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
-     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
- )
--xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[
--    ..., List[SomeClass]
--] = classmethod(sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__))  # type: ignore
-+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(
-+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
-+)  # type: ignore
- slice[0]
- slice[0:1]
- slice[0:1:2]
- slice[:]
- slice[:-1]
-@@ -137,118 +156,197 @@
- numpy[-(c + 1) :, d]
- numpy[:, l[-2]]
- numpy[:, ::-1]
- numpy[np.newaxis, :]
- (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
--{'2.7': dead, '3.7': long_live or die_hard}
--{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
-+{"2.7": dead, "3.7": long_live or die_hard}
-+{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
- (SomeName)
- SomeName
- (Good, Bad, Ugly)
- (i for i in (1, 2, 3))
--((i ** 2) for i in (1, 2, 3))
--((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
--(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
-+((i**2) for i in (1, 2, 3))
-+((i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
-+(((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
- (*starred,)
--{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
-+{
-+    "id": "1",
-+    "type": "type",
-+    "started_at": now(),
-+    "ended_at": now() + timedelta(days=10),
-+    "priority": 1,
-+    "import_session_id": 1,
-+    **kwargs,
-+}
- a = (1,)
--b = 1,
-+b = (1,)
- c = 1
- d = (1,) + a + (2,)
- e = (1,).count(1)
- f = 1, *range(10)
- g = 1, *"ten"
--what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
--what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
--result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc()).all()
--result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
-+what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
-+    vars_to_remove
-+)
-+what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
-+    vars_to_remove
-+)
-+result = (
-+    session.query(models.Customer.id)
-+    .filter(
-+        models.Customer.account_id == account_id, models.Customer.email == email_address
-+    )
-+    .order_by(models.Customer.id.asc())
-+    .all()
-+)
-+result = (
-+    session.query(models.Customer.id)
-+    .filter(
-+        models.Customer.account_id == account_id, models.Customer.email == email_address
-+    )
-+    .order_by(models.Customer.id.asc())
-+    .all()
-+)
- Ø = set()
- authors.łukasz.say_thanks()
- mapping = {
-     A: 0.25 * (10.0 / 12),
-     B: 0.1 * (10.0 / 12),
-     C: 0.1 * (10.0 / 12),
-     D: 0.1 * (10.0 / 12),
- }
- 
-+
- def gen():
-     yield from outside_of_generator
--    a = (yield)
--    b = ((yield))
--    c = (((yield)))
-+    a = yield
-+    b = yield
-+    c = yield
-+
- 
- async def f():
-     await some.complicated[0].call(with_args=(True or (1 is not 1)))
--print(* [] or [1])
-+
-+
-+print(*[] or [1])
- print(**{1: 3} if False else {x: x for x in range(3)})
--print(* lambda x: x)
--assert(not Test),("Short message")
--assert this is ComplexTest and not requirements.fit_in_a_single_line(force=False), "Short message"
--assert(((parens is TooMany)))
--for x, in (1,), (2,), (3,): ...
--for y in (): ...
--for z in (i for i in (1, 2, 3)): ...
--for i in (call()): ...
--for j in (1 + (2 + 3)): ...
--while(this and that): ...
--for addr_family, addr_type, addr_proto, addr_canonname, addr_sockaddr in socket.getaddrinfo('google.com', 'http'):
-+print(*lambda x: x)
-+assert not Test, "Short message"
-+assert this is ComplexTest and not requirements.fit_in_a_single_line(
-+    force=False
-+), "Short message"
-+assert parens is TooMany
-+for (x,) in (1,), (2,), (3,):
-+    ...
-+for y in ():
-+    ...
-+for z in (i for i in (1, 2, 3)):
-+    ...
-+for i in call():
-+    ...
-+for j in 1 + (2 + 3):
-+    ...
-+while this and that:
-+    ...
-+for (
-+    addr_family,
-+    addr_type,
-+    addr_proto,
-+    addr_canonname,
-+    addr_sockaddr,
-+) in socket.getaddrinfo("google.com", "http"):
-     pass
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
--if (
--    threading.current_thread() != threading.main_thread() and
--    threading.current_thread() != threading.main_thread() or
--    signal.getsignal(signal.SIGINT) != signal.default_int_handler
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
--    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--):
--    return True
--if (
--    ~ aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l ** aaaa.m // aaaa.n
--):
--    return True
--if (
--    ~ aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l ** aaaaaaaa.m // aaaaaaaa.n
--):
--    return True
--if (
--    ~ aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l ** aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
--):
--    return True
--aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaa * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa) / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+a = (
-+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
-+    is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
-+)
-+if (
-+    threading.current_thread() != threading.main_thread()
-+    and threading.current_thread() != threading.main_thread()
-+    or signal.getsignal(signal.SIGINT) != signal.default_int_handler
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+):
-+    return True
-+if (
-+    ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e
-+    | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n
-+):
-+    return True
-+if (
-+    ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e
-+    | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h
-+    ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n
-+):
-+    return True
-+if (
-+    ~aaaaaaaaaaaaaaaa.a
-+    + aaaaaaaaaaaaaaaa.b
-+    - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e
-+    | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h
-+    ^ aaaaaaaaaaaaaaaa.i
-+    << aaaaaaaaaaaaaaaa.k
-+    >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
-+):
-+    return True
-+(
-+    aaaaaaaaaaaaaaaa
-+    + aaaaaaaaaaaaaaaa
-+    - aaaaaaaaaaaaaaaa
-+    * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-+    / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
-+)
- aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+(
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+)
- bbbb >> bbbb * bbbb
--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ^bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+(
-+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    ^ bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+    ^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-+)
- last_call()
- # standalone comment at ENDMARKER
diff -pruN 22.3.0-1/tests/data/fast/pep_572_do_not_remove_parens.py 22.6.0-1/tests/data/fast/pep_572_do_not_remove_parens.py
--- 22.3.0-1/tests/data/fast/pep_572_do_not_remove_parens.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/fast/pep_572_do_not_remove_parens.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,21 @@
+# Most of the following examples are really dumb, some of them aren't even accepted by Python,
+# we're fixing them only so fuzzers (which follow the grammar which actually allows these
+# examples matter of fact!) don't yell at us :p
+
+del (a := [1])
+
+try:
+    pass
+except (a := 1) as (b := why_does_this_exist):
+    pass
+
+for (z := 124) in (x := -124):
+    pass
+
+with (y := [3, 2, 1]) as (funfunfun := indeed):
+    pass
+
+
+@(please := stop)
+def sigh():
+    pass
diff -pruN 22.3.0-1/tests/data/fmtonoff2.py 22.6.0-1/tests/data/fmtonoff2.py
--- 22.3.0-1/tests/data/fmtonoff2.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtonoff2.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,40 +0,0 @@
-import pytest
-
-TmSt = 1
-TmEx = 2
-
-# fmt: off
-
-# Test data:
-#   Position, Volume, State, TmSt/TmEx/None, [call, [arg1...]]
-
-@pytest.mark.parametrize('test', [
-
-    # Test don't manage the volume
-    [
-        ('stuff', 'in')
-    ],
-])
-def test_fader(test):
-    pass
-
-def check_fader(test):
-
-    pass
-
-def verify_fader(test):
-  # misaligned comment
-    pass
-
-def verify_fader(test):
-    """Hey, ho."""
-    assert test.passed()
-
-def test_calculate_fades():
-    calcs = [
-        # one is zero/none
-        (0, 4, 0, 0, 10,        0, 0, 6, 10),
-        (None, 4, 0, 0, 10,     0, 0, 6, 10),
-    ]
-
-# fmt: on
diff -pruN 22.3.0-1/tests/data/fmtonoff3.py 22.6.0-1/tests/data/fmtonoff3.py
--- 22.3.0-1/tests/data/fmtonoff3.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtonoff3.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,35 +0,0 @@
-# fmt: off
-x = [
-    1, 2,
-    3, 4,
-]
-# fmt: on
-
-# fmt: off
-x = [
-    1, 2,
-    3, 4,
-]
-# fmt: on
-
-x = [
-    1, 2, 3, 4
-]
-
-# output
-
-# fmt: off
-x = [
-    1, 2,
-    3, 4,
-]
-# fmt: on
-
-# fmt: off
-x = [
-    1, 2,
-    3, 4,
-]
-# fmt: on
-
-x = [1, 2, 3, 4]
diff -pruN 22.3.0-1/tests/data/fmtonoff4.py 22.6.0-1/tests/data/fmtonoff4.py
--- 22.3.0-1/tests/data/fmtonoff4.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtonoff4.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,36 +0,0 @@
-# fmt: off
-@test([
-    1, 2,
-    3, 4,
-])
-# fmt: on
-def f(): pass
-
-@test([
-    1, 2,
-    3, 4,
-])
-def f(): pass
-
-# output
-
-# fmt: off
-@test([
-    1, 2,
-    3, 4,
-])
-# fmt: on
-def f():
-    pass
-
-
-@test(
-    [
-        1,
-        2,
-        3,
-        4,
-    ]
-)
-def f():
-    pass
diff -pruN 22.3.0-1/tests/data/fmtonoff.py 22.6.0-1/tests/data/fmtonoff.py
--- 22.3.0-1/tests/data/fmtonoff.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtonoff.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,413 +0,0 @@
-#!/usr/bin/env python3
-import asyncio
-import sys
-
-from third_party import X, Y, Z
-
-from library import some_connection, \
-                    some_decorator
-# fmt: off
-from third_party import (X,
-                         Y, Z)
-# fmt: on
-f'trigger 3.6 mode'
-# Comment 1
-
-# Comment 2
-
-# fmt: off
-def func_no_args():
-  a; b; c
-  if True: raise RuntimeError
-  if False: ...
-  for i in range(10):
-    print(i)
-    continue
-  exec('new-style exec', {}, {})
-  return None
-async def coroutine(arg, exec=False):
- 'Single-line docstring. Multiline is harder to reformat.'
- async with some_connection() as conn:
-     await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
- await asyncio.sleep(1)
-@asyncio.coroutine
-@some_decorator(
-with_args=True,
-many_args=[1,2,3]
-)
-def function_signature_stress_test(number:int,no_annotation=None,text:str='default',* ,debug:bool=False,**kwargs) -> str:
- return text[number:-1]
-# fmt: on
-def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
- offset = attr.ib(default=attr.Factory( lambda: _r.uniform(1, 2)))
- assert task._cancel_stack[:len(old_stack)] == old_stack
-def spaces_types(a: int = 1, b: tuple = (), c: list = [], d: dict = {}, e: bool = True, f: int = -1, g: int = 1 if False else 2, h: str = "", i: str = r''): ...
-def spaces2(result= _core.Value(None)):
- ...
-something = {
-    # fmt: off
-    key: 'value',
-}
-
-def subscriptlist():
-    atom[
-        # fmt: off
-        'some big and',
-        'complex subscript',
-        # fmt: on
-        goes + here, andhere,
-       ]
-
-def import_as_names():
-    # fmt: off
-    from hello import a,        b
-    'unformatted'
-    # fmt: on
-
-def testlist_star_expr():
-    # fmt: off
-    a , b = *hello
-    'unformatted'
-    # fmt: on
-
-def yield_expr():
-    # fmt: off
-    yield hello
-    'unformatted'
-    # fmt: on
-    'formatted'
-    # fmt: off
-    ( yield hello )
-    'unformatted'
-    # fmt: on
-
-def example(session):
-    # fmt: off
-    result = session\
-        .query(models.Customer.id)\
-        .filter(models.Customer.account_id == account_id,
-                models.Customer.email == email_address)\
-        .order_by(models.Customer.id.asc())\
-        .all()
-    # fmt: on
-def off_and_on_without_data():
-    """All comments here are technically on the same prefix.
-
-    The comments between will be formatted. This is a known limitation.
-    """
-    # fmt: off
-
-
-        #hey, that won't work
-
-
-    # fmt: on
-    pass
-def on_and_off_broken():
-    """Another known limitation."""
-    # fmt: on
-    # fmt: off
-    this=should.not_be.formatted()
-    and_=indeed . it  is  not  formatted
-    because . the . handling . inside . generate_ignored_nodes()
-    now . considers . multiple . fmt . directives . within . one . prefix
-    # fmt: on
-    # fmt: off
-        # ...but comments still get reformatted even though they should not be
-    # fmt: on
-def long_lines():
-    if True:
-        typedargslist.extend(
-            gen_annotated_params(ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True)
-        )
-        # fmt: off
-        a = (
-            unnecessary_bracket()
-        )
-        # fmt: on
-    _type_comment_re = re.compile(
-        r"""
-        ^
-        [\t ]*
-        \#[ ]type:[ ]*
-        (?P<type>
-            [^#\t\n]+?
-        )
-        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
-                        # a trailing space which is why we need the silliness below
-        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
-        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
-        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
-        [\t ]*
-        (?P<nl>
-            (?:\#[^\n]*)?
-            \n?
-        )
-        $
-        """,
-        # fmt: off
-        re.MULTILINE|re.VERBOSE
-        # fmt: on
-    )
-def single_literal_yapf_disable():
-    """Black does not support this."""
-    BAZ = {
-        (1, 2, 3, 4),
-        (5, 6, 7, 8),
-        (9, 10, 11, 12)
-    }  # yapf: disable
-cfg.rule(
-    "Default", "address",
-    xxxx_xxxx=["xxx-xxxxxx-xxxxxxxxxx"],
-    xxxxxx="xx_xxxxx", xxxxxxx="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
-    xxxxxxxxx_xxxx=True, xxxxxxxx_xxxxxxxxxx=False,
-    xxxxxx_xxxxxx=2, xxxxxx_xxxxx_xxxxxxxx=70, xxxxxx_xxxxxx_xxxxx=True,
-    # fmt: off
-    xxxxxxx_xxxxxxxxxxxx={
-        "xxxxxxxx": {
-            "xxxxxx": False,
-            "xxxxxxx": False,
-            "xxxx_xxxxxx": "xxxxx",
-        },
-        "xxxxxxxx-xxxxx": {
-            "xxxxxx": False,
-            "xxxxxxx": True,
-            "xxxx_xxxxxx": "xxxxxx",
-        },
-    },
-    # fmt: on
-    xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5
-)
-# fmt: off
-yield  'hello'
-# No formatting to the end of the file
-l=[1,2,3]
-d={'a':1,
-   'b':2}
-
-# output
-
-
-#!/usr/bin/env python3
-import asyncio
-import sys
-
-from third_party import X, Y, Z
-
-from library import some_connection, some_decorator
-
-# fmt: off
-from third_party import (X,
-                         Y, Z)
-# fmt: on
-f"trigger 3.6 mode"
-# Comment 1
-
-# Comment 2
-
-# fmt: off
-def func_no_args():
-  a; b; c
-  if True: raise RuntimeError
-  if False: ...
-  for i in range(10):
-    print(i)
-    continue
-  exec('new-style exec', {}, {})
-  return None
-async def coroutine(arg, exec=False):
- 'Single-line docstring. Multiline is harder to reformat.'
- async with some_connection() as conn:
-     await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
- await asyncio.sleep(1)
-@asyncio.coroutine
-@some_decorator(
-with_args=True,
-many_args=[1,2,3]
-)
-def function_signature_stress_test(number:int,no_annotation=None,text:str='default',* ,debug:bool=False,**kwargs) -> str:
- return text[number:-1]
-# fmt: on
-def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r""):
-    offset = attr.ib(default=attr.Factory(lambda: _r.uniform(1, 2)))
-    assert task._cancel_stack[: len(old_stack)] == old_stack
-
-
-def spaces_types(
-    a: int = 1,
-    b: tuple = (),
-    c: list = [],
-    d: dict = {},
-    e: bool = True,
-    f: int = -1,
-    g: int = 1 if False else 2,
-    h: str = "",
-    i: str = r"",
-):
-    ...
-
-
-def spaces2(result=_core.Value(None)):
-    ...
-
-
-something = {
-    # fmt: off
-    key: 'value',
-}
-
-
-def subscriptlist():
-    atom[
-        # fmt: off
-        'some big and',
-        'complex subscript',
-        # fmt: on
-        goes + here,
-        andhere,
-    ]
-
-
-def import_as_names():
-    # fmt: off
-    from hello import a,        b
-    'unformatted'
-    # fmt: on
-
-
-def testlist_star_expr():
-    # fmt: off
-    a , b = *hello
-    'unformatted'
-    # fmt: on
-
-
-def yield_expr():
-    # fmt: off
-    yield hello
-    'unformatted'
-    # fmt: on
-    "formatted"
-    # fmt: off
-    ( yield hello )
-    'unformatted'
-    # fmt: on
-
-
-def example(session):
-    # fmt: off
-    result = session\
-        .query(models.Customer.id)\
-        .filter(models.Customer.account_id == account_id,
-                models.Customer.email == email_address)\
-        .order_by(models.Customer.id.asc())\
-        .all()
-    # fmt: on
-
-
-def off_and_on_without_data():
-    """All comments here are technically on the same prefix.
-
-    The comments between will be formatted. This is a known limitation.
-    """
-    # fmt: off
-
-    # hey, that won't work
-
-    # fmt: on
-    pass
-
-
-def on_and_off_broken():
-    """Another known limitation."""
-    # fmt: on
-    # fmt: off
-    this=should.not_be.formatted()
-    and_=indeed . it  is  not  formatted
-    because . the . handling . inside . generate_ignored_nodes()
-    now . considers . multiple . fmt . directives . within . one . prefix
-    # fmt: on
-    # fmt: off
-    # ...but comments still get reformatted even though they should not be
-    # fmt: on
-
-
-def long_lines():
-    if True:
-        typedargslist.extend(
-            gen_annotated_params(
-                ast_args.kwonlyargs,
-                ast_args.kw_defaults,
-                parameters,
-                implicit_default=True,
-            )
-        )
-        # fmt: off
-        a = (
-            unnecessary_bracket()
-        )
-        # fmt: on
-    _type_comment_re = re.compile(
-        r"""
-        ^
-        [\t ]*
-        \#[ ]type:[ ]*
-        (?P<type>
-            [^#\t\n]+?
-        )
-        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
-                        # a trailing space which is why we need the silliness below
-        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
-        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
-        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
-        [\t ]*
-        (?P<nl>
-            (?:\#[^\n]*)?
-            \n?
-        )
-        $
-        """,
-        # fmt: off
-        re.MULTILINE|re.VERBOSE
-        # fmt: on
-    )
-
-
-def single_literal_yapf_disable():
-    """Black does not support this."""
-    BAZ = {(1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12)}  # yapf: disable
-
-
-cfg.rule(
-    "Default",
-    "address",
-    xxxx_xxxx=["xxx-xxxxxx-xxxxxxxxxx"],
-    xxxxxx="xx_xxxxx",
-    xxxxxxx="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
-    xxxxxxxxx_xxxx=True,
-    xxxxxxxx_xxxxxxxxxx=False,
-    xxxxxx_xxxxxx=2,
-    xxxxxx_xxxxx_xxxxxxxx=70,
-    xxxxxx_xxxxxx_xxxxx=True,
-    # fmt: off
-    xxxxxxx_xxxxxxxxxxxx={
-        "xxxxxxxx": {
-            "xxxxxx": False,
-            "xxxxxxx": False,
-            "xxxx_xxxxxx": "xxxxx",
-        },
-        "xxxxxxxx-xxxxx": {
-            "xxxxxx": False,
-            "xxxxxxx": True,
-            "xxxx_xxxxxx": "xxxxxx",
-        },
-    },
-    # fmt: on
-    xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5,
-)
-# fmt: off
-yield  'hello'
-# No formatting to the end of the file
-l=[1,2,3]
-d={'a':1,
-   'b':2}
diff -pruN 22.3.0-1/tests/data/fmtskip2.py 22.6.0-1/tests/data/fmtskip2.py
--- 22.3.0-1/tests/data/fmtskip2.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtskip2.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-l1 = ["This list should be broken up", "into multiple lines", "because it is way too long"]
-l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"]  # fmt: skip
-l3 = ["I have", "trailing comma", "so I should be braked",]
-
-# output
-
-l1 = [
-    "This list should be broken up",
-    "into multiple lines",
-    "because it is way too long",
-]
-l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"]  # fmt: skip
-l3 = [
-    "I have",
-    "trailing comma",
-    "so I should be braked",
-]
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/fmtskip3.py 22.6.0-1/tests/data/fmtskip3.py
--- 22.3.0-1/tests/data/fmtskip3.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtskip3.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-a  =    3
-# fmt: off
-b,    c = 1, 2
-d =    6  # fmt: skip
-e = 5
-# fmt: on
-f = ["This is a very long line that should be formatted into a clearer line ", "by rearranging."]
-
-# output
-
-a = 3
-# fmt: off
-b,    c = 1, 2
-d =    6  # fmt: skip
-e = 5
-# fmt: on
-f = [
-    "This is a very long line that should be formatted into a clearer line ",
-    "by rearranging.",
-]
diff -pruN 22.3.0-1/tests/data/fmtskip4.py 22.6.0-1/tests/data/fmtskip4.py
--- 22.3.0-1/tests/data/fmtskip4.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtskip4.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-a =   2
-# fmt: skip
-l = [1, 2, 3,]
-
-# output
-
-a = 2
-# fmt: skip
-l = [
-    1,
-    2,
-    3,
-]
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/fmtskip5.py 22.6.0-1/tests/data/fmtskip5.py
--- 22.3.0-1/tests/data/fmtskip5.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtskip5.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-a, b, c = 3, 4,       5
-if (
-    a ==    3
-    and b    != 9  # fmt: skip
-    and c is not None
-):
-    print("I'm good!")
-else:
-    print("I'm bad")
-
-
-# output
-
-a, b, c = 3, 4, 5
-if (
-    a == 3
-    and b    != 9  # fmt: skip
-    and c is not None
-):
-    print("I'm good!")
-else:
-    print("I'm bad")
diff -pruN 22.3.0-1/tests/data/fmtskip6.py 22.6.0-1/tests/data/fmtskip6.py
--- 22.3.0-1/tests/data/fmtskip6.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtskip6.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-class A:
-    def f(self):
-        for line in range(10):
-            if True:
-                pass  # fmt: skip
-
-# output
-
-class A:
-    def f(self):
-        for line in range(10):
-            if True:
-                pass  # fmt: skip
diff -pruN 22.3.0-1/tests/data/fmtskip.py 22.6.0-1/tests/data/fmtskip.py
--- 22.3.0-1/tests/data/fmtskip.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fmtskip.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-a, b = 1, 2
-c =    6  # fmt: skip
-d = 5
diff -pruN 22.3.0-1/tests/data/force_py36.py 22.6.0-1/tests/data/force_py36.py
--- 22.3.0-1/tests/data/force_py36.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/force_py36.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,16 +0,0 @@
-# The input source must not contain any Py36-specific syntax (e.g. argument type
-# annotations, trailing comma after *rest) or this test becomes invalid.
-def long_function_name(argument_one, argument_two, argument_three, argument_four, argument_five, argument_six, *rest): ...
-# output
-# The input source must not contain any Py36-specific syntax (e.g. argument type
-# annotations, trailing comma after *rest) or this test becomes invalid.
-def long_function_name(
-    argument_one,
-    argument_two,
-    argument_three,
-    argument_four,
-    argument_five,
-    argument_six,
-    *rest,
-):
-    ...
diff -pruN 22.3.0-1/tests/data/force_pyi.py 22.6.0-1/tests/data/force_pyi.py
--- 22.3.0-1/tests/data/force_pyi.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/force_pyi.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,65 +0,0 @@
-from typing import Union
-
-@bird
-def zoo(): ...
-
-class A: ...
-@bar
-class B:
-    def BMethod(self) -> None: ...
-    @overload
-    def BMethod(self, arg : List[str]) -> None: ...
-
-class C: ...
-@hmm
-class D: ...
-class E: ...
-
-@baz
-def foo() -> None:
-    ...
-
-class F (A , C): ...
-def spam() -> None: ...
-
-@overload
-def spam(arg: str) -> str: ...
-
-var  : int = 1
-
-def eggs() -> Union[str, int]: ...
-
-# output
-
-from typing import Union
-
-@bird
-def zoo(): ...
-
-class A: ...
-
-@bar
-class B:
-    def BMethod(self) -> None: ...
-    @overload
-    def BMethod(self, arg: List[str]) -> None: ...
-
-class C: ...
-
-@hmm
-class D: ...
-
-class E: ...
-
-@baz
-def foo() -> None: ...
-
-class F(A, C): ...
-
-def spam() -> None: ...
-@overload
-def spam(arg: str) -> str: ...
-
-var: int = 1
-
-def eggs() -> Union[str, int]: ...
diff -pruN 22.3.0-1/tests/data/fstring.py 22.6.0-1/tests/data/fstring.py
--- 22.3.0-1/tests/data/fstring.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/fstring.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-f"f-string without formatted values is just a string"
-f"{{NOT a formatted value}}"
-f"{{NOT 'a' \"formatted\" \"value\"}}"
-f"some f-string with {a} {few():.2f} {formatted.values!r}"
-f'some f-string with {a} {few(""):.2f} {formatted.values!r}'
-f"{f'''{'nested'} inner'''} outer"
-f"\"{f'{nested} inner'}\" outer"
-f"space between opening braces: { {a for a in (1, 2, 3)}}"
-f'Hello \'{tricky + "example"}\''
-
-# output
-
-f"f-string without formatted values is just a string"
-f"{{NOT a formatted value}}"
-f'{{NOT \'a\' "formatted" "value"}}'
-f"some f-string with {a} {few():.2f} {formatted.values!r}"
-f'some f-string with {a} {few(""):.2f} {formatted.values!r}'
-f"{f'''{'nested'} inner'''} outer"
-f"\"{f'{nested} inner'}\" outer"
-f"space between opening braces: { {a for a in (1, 2, 3)}}"
-f'Hello \'{tricky + "example"}\''
diff -pruN 22.3.0-1/tests/data/function2.py 22.6.0-1/tests/data/function2.py
--- 22.3.0-1/tests/data/function2.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/function2.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,121 +0,0 @@
-def f(
-  a,
-  **kwargs,
-) -> A:
-    with cache_dir():
-        if something:
-            result = (
-                CliRunner().invoke(black.main, [str(src1), str(src2), "--diff", "--check"])
-            )
-    limited.append(-limited.pop())  # negate top
-    return A(
-        very_long_argument_name1=very_long_value_for_the_argument,
-        very_long_argument_name2=-very.long.value.for_the_argument,
-        **kwargs,
-    )
-def g():
-    "Docstring."
-    def inner():
-        pass
-    print("Inner defs should breathe a little.")
-def h():
-    def inner():
-        pass
-    print("Inner defs should breathe a little.")
-
-
-if os.name == "posix":
-    import termios
-    def i_should_be_followed_by_only_one_newline():
-        pass
-elif os.name == "nt":
-    try:
-        import msvcrt
-        def i_should_be_followed_by_only_one_newline():
-            pass
-
-    except ImportError:
-
-        def i_should_be_followed_by_only_one_newline():
-            pass
-
-elif False:
-
-    class IHopeYouAreHavingALovelyDay:
-        def __call__(self):
-            print("i_should_be_followed_by_only_one_newline")
-else:
-
-    def foo():
-        pass
-
-with hmm_but_this_should_get_two_preceding_newlines():
-    pass
-
-# output
-
-def f(
-    a,
-    **kwargs,
-) -> A:
-    with cache_dir():
-        if something:
-            result = CliRunner().invoke(
-                black.main, [str(src1), str(src2), "--diff", "--check"]
-            )
-    limited.append(-limited.pop())  # negate top
-    return A(
-        very_long_argument_name1=very_long_value_for_the_argument,
-        very_long_argument_name2=-very.long.value.for_the_argument,
-        **kwargs,
-    )
-
-
-def g():
-    "Docstring."
-
-    def inner():
-        pass
-
-    print("Inner defs should breathe a little.")
-
-
-def h():
-    def inner():
-        pass
-
-    print("Inner defs should breathe a little.")
-
-
-if os.name == "posix":
-    import termios
-
-    def i_should_be_followed_by_only_one_newline():
-        pass
-
-elif os.name == "nt":
-    try:
-        import msvcrt
-
-        def i_should_be_followed_by_only_one_newline():
-            pass
-
-    except ImportError:
-
-        def i_should_be_followed_by_only_one_newline():
-            pass
-
-elif False:
-
-    class IHopeYouAreHavingALovelyDay:
-        def __call__(self):
-            print("i_should_be_followed_by_only_one_newline")
-
-else:
-
-    def foo():
-        pass
-
-
-with hmm_but_this_should_get_two_preceding_newlines():
-    pass
diff -pruN 22.3.0-1/tests/data/function.py 22.6.0-1/tests/data/function.py
--- 22.3.0-1/tests/data/function.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/function.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,247 +0,0 @@
-#!/usr/bin/env python3
-import asyncio
-import sys
-
-from third_party import X, Y, Z
-
-from library import some_connection, \
-                    some_decorator
-f'trigger 3.6 mode'
-def func_no_args():
-  a; b; c
-  if True: raise RuntimeError
-  if False: ...
-  for i in range(10):
-    print(i)
-    continue
-  exec("new-style exec", {}, {})
-  return None
-async def coroutine(arg, exec=False):
- "Single-line docstring. Multiline is harder to reformat."
- async with some_connection() as conn:
-     await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
- await asyncio.sleep(1)
-@asyncio.coroutine
-@some_decorator(
-with_args=True,
-many_args=[1,2,3]
-)
-def function_signature_stress_test(number:int,no_annotation=None,text:str="default",* ,debug:bool=False,**kwargs) -> str:
- return text[number:-1]
-def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
- offset = attr.ib(default=attr.Factory( lambda: _r.uniform(10000, 200000)))
- assert task._cancel_stack[:len(old_stack)] == old_stack
-def spaces_types(a: int = 1, b: tuple = (), c: list = [], d: dict = {}, e: bool = True, f: int = -1, g: int = 1 if False else 2, h: str = "", i: str = r''): ...
-def spaces2(result= _core.Value(None)):
- assert fut is self._read_fut, (fut, self._read_fut)
-    # EMPTY LINE WITH WHITESPACE (this comment will be removed)
-def example(session):
-    result = session.query(models.Customer.id).filter(
-        models.Customer.account_id == account_id,
-        models.Customer.email == email_address,
-    ).order_by(
-        models.Customer.id.asc()
-    ).all()
-def long_lines():
-    if True:
-        typedargslist.extend(
-            gen_annotated_params(ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True)
-        )
-        typedargslist.extend(
-            gen_annotated_params(
-                ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True,
-                # trailing standalone comment
-            )
-        )
-    _type_comment_re = re.compile(
-        r"""
-        ^
-        [\t ]*
-        \#[ ]type:[ ]*
-        (?P<type>
-            [^#\t\n]+?
-        )
-        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
-                        # a trailing space which is why we need the silliness below
-        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
-        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
-        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
-        [\t ]*
-        (?P<nl>
-            (?:\#[^\n]*)?
-            \n?
-        )
-        $
-        """, re.MULTILINE | re.VERBOSE
-    )
-def trailing_comma():
-    mapping = {
-    A: 0.25 * (10.0 / 12),
-    B: 0.1 * (10.0 / 12),
-    C: 0.1 * (10.0 / 12),
-    D: 0.1 * (10.0 / 12),
-}
-def f(
-  a,
-  **kwargs,
-) -> A:
-    return (
-        yield from A(
-            very_long_argument_name1=very_long_value_for_the_argument,
-            very_long_argument_name2=very_long_value_for_the_argument,
-            **kwargs,
-        )
-    )
-def __await__(): return (yield)
-
-# output
-
-
-#!/usr/bin/env python3
-import asyncio
-import sys
-
-from third_party import X, Y, Z
-
-from library import some_connection, some_decorator
-
-f"trigger 3.6 mode"
-
-
-def func_no_args():
-    a
-    b
-    c
-    if True:
-        raise RuntimeError
-    if False:
-        ...
-    for i in range(10):
-        print(i)
-        continue
-    exec("new-style exec", {}, {})
-    return None
-
-
-async def coroutine(arg, exec=False):
-    "Single-line docstring. Multiline is harder to reformat."
-    async with some_connection() as conn:
-        await conn.do_what_i_mean("SELECT bobby, tables FROM xkcd", timeout=2)
-    await asyncio.sleep(1)
-
-
-@asyncio.coroutine
-@some_decorator(with_args=True, many_args=[1, 2, 3])
-def function_signature_stress_test(
-    number: int,
-    no_annotation=None,
-    text: str = "default",
-    *,
-    debug: bool = False,
-    **kwargs,
-) -> str:
-    return text[number:-1]
-
-
-def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r""):
-    offset = attr.ib(default=attr.Factory(lambda: _r.uniform(10000, 200000)))
-    assert task._cancel_stack[: len(old_stack)] == old_stack
-
-
-def spaces_types(
-    a: int = 1,
-    b: tuple = (),
-    c: list = [],
-    d: dict = {},
-    e: bool = True,
-    f: int = -1,
-    g: int = 1 if False else 2,
-    h: str = "",
-    i: str = r"",
-):
-    ...
-
-
-def spaces2(result=_core.Value(None)):
-    assert fut is self._read_fut, (fut, self._read_fut)
-
-
-def example(session):
-    result = (
-        session.query(models.Customer.id)
-        .filter(
-            models.Customer.account_id == account_id,
-            models.Customer.email == email_address,
-        )
-        .order_by(models.Customer.id.asc())
-        .all()
-    )
-
-
-def long_lines():
-    if True:
-        typedargslist.extend(
-            gen_annotated_params(
-                ast_args.kwonlyargs,
-                ast_args.kw_defaults,
-                parameters,
-                implicit_default=True,
-            )
-        )
-        typedargslist.extend(
-            gen_annotated_params(
-                ast_args.kwonlyargs,
-                ast_args.kw_defaults,
-                parameters,
-                implicit_default=True,
-                # trailing standalone comment
-            )
-        )
-    _type_comment_re = re.compile(
-        r"""
-        ^
-        [\t ]*
-        \#[ ]type:[ ]*
-        (?P<type>
-            [^#\t\n]+?
-        )
-        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
-                        # a trailing space which is why we need the silliness below
-        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
-        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
-        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
-        [\t ]*
-        (?P<nl>
-            (?:\#[^\n]*)?
-            \n?
-        )
-        $
-        """,
-        re.MULTILINE | re.VERBOSE,
-    )
-
-
-def trailing_comma():
-    mapping = {
-        A: 0.25 * (10.0 / 12),
-        B: 0.1 * (10.0 / 12),
-        C: 0.1 * (10.0 / 12),
-        D: 0.1 * (10.0 / 12),
-    }
-
-
-def f(
-    a,
-    **kwargs,
-) -> A:
-    return (
-        yield from A(
-            very_long_argument_name1=very_long_value_for_the_argument,
-            very_long_argument_name2=very_long_value_for_the_argument,
-            **kwargs,
-        )
-    )
-
-
-def __await__():
-    return (yield)
diff -pruN 22.3.0-1/tests/data/function_trailing_comma.py 22.6.0-1/tests/data/function_trailing_comma.py
--- 22.3.0-1/tests/data/function_trailing_comma.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/function_trailing_comma.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,153 +0,0 @@
-def f(a,):
-    d = {'key': 'value',}
-    tup = (1,)
-
-def f2(a,b,):
-    d = {'key': 'value', 'key2': 'value2',}
-    tup = (1,2,)
-
-def f(a:int=1,):
-    call(arg={'explode': 'this',})
-    call2(arg=[1,2,3],)
-    x = {
-        "a": 1,
-        "b": 2,
-    }["a"]
-    if a == {"a": 1,"b": 2,"c": 3,"d": 4,"e": 5,"f": 6,"g": 7,"h": 8,}["a"]:
-        pass
-
-def xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-]:
-    json = {"k": {"k2": {"k3": [1,]}}}
-
-
-
-# The type annotation shouldn't get a trailing comma since that would change its type.
-# Relevant bug report: https://github.com/psf/black/issues/2381.
-def some_function_with_a_really_long_name() -> (
-    returning_a_deeply_nested_import_of_a_type_i_suppose
-):
-    pass
-
-
-def some_method_with_a_really_long_name(very_long_parameter_so_yeah: str, another_long_parameter: int) -> (
-    another_case_of_returning_a_deeply_nested_import_of_a_type_i_suppose_cause_why_not
-):
-    pass
-
-
-def func() -> (
-    also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(this_shouldn_t_get_a_trailing_comma_too)
-):
-    pass
-
-
-def func() -> ((also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
-        this_shouldn_t_get_a_trailing_comma_too
-    ))
-):
-    pass
-
-# output
-
-def f(
-    a,
-):
-    d = {
-        "key": "value",
-    }
-    tup = (1,)
-
-
-def f2(
-    a,
-    b,
-):
-    d = {
-        "key": "value",
-        "key2": "value2",
-    }
-    tup = (
-        1,
-        2,
-    )
-
-
-def f(
-    a: int = 1,
-):
-    call(
-        arg={
-            "explode": "this",
-        }
-    )
-    call2(
-        arg=[1, 2, 3],
-    )
-    x = {
-        "a": 1,
-        "b": 2,
-    }["a"]
-    if (
-        a
-        == {
-            "a": 1,
-            "b": 2,
-            "c": 3,
-            "d": 4,
-            "e": 5,
-            "f": 6,
-            "g": 7,
-            "h": 8,
-        }["a"]
-    ):
-        pass
-
-
-def xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-]:
-    json = {
-        "k": {
-            "k2": {
-                "k3": [
-                    1,
-                ]
-            }
-        }
-    }
-
-
-# The type annotation shouldn't get a trailing comma since that would change its type.
-# Relevant bug report: https://github.com/psf/black/issues/2381.
-def some_function_with_a_really_long_name() -> (
-    returning_a_deeply_nested_import_of_a_type_i_suppose
-):
-    pass
-
-
-def some_method_with_a_really_long_name(
-    very_long_parameter_so_yeah: str, another_long_parameter: int
-) -> (
-    another_case_of_returning_a_deeply_nested_import_of_a_type_i_suppose_cause_why_not
-):
-    pass
-
-
-def func() -> (
-    also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
-        this_shouldn_t_get_a_trailing_comma_too
-    )
-):
-    pass
-
-
-def func() -> (
-    (
-        also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
-            this_shouldn_t_get_a_trailing_comma_too
-        )
-    )
-):
-    pass
diff -pruN 22.3.0-1/tests/data/import_spacing.py 22.6.0-1/tests/data/import_spacing.py
--- 22.3.0-1/tests/data/import_spacing.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/import_spacing.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,118 +0,0 @@
-"""The asyncio package, tracking PEP 3156."""
-
-# flake8: noqa
-
-from logging import (
-    WARNING
-)
-from logging import (
-    ERROR,
-)
-import sys
-
-# This relies on each of the submodules having an __all__ variable.
-from .base_events import *
-from .coroutines import *
-from .events import *  # comment here
-
-from .futures import *
-from .locks import *  # comment here
-from .protocols import *
-
-from ..runners import *  # comment here
-from ..queues import *
-from ..streams import *
-
-from some_library import (
-    Just, Enough, Libraries, To, Fit, In, This, Nice, Split, Which, We, No, Longer, Use
-)
-from name_of_a_company.extremely_long_project_name.component.ttypes import CuteLittleServiceHandlerFactoryyy
-from name_of_a_company.extremely_long_project_name.extremely_long_component_name.ttypes import *
-
-from .a.b.c.subprocess import *
-from . import (tasks)
-from . import (A, B, C)
-from . import SomeVeryLongNameAndAllOfItsAdditionalLetters1, \
-              SomeVeryLongNameAndAllOfItsAdditionalLetters2
-
-__all__ = (
-    base_events.__all__
-    + coroutines.__all__
-    + events.__all__
-    + futures.__all__
-    + locks.__all__
-    + protocols.__all__
-    + runners.__all__
-    + queues.__all__
-    + streams.__all__
-    + tasks.__all__
-)
-
-
-# output
-
-
-"""The asyncio package, tracking PEP 3156."""
-
-# flake8: noqa
-
-from logging import WARNING
-from logging import (
-    ERROR,
-)
-import sys
-
-# This relies on each of the submodules having an __all__ variable.
-from .base_events import *
-from .coroutines import *
-from .events import *  # comment here
-
-from .futures import *
-from .locks import *  # comment here
-from .protocols import *
-
-from ..runners import *  # comment here
-from ..queues import *
-from ..streams import *
-
-from some_library import (
-    Just,
-    Enough,
-    Libraries,
-    To,
-    Fit,
-    In,
-    This,
-    Nice,
-    Split,
-    Which,
-    We,
-    No,
-    Longer,
-    Use,
-)
-from name_of_a_company.extremely_long_project_name.component.ttypes import (
-    CuteLittleServiceHandlerFactoryyy,
-)
-from name_of_a_company.extremely_long_project_name.extremely_long_component_name.ttypes import *
-
-from .a.b.c.subprocess import *
-from . import tasks
-from . import A, B, C
-from . import (
-    SomeVeryLongNameAndAllOfItsAdditionalLetters1,
-    SomeVeryLongNameAndAllOfItsAdditionalLetters2,
-)
-
-__all__ = (
-    base_events.__all__
-    + coroutines.__all__
-    + events.__all__
-    + futures.__all__
-    + locks.__all__
-    + protocols.__all__
-    + runners.__all__
-    + queues.__all__
-    + streams.__all__
-    + tasks.__all__
-)
diff -pruN 22.3.0-1/tests/data/jupyter/non_python_notebook.ipynb 22.6.0-1/tests/data/jupyter/non_python_notebook.ipynb
--- 22.3.0-1/tests/data/jupyter/non_python_notebook.ipynb	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/jupyter/non_python_notebook.ipynb	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1 @@
+{"metadata":{"kernelspec":{"name":"ir","display_name":"R","language":"R"},"language_info":{"name":"R","codemirror_mode":"r","pygments_lexer":"r","mimetype":"text/x-r-source","file_extension":".r","version":"4.0.5"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"library(tidyverse) ","metadata":{"_uuid":"051d70d956493feee0c6d64651c6a088724dca2a","_execution_state":"idle"},"execution_count":null,"outputs":[]}]}
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/jupyter/notebook_empty_metadata.ipynb 22.6.0-1/tests/data/jupyter/notebook_empty_metadata.ipynb
--- 22.3.0-1/tests/data/jupyter/notebook_empty_metadata.ipynb	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/jupyter/notebook_empty_metadata.ipynb	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,27 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "%%time\n",
+    "\n",
+    "print('foo')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff -pruN 22.3.0-1/tests/data/jupyter/notebook_no_trailing_newline.ipynb 22.6.0-1/tests/data/jupyter/notebook_no_trailing_newline.ipynb
--- 22.3.0-1/tests/data/jupyter/notebook_no_trailing_newline.ipynb	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/jupyter/notebook_no_trailing_newline.ipynb	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,39 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "%%time\n",
+    "\n",
+    "print('foo')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "interpreter": {
+   "hash": "e758f3098b5b55f4d87fe30bbdc1367f20f246b483f96267ee70e6c40cb185d8"
+  },
+  "kernelspec": {
+   "display_name": "Python 3.8.10 64-bit ('black': venv)",
+   "name": "python3"
+  },
+  "language_info": {
+   "name": "python",
+   "version": ""
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/jupyter/notebook_trailing_newline.ipynb 22.6.0-1/tests/data/jupyter/notebook_trailing_newline.ipynb
--- 22.3.0-1/tests/data/jupyter/notebook_trailing_newline.ipynb	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/jupyter/notebook_trailing_newline.ipynb	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,39 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "%%time\n",
+    "\n",
+    "print('foo')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "interpreter": {
+   "hash": "e758f3098b5b55f4d87fe30bbdc1367f20f246b483f96267ee70e6c40cb185d8"
+  },
+  "kernelspec": {
+   "display_name": "Python 3.8.10 64-bit ('black': venv)",
+   "name": "python3"
+  },
+  "language_info": {
+   "name": "python",
+   "version": ""
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff -pruN 22.3.0-1/tests/data/jupyter/notebook_which_cant_be_parsed.ipynb 22.6.0-1/tests/data/jupyter/notebook_which_cant_be_parsed.ipynb
--- 22.3.0-1/tests/data/jupyter/notebook_which_cant_be_parsed.ipynb	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/jupyter/notebook_which_cant_be_parsed.ipynb	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1 @@
+foo
diff -pruN 22.3.0-1/tests/data/jupyter/notebook_without_changes.ipynb 22.6.0-1/tests/data/jupyter/notebook_without_changes.ipynb
--- 22.3.0-1/tests/data/jupyter/notebook_without_changes.ipynb	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/jupyter/notebook_without_changes.ipynb	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,46 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "tags": []
+   },
+   "outputs": [],
+   "source": [
+    "%%time\n",
+    "\n",
+    "print(\"foo\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "This notebook should not be reformatted"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "interpreter": {
+   "hash": "e758f3098b5b55f4d87fe30bbdc1367f20f246b483f96267ee70e6c40cb185d8"
+  },
+  "kernelspec": {
+   "display_name": "Python 3.8.10 64-bit ('black': venv)",
+   "name": "python3"
+  },
+  "language_info": {
+   "name": "python",
+   "version": ""
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/long_strings__edge_case.py 22.6.0-1/tests/data/long_strings__edge_case.py
--- 22.3.0-1/tests/data/long_strings__edge_case.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/long_strings__edge_case.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,140 +0,0 @@
-some_variable = "This string is long but not so long that it needs to be split just yet"
-some_variable = 'This string is long but not so long that it needs to be split just yet'
-some_variable = "This string is long, just long enough that it needs to be split, u get?"
-some_variable = 'This string is long, just long enough that it needs to be split, u get?'
-some_variable = "This string is long, just long enough that it needs to be split, u get? So we stay"
-some_variable = 'This string is long, just long enough that it needs to be split, u get? So we stay'
-some_variable = "This string is long, just long enough that it needs to be split, u get? So we split"
-some_variable = 'This string is long, just long enough that it needs to be split, u get? So we split'
-some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at alll".format("ha")
-some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at allll".format("ha")
-some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at alllllllllll".format("ha")
-some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at allllllllllll".format("ha")
-some_variable = "This is a long string that will end with a method that is not calleddd".format
-addition_inside_tuple = (
-    some_string_inside_a_variable
-    + "Some string that is just long enough to cause a split to take place.............",
-    xyz,
-    "Some really long string that needs to get split eventually but I'm running out of things to say" + some_string_inside_a_variable
-)
-addition_inside_tuple = (
-    some_string_inside_a_variable
-    + "Some string that is just long enough to cause a split to take place.............."
-)
-return "Hi there. This is areally really reallllly long string that needs to be split!!!"
-ternary_expression = (
-    "Short String"
-    if some_condition
-    else "This is a really long string that will eventually need to be split right here."
-)
-return f'{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaa'
-return f'{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaaa'
-assert str(result) == "This long string should be split at some point right close to or around hereeeeeee"
-assert str(result) < "This long string should be split at some point right close to or around hereeeeee"
-assert "A format string: %s" % "This long string should be split at some point right close to or around hereeeeeee" != result
-msg += "This long string should be wrapped in parens at some point right around hereeeee"
-msg += "This long string should be split at some point right close to or around hereeeeeeee"
-msg += "This long string should not be split at any point ever since it is just righttt"
-
-
-# output
-
-
-some_variable = "This string is long but not so long that it needs to be split just yet"
-some_variable = "This string is long but not so long that it needs to be split just yet"
-some_variable = (
-    "This string is long, just long enough that it needs to be split, u get?"
-)
-some_variable = (
-    "This string is long, just long enough that it needs to be split, u get?"
-)
-some_variable = (
-    "This string is long, just long enough that it needs to be split, u get? So we stay"
-)
-some_variable = (
-    "This string is long, just long enough that it needs to be split, u get? So we stay"
-)
-some_variable = (
-    "This string is long, just long enough that it needs to be split, u get? So we"
-    " split"
-)
-some_variable = (
-    "This string is long, just long enough that it needs to be split, u get? So we"
-    " split"
-)
-some_variable = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
-    " {} that I just can't think of any more good words to say about it at alll".format(
-        "ha"
-    )
-)
-some_variable = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
-    " {} that I just can't think of any more good words to say about it at allll"
-    .format("ha")
-)
-some_variable = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
-    " {} that I just can't think of any more good words to say about it at alllllllllll"
-    .format("ha")
-)
-some_variable = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
-    " {} that I just can't think of any more good words to say about it at"
-    " allllllllllll".format("ha")
-)
-some_variable = (
-    "This is a long string that will end with a method that is not calleddd".format
-)
-addition_inside_tuple = (
-    some_string_inside_a_variable
-    + "Some string that is just long enough to cause a split to take"
-    " place.............",
-    xyz,
-    "Some really long string that needs to get split eventually but I'm running out of"
-    " things to say"
-    + some_string_inside_a_variable,
-)
-addition_inside_tuple = (
-    some_string_inside_a_variable
-    + "Some string that is just long enough to cause a split to take"
-    " place.............."
-)
-return (
-    "Hi there. This is areally really reallllly long string that needs to be split!!!"
-)
-ternary_expression = (
-    "Short String"
-    if some_condition
-    else (
-        "This is a really long string that will eventually need to be split right here."
-    )
-)
-return (
-    f"{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaa"
-)
-return f"{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaaa"
-assert (
-    str(result)
-    == "This long string should be split at some point right close to or around"
-    " hereeeeeee"
-)
-assert (
-    str(result)
-    < "This long string should be split at some point right close to or around"
-    " hereeeeee"
-)
-assert (
-    "A format string: %s"
-    % "This long string should be split at some point right close to or around"
-    " hereeeeeee"
-    != result
-)
-msg += (
-    "This long string should be wrapped in parens at some point right around hereeeee"
-)
-msg += (
-    "This long string should be split at some point right close to or around"
-    " hereeeeeeee"
-)
-msg += "This long string should not be split at any point ever since it is just righttt"
diff -pruN 22.3.0-1/tests/data/long_strings_flag_disabled.py 22.6.0-1/tests/data/long_strings_flag_disabled.py
--- 22.3.0-1/tests/data/long_strings_flag_disabled.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/long_strings_flag_disabled.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,292 +0,0 @@
-x = "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
-
-x += "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
-
-y = "Short string"
-
-print(
-    "This is a really long string inside of a print statement with extra arguments attached at the end of it.",
-    x,
-    y,
-    z,
-)
-
-print(
-    "This is a really long string inside of a print statement with no extra arguments attached at the end of it."
-)
-
-D1 = {
-    "The First": "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.",
-    "The Second": "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.",
-}
-
-D2 = {
-    1.0: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.",
-    2.0: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.",
-}
-
-D3 = {
-    x: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.",
-    y: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.",
-}
-
-D4 = {
-    "A long and ridiculous {}".format(
-        string_key
-    ): "This is a really really really long string that has to go i,side of a dictionary. It is soooo bad.",
-    some_func(
-        "calling", "some", "stuff"
-    ): "This is a really really really long string that has to go inside of a dictionary. It is {soooo} bad (#{x}).".format(
-        sooo="soooo", x=2
-    ),
-    "A %s %s"
-    % (
-        "formatted",
-        "string",
-    ): "This is a really really really long string that has to go inside of a dictionary. It is %s bad (#%d)."
-    % ("soooo", 2),
-}
-
-func_with_keywords(
-    my_arg,
-    my_kwarg="Long keyword strings also need to be wrapped, but they will probably need to be handled a little bit differently.",
-)
-
-bad_split1 = (
-    "But what should happen when code has already been formatted but in the wrong way? Like"
-    " with a space at the end instead of the beginning. Or what about when it is split too soon?"
-)
-
-bad_split2 = (
-    "But what should happen when code has already "
-    "been formatted but in the wrong way? Like "
-    "with a space at the end instead of the "
-    "beginning. Or what about when it is split too "
-    "soon? In the case of a split that is too "
-    "short, black will try to honer the custom "
-    "split."
-)
-
-bad_split3 = (
-    "What if we have inline comments on "  # First Comment
-    "each line of a bad split? In that "  # Second Comment
-    "case, we should just leave it alone."  # Third Comment
-)
-
-bad_split_func1(
-    "But what should happen when code has already "
-    "been formatted but in the wrong way? Like "
-    "with a space at the end instead of the "
-    "beginning. Or what about when it is split too "
-    "soon? In the case of a split that is too "
-    "short, black will try to honer the custom "
-    "split.",
-    xxx,
-    yyy,
-    zzz,
-)
-
-bad_split_func2(
-    xxx,
-    yyy,
-    zzz,
-    long_string_kwarg="But what should happen when code has already been formatted but in the wrong way? Like "
-    "with a space at the end instead of the beginning. Or what about when it is split too "
-    "soon?",
-)
-
-bad_split_func3(
-    (
-        "But what should happen when code has already "
-        r"been formatted but in the wrong way? Like "
-        "with a space at the end instead of the "
-        r"beginning. Or what about when it is split too "
-        r"soon? In the case of a split that is too "
-        "short, black will try to honer the custom "
-        "split."
-    ),
-    xxx,
-    yyy,
-    zzz,
-)
-
-raw_string = r"This is a long raw string. When re-formatting this string, black needs to make sure it prepends the 'r' onto the new string."
-
-fmt_string1 = "We also need to be sure to preserve any and all {} which may or may not be attached to the string in question.".format(
-    "method calls"
-)
-
-fmt_string2 = "But what about when the string is {} but {}".format(
-    "short",
-    "the method call is really really really really really really really really long?",
-)
-
-old_fmt_string1 = (
-    "While we are on the topic of %s, we should also note that old-style formatting must also be preserved, since some %s still uses it."
-    % ("formatting", "code")
-)
-
-old_fmt_string2 = "This is a %s %s %s %s" % (
-    "really really really really really",
-    "old",
-    "way to format strings!",
-    "Use f-strings instead!",
-)
-
-old_fmt_string3 = (
-    "Whereas only the strings after the percent sign were long in the last example, this example uses a long initial string as well. This is another %s %s %s %s"
-    % (
-        "really really really really really",
-        "old",
-        "way to format strings!",
-        "Use f-strings instead!",
-    )
-)
-
-fstring = f"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
-
-fstring_with_no_fexprs = f"Some regular string that needs to get split certainly but is NOT an fstring by any means whatsoever."
-
-comment_string = "Long lines with inline comments should have their comments appended to the reformatted string's enclosing right parentheses."  # This comment gets thrown to the top.
-
-arg_comment_string = print(
-    "Long lines with inline comments which are apart of (and not the only member of) an argument list should have their comments appended to the reformatted string's enclosing left parentheses.",  # This comment stays on the bottom.
-    "Arg #2",
-    "Arg #3",
-    "Arg #4",
-    "Arg #5",
-)
-
-pragma_comment_string1 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa: E501
-
-pragma_comment_string2 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa
-
-"""This is a really really really long triple quote string and it should not be touched."""
-
-triple_quote_string = """This is a really really really long triple quote string assignment and it should not be touched."""
-
-assert (
-    some_type_of_boolean_expression
-), "Followed by a really really really long string that is used to provide context to the AssertionError exception."
-
-assert (
-    some_type_of_boolean_expression
-), "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string {}.".format(
-    "formatting"
-)
-
-assert some_type_of_boolean_expression, (
-    "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string %s."
-    % "formatting"
-)
-
-assert some_type_of_boolean_expression, (
-    "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic %s %s."
-    % ("string", "formatting")
-)
-
-some_function_call(
-    "With a reallly generic name and with a really really long string that is, at some point down the line, "
-    + added
-    + " to a variable and then added to another string."
-)
-
-some_function_call(
-    "With a reallly generic name and with a really really long string that is, at some point down the line, "
-    + added
-    + " to a variable and then added to another string. But then what happens when the final string is also supppppperrrrr long?! Well then that second (realllllllly long) string should be split too.",
-    "and a second argument",
-    and_a_third,
-)
-
-return "A really really really really really really really really really really really really really long {} {}".format(
-    "return", "value"
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma which should NOT be there.",
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma which should NOT be there.",  # comment after comma
-)
-
-func_with_bad_comma(
-    (
-        "This is a really long string argument to a function that has a trailing comma"
-        " which should NOT be there."
-    ),
-)
-
-func_with_bad_comma(
-    (
-        "This is a really long string argument to a function that has a trailing comma"
-        " which should NOT be there."
-    ),  # comment after comma
-)
-
-func_with_bad_parens_that_wont_fit_in_one_line(
-    ("short string that should have parens stripped"), x, y, z
-)
-
-func_with_bad_parens_that_wont_fit_in_one_line(
-    x, y, ("short string that should have parens stripped"), z
-)
-
-func_with_bad_parens(
-    ("short string that should have parens stripped"),
-    x,
-    y,
-    z,
-)
-
-func_with_bad_parens(
-    x,
-    y,
-    ("short string that should have parens stripped"),
-    z,
-)
-
-annotated_variable: Final = (
-    "This is a large "
-    + STRING
-    + " that has been "
-    + CONCATENATED
-    + "using the '+' operator."
-)
-annotated_variable: Final = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
-annotated_variable: Literal[
-    "fakse_literal"
-] = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
-
-backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\"
-backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\\\"
-backslashes = "This is a really 'long' string with \"embedded double quotes\" and 'single' quotes that also handles checking for an odd number of backslashes \\\", like this...\\\\\\"
-
-short_string = "Hi" " there."
-
-func_call(short_string=("Hi" " there."))
-
-raw_strings = r"Don't" " get" r" merged" " unless they are all raw."
-
-
-def foo():
-    yield "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
-
-
-x = f"This is a {{really}} long string that needs to be split without a doubt (i.e. most definitely). In short, this {string} that can't possibly be {{expected}} to fit all together on one line. In {fact} it may even take up three or more lines... like four or five... but probably just four."
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # type: ignore
-    " of it."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # noqa
-    " of it."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # pylint: disable=some-pylint-check
-    " of it."
-)
diff -pruN 22.3.0-1/tests/data/long_strings.py 22.6.0-1/tests/data/long_strings.py
--- 22.3.0-1/tests/data/long_strings.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/long_strings.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,661 +0,0 @@
-x = "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
-
-x += "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
-
-y = (
-    'Short string'
-)
-
-print('This is a really long string inside of a print statement with extra arguments attached at the end of it.', x, y, z)
-
-print("This is a really long string inside of a print statement with no extra arguments attached at the end of it.")
-
-D1 = {"The First": "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.", "The Second": "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary."}
-
-D2 = {1.0: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.", 2.0: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary."}
-
-D3 = {x: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.", y: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary."}
-
-D4 = {"A long and ridiculous {}".format(string_key): "This is a really really really long string that has to go i,side of a dictionary. It is soooo bad.", some_func("calling", "some", "stuff"): "This is a really really really long string that has to go inside of a dictionary. It is {soooo} bad (#{x}).".format(sooo="soooo", x=2), "A %s %s" % ("formatted", "string"): "This is a really really really long string that has to go inside of a dictionary. It is %s bad (#%d)." % ("soooo", 2)}
-
-func_with_keywords(my_arg, my_kwarg="Long keyword strings also need to be wrapped, but they will probably need to be handled a little bit differently.")
-
-bad_split1 = (
-    'But what should happen when code has already been formatted but in the wrong way? Like'
-    " with a space at the end instead of the beginning. Or what about when it is split too soon?"
-)
-
-bad_split2 = "But what should happen when code has already " \
-             "been formatted but in the wrong way? Like " \
-             "with a space at the end instead of the " \
-             "beginning. Or what about when it is split too " \
-             "soon? In the case of a split that is too " \
-             "short, black will try to honer the custom " \
-             "split."
-
-bad_split3 = (
-    "What if we have inline comments on "  # First Comment
-    "each line of a bad split? In that "  # Second Comment
-    "case, we should just leave it alone."  # Third Comment
-)
-
-bad_split_func1(
-    "But what should happen when code has already "
-    "been formatted but in the wrong way? Like "
-    "with a space at the end instead of the "
-    "beginning. Or what about when it is split too "
-    "soon? In the case of a split that is too "
-    "short, black will try to honer the custom "
-    "split.",
-    xxx, yyy, zzz
-)
-
-bad_split_func2(
-    xxx, yyy, zzz,
-    long_string_kwarg="But what should happen when code has already been formatted but in the wrong way? Like "
-                      "with a space at the end instead of the beginning. Or what about when it is split too "
-                      "soon?",
-)
-
-bad_split_func3(
-    (
-        "But what should happen when code has already "
-        r"been formatted but in the wrong way? Like "
-        "with a space at the end instead of the "
-        r"beginning. Or what about when it is split too "
-        r"soon? In the case of a split that is too "
-        "short, black will try to honer the custom "
-        "split."
-    ),
-    xxx,
-    yyy,
-    zzz,
-)
-
-raw_string = r"This is a long raw string. When re-formatting this string, black needs to make sure it prepends the 'r' onto the new string."
-
-fmt_string1 = "We also need to be sure to preserve any and all {} which may or may not be attached to the string in question.".format("method calls")
-
-fmt_string2 = "But what about when the string is {} but {}".format("short", "the method call is really really really really really really really really long?")
-
-old_fmt_string1 = "While we are on the topic of %s, we should also note that old-style formatting must also be preserved, since some %s still uses it." % ("formatting", "code")
-
-old_fmt_string2 = "This is a %s %s %s %s" % ("really really really really really", "old", "way to format strings!", "Use f-strings instead!")
-
-old_fmt_string3 = "Whereas only the strings after the percent sign were long in the last example, this example uses a long initial string as well. This is another %s %s %s %s" % ("really really really really really", "old", "way to format strings!", "Use f-strings instead!")
-
-fstring = f"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
-
-fstring_with_no_fexprs = f"Some regular string that needs to get split certainly but is NOT an fstring by any means whatsoever."
-
-comment_string = "Long lines with inline comments should have their comments appended to the reformatted string's enclosing right parentheses."  # This comment gets thrown to the top.
-
-arg_comment_string = print("Long lines with inline comments which are apart of (and not the only member of) an argument list should have their comments appended to the reformatted string's enclosing left parentheses.",  # This comment stays on the bottom.
-    "Arg #2", "Arg #3", "Arg #4", "Arg #5")
-
-pragma_comment_string1 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa: E501
-
-pragma_comment_string2 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa
-
-"""This is a really really really long triple quote string and it should not be touched."""
-
-triple_quote_string = """This is a really really really long triple quote string assignment and it should not be touched."""
-
-assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception."
-
-assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string {}.".format("formatting")
-
-assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string %s." % "formatting"
-
-assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic %s %s." % ("string", "formatting")
-
-some_function_call("With a reallly generic name and with a really really long string that is, at some point down the line, " + added + " to a variable and then added to another string.")
-
-some_function_call("With a reallly generic name and with a really really long string that is, at some point down the line, " + added + " to a variable and then added to another string. But then what happens when the final string is also supppppperrrrr long?! Well then that second (realllllllly long) string should be split too.", "and a second argument", and_a_third)
-
-return "A really really really really really really really really really really really really really long {} {}".format("return", "value")
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma which should NOT be there.",
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma which should NOT be there.", # comment after comma
-)
-
-func_with_bad_comma(
-    (
-        "This is a really long string argument to a function that has a trailing comma"
-        " which should NOT be there."
-    ),
-)
-
-func_with_bad_comma(
-    (
-        "This is a really long string argument to a function that has a trailing comma"
-        " which should NOT be there."
-    ), # comment after comma
-)
-
-func_with_bad_parens_that_wont_fit_in_one_line(
-    ("short string that should have parens stripped"),
-    x,
-    y,
-    z
-)
-
-func_with_bad_parens_that_wont_fit_in_one_line(
-    x,
-    y,
-    ("short string that should have parens stripped"),
-    z
-)
-
-func_with_bad_parens(
-    ("short string that should have parens stripped"),
-    x,
-    y,
-    z,
-)
-
-func_with_bad_parens(
-    x,
-    y,
-    ("short string that should have parens stripped"),
-    z,
-)
-
-annotated_variable: Final = "This is a large " + STRING + " that has been " + CONCATENATED + "using the '+' operator."
-annotated_variable: Final = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
-annotated_variable: Literal["fakse_literal"] = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
-
-backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\"
-backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\\\"
-backslashes = "This is a really 'long' string with \"embedded double quotes\" and 'single' quotes that also handles checking for an odd number of backslashes \\\", like this...\\\\\\"
-
-short_string = (
-    "Hi"
-    " there."
-)
-
-func_call(
-    short_string=(
-        "Hi"
-        " there."
-    )
-)
-
-raw_strings = r"Don't" " get" r" merged" " unless they are all raw."
-
-def foo():
-    yield "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
-
-x = f"This is a {{really}} long string that needs to be split without a doubt (i.e. most definitely). In short, this {string} that can't possibly be {{expected}} to fit all together on one line. In {fact} it may even take up three or more lines... like four or five... but probably just four."
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # type: ignore
-    " of it."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # noqa
-    " of it."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # pylint: disable=some-pylint-check
-    " of it."
-)
-
-string_with_nameescape = (
-    "........................................................................ \N{LAO KO LA}"
-)
-
-string_with_nameescape = (
-    "........................................................................... \N{LAO KO LA}"
-)
-
-string_with_nameescape = (
-    "............................................................................ \N{LAO KO LA}"
-)
-
-string_with_nameescape_and_escaped_backslash = (
-    "...................................................................... \\\N{LAO KO LA}"
-)
-
-string_with_nameescape_and_escaped_backslash = (
-    "......................................................................... \\\N{LAO KO LA}"
-)
-
-string_with_nameescape_and_escaped_backslash = (
-    ".......................................................................... \\\N{LAO KO LA}"
-)
-
-string_with_escaped_nameescape = (
-    "........................................................................ \\N{LAO KO LA}"
-)
-
-string_with_escaped_nameescape = (
-    "........................................................................... \\N{LAO KO LA}"
-)
-
-
-# output
-
-
-x = (
-    "This is a really long string that can't possibly be expected to fit all together"
-    " on one line. In fact it may even take up three or more lines... like four or"
-    " five... but probably just three."
-)
-
-x += (
-    "This is a really long string that can't possibly be expected to fit all together"
-    " on one line. In fact it may even take up three or more lines... like four or"
-    " five... but probably just three."
-)
-
-y = "Short string"
-
-print(
-    "This is a really long string inside of a print statement with extra arguments"
-    " attached at the end of it.",
-    x,
-    y,
-    z,
-)
-
-print(
-    "This is a really long string inside of a print statement with no extra arguments"
-    " attached at the end of it."
-)
-
-D1 = {
-    "The First": (
-        "This is a really long string that can't possibly be expected to fit all"
-        " together on one line. Also it is inside a dictionary, so formatting is more"
-        " difficult."
-    ),
-    "The Second": (
-        "This is another really really (not really) long string that also can't be"
-        " expected to fit on one line and is, like the other string, inside a"
-        " dictionary."
-    ),
-}
-
-D2 = {
-    1.0: (
-        "This is a really long string that can't possibly be expected to fit all"
-        " together on one line. Also it is inside a dictionary, so formatting is more"
-        " difficult."
-    ),
-    2.0: (
-        "This is another really really (not really) long string that also can't be"
-        " expected to fit on one line and is, like the other string, inside a"
-        " dictionary."
-    ),
-}
-
-D3 = {
-    x: (
-        "This is a really long string that can't possibly be expected to fit all"
-        " together on one line. Also it is inside a dictionary, so formatting is more"
-        " difficult."
-    ),
-    y: (
-        "This is another really really (not really) long string that also can't be"
-        " expected to fit on one line and is, like the other string, inside a"
-        " dictionary."
-    ),
-}
-
-D4 = {
-    "A long and ridiculous {}".format(string_key): (
-        "This is a really really really long string that has to go i,side of a"
-        " dictionary. It is soooo bad."
-    ),
-    some_func("calling", "some", "stuff"): (
-        "This is a really really really long string that has to go inside of a"
-        " dictionary. It is {soooo} bad (#{x}).".format(sooo="soooo", x=2)
-    ),
-    "A %s %s"
-    % ("formatted", "string"): (
-        "This is a really really really long string that has to go inside of a"
-        " dictionary. It is %s bad (#%d)."
-    )
-    % ("soooo", 2),
-}
-
-func_with_keywords(
-    my_arg,
-    my_kwarg=(
-        "Long keyword strings also need to be wrapped, but they will probably need to"
-        " be handled a little bit differently."
-    ),
-)
-
-bad_split1 = (
-    "But what should happen when code has already been formatted but in the wrong way?"
-    " Like with a space at the end instead of the beginning. Or what about when it is"
-    " split too soon?"
-)
-
-bad_split2 = (
-    "But what should happen when code has already "
-    "been formatted but in the wrong way? Like "
-    "with a space at the end instead of the "
-    "beginning. Or what about when it is split too "
-    "soon? In the case of a split that is too "
-    "short, black will try to honer the custom "
-    "split."
-)
-
-bad_split3 = (
-    "What if we have inline comments on "  # First Comment
-    "each line of a bad split? In that "  # Second Comment
-    "case, we should just leave it alone."  # Third Comment
-)
-
-bad_split_func1(
-    "But what should happen when code has already "
-    "been formatted but in the wrong way? Like "
-    "with a space at the end instead of the "
-    "beginning. Or what about when it is split too "
-    "soon? In the case of a split that is too "
-    "short, black will try to honer the custom "
-    "split.",
-    xxx,
-    yyy,
-    zzz,
-)
-
-bad_split_func2(
-    xxx,
-    yyy,
-    zzz,
-    long_string_kwarg=(
-        "But what should happen when code has already been formatted but in the wrong"
-        " way? Like with a space at the end instead of the beginning. Or what about"
-        " when it is split too soon?"
-    ),
-)
-
-bad_split_func3(
-    (
-        "But what should happen when code has already "
-        r"been formatted but in the wrong way? Like "
-        "with a space at the end instead of the "
-        r"beginning. Or what about when it is split too "
-        r"soon? In the case of a split that is too "
-        "short, black will try to honer the custom "
-        "split."
-    ),
-    xxx,
-    yyy,
-    zzz,
-)
-
-raw_string = (
-    r"This is a long raw string. When re-formatting this string, black needs to make"
-    r" sure it prepends the 'r' onto the new string."
-)
-
-fmt_string1 = (
-    "We also need to be sure to preserve any and all {} which may or may not be"
-    " attached to the string in question.".format("method calls")
-)
-
-fmt_string2 = "But what about when the string is {} but {}".format(
-    "short",
-    "the method call is really really really really really really really really long?",
-)
-
-old_fmt_string1 = (
-    "While we are on the topic of %s, we should also note that old-style formatting"
-    " must also be preserved, since some %s still uses it." % ("formatting", "code")
-)
-
-old_fmt_string2 = "This is a %s %s %s %s" % (
-    "really really really really really",
-    "old",
-    "way to format strings!",
-    "Use f-strings instead!",
-)
-
-old_fmt_string3 = (
-    "Whereas only the strings after the percent sign were long in the last example,"
-    " this example uses a long initial string as well. This is another %s %s %s %s"
-    % (
-        "really really really really really",
-        "old",
-        "way to format strings!",
-        "Use f-strings instead!",
-    )
-)
-
-fstring = (
-    f"f-strings definitely make things more {difficult} than they need to be for"
-    " {black}. But boy they sure are handy. The problem is that some lines will need"
-    f" to have the 'f' whereas others do not. This {line}, for example, needs one."
-)
-
-fstring_with_no_fexprs = (
-    f"Some regular string that needs to get split certainly but is NOT an fstring by"
-    f" any means whatsoever."
-)
-
-comment_string = (  # This comment gets thrown to the top.
-    "Long lines with inline comments should have their comments appended to the"
-    " reformatted string's enclosing right parentheses."
-)
-
-arg_comment_string = print(
-    "Long lines with inline comments which are apart of (and not the only member of) an"
-    " argument list should have their comments appended to the reformatted string's"
-    " enclosing left parentheses.",  # This comment stays on the bottom.
-    "Arg #2",
-    "Arg #3",
-    "Arg #4",
-    "Arg #5",
-)
-
-pragma_comment_string1 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa: E501
-
-pragma_comment_string2 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa
-
-"""This is a really really really long triple quote string and it should not be touched."""
-
-triple_quote_string = """This is a really really really long triple quote string assignment and it should not be touched."""
-
-assert some_type_of_boolean_expression, (
-    "Followed by a really really really long string that is used to provide context to"
-    " the AssertionError exception."
-)
-
-assert some_type_of_boolean_expression, (
-    "Followed by a really really really long string that is used to provide context to"
-    " the AssertionError exception, which uses dynamic string {}.".format("formatting")
-)
-
-assert some_type_of_boolean_expression, (
-    "Followed by a really really really long string that is used to provide context to"
-    " the AssertionError exception, which uses dynamic string %s." % "formatting"
-)
-
-assert some_type_of_boolean_expression, (
-    "Followed by a really really really long string that is used to provide context to"
-    " the AssertionError exception, which uses dynamic %s %s."
-    % ("string", "formatting")
-)
-
-some_function_call(
-    "With a reallly generic name and with a really really long string that is, at some"
-    " point down the line, "
-    + added
-    + " to a variable and then added to another string."
-)
-
-some_function_call(
-    "With a reallly generic name and with a really really long string that is, at some"
-    " point down the line, "
-    + added
-    + " to a variable and then added to another string. But then what happens when the"
-    " final string is also supppppperrrrr long?! Well then that second (realllllllly"
-    " long) string should be split too.",
-    "and a second argument",
-    and_a_third,
-)
-
-return (
-    "A really really really really really really really really really really really"
-    " really really long {} {}".format("return", "value")
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma"
-    " which should NOT be there.",
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma"
-    " which should NOT be there.",  # comment after comma
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma"
-    " which should NOT be there.",
-)
-
-func_with_bad_comma(
-    "This is a really long string argument to a function that has a trailing comma"
-    " which should NOT be there.",  # comment after comma
-)
-
-func_with_bad_parens_that_wont_fit_in_one_line(
-    "short string that should have parens stripped", x, y, z
-)
-
-func_with_bad_parens_that_wont_fit_in_one_line(
-    x, y, "short string that should have parens stripped", z
-)
-
-func_with_bad_parens(
-    "short string that should have parens stripped",
-    x,
-    y,
-    z,
-)
-
-func_with_bad_parens(
-    x,
-    y,
-    "short string that should have parens stripped",
-    z,
-)
-
-annotated_variable: Final = (
-    "This is a large "
-    + STRING
-    + " that has been "
-    + CONCATENATED
-    + "using the '+' operator."
-)
-annotated_variable: Final = (
-    "This is a large string that has a type annotation attached to it. A type"
-    " annotation should NOT stop a long string from being wrapped."
-)
-annotated_variable: Literal["fakse_literal"] = (
-    "This is a large string that has a type annotation attached to it. A type"
-    " annotation should NOT stop a long string from being wrapped."
-)
-
-backslashes = (
-    "This is a really long string with \"embedded\" double quotes and 'single' quotes"
-    " that also handles checking for an even number of backslashes \\"
-)
-backslashes = (
-    "This is a really long string with \"embedded\" double quotes and 'single' quotes"
-    " that also handles checking for an even number of backslashes \\\\"
-)
-backslashes = (
-    "This is a really 'long' string with \"embedded double quotes\" and 'single' quotes"
-    ' that also handles checking for an odd number of backslashes \\", like'
-    " this...\\\\\\"
-)
-
-short_string = "Hi there."
-
-func_call(short_string="Hi there.")
-
-raw_strings = r"Don't" " get" r" merged" " unless they are all raw."
-
-
-def foo():
-    yield (
-        "This is a really long string that can't possibly be expected to fit all"
-        " together on one line. In fact it may even take up three or more lines... like"
-        " four or five... but probably just three."
-    )
-
-
-x = (
-    "This is a {really} long string that needs to be split without a doubt (i.e."
-    f" most definitely). In short, this {string} that can't possibly be {{expected}} to"
-    f" fit all together on one line. In {fact} it may even take up three or more"
-    " lines... like four or five... but probably just four."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # type: ignore
-    " of it."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # noqa
-    " of it."
-)
-
-long_unmergable_string_with_pragma = (
-    "This is a really long string that can't be merged because it has a likely pragma at the end"  # pylint: disable=some-pylint-check
-    " of it."
-)
-
-string_with_nameescape = (
-    "........................................................................"
-    " \N{LAO KO LA}"
-)
-
-string_with_nameescape = (
-    "..........................................................................."
-    " \N{LAO KO LA}"
-)
-
-string_with_nameescape = (
-    "............................................................................"
-    " \N{LAO KO LA}"
-)
-
-string_with_nameescape_and_escaped_backslash = (
-    "......................................................................"
-    " \\\N{LAO KO LA}"
-)
-
-string_with_nameescape_and_escaped_backslash = (
-    "........................................................................."
-    " \\\N{LAO KO LA}"
-)
-
-string_with_nameescape_and_escaped_backslash = (
-    ".........................................................................."
-    " \\\N{LAO KO LA}"
-)
-
-string_with_escaped_nameescape = (
-    "........................................................................ \\N{LAO"
-    " KO LA}"
-)
-
-string_with_escaped_nameescape = (
-    "..........................................................................."
-    " \\N{LAO KO LA}"
-)
diff -pruN 22.3.0-1/tests/data/long_strings__regression.py 22.6.0-1/tests/data/long_strings__regression.py
--- 22.3.0-1/tests/data/long_strings__regression.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/long_strings__regression.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,1166 +0,0 @@
-class A:
-    def foo():
-        result = type(message)("")
-
-
-# Don't merge multiline (e.g. triple-quoted) strings.
-def foo():
-    query = (
-        """SELECT xxxxxxxxxxxxxxxxxxxx(xxx)"""
-        """ FROM xxxxxxxxxxxxxxxx WHERE xxxxxxxxxx AND xxx <> xxxxxxxxxxxxxx()""")
-
-# There was a bug where tuples were being identified as long strings.
-long_tuple = ('Apple', 'Berry', 'Cherry', 'Dill', 'Evergreen', 'Fig',
-           'Grape', 'Harry', 'Iglu', 'Jaguar')
-
-stupid_format_method_bug = "Some really long string that just so happens to be the {} {} to force the 'format' method to hang over the line length boundary. This is pretty annoying.".format("perfect", "length")
-
-class A:
-    def foo():
-        os.system("This is a regression test. xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx.".format("xxxxxxxxxx", "xxxxxx", "xxxxxxxxxx"))
-
-
-class A:
-    def foo():
-        XXXXXXXXXXXX.append(
-            (
-                "xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx, xxxx_xxxx_xxxxxxxxxx={})".format(
-                    xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx
-                ),
-                my_var,
-                my_other_var,
-            )
-        )
-
-class A:
-    class B:
-        def foo():
-            bar(
-                (
-                    "[{}]: xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx={}"
-                    " xxxx_xxxx_xxxxxxxxxx={}, xxxx={})"
-                    .format(xxxx._xxxxxxxxxxxxxx, xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx, xxxxxxx)
-                ),
-                varX,
-                varY,
-                varZ,
-            )
-
-def foo(xxxx):
-    for (xxx_xxxx, _xxx_xxx, _xxx_xxxxx, xxx_xxxx) in xxxx:
-        for xxx in xxx_xxxx:
-            assert ("x" in xxx) or (
-                xxx in xxx_xxx_xxxxx
-            ), "{0} xxxxxxx xx {1}, xxx {1} xx xxx xx xxxx xx xxx xxxx: xxx xxxx {2}".format(
-                xxx_xxxx, xxx, xxxxxx.xxxxxxx(xxx_xxx_xxxxx)
-            )
-
-class A:
-    def disappearing_comment():
-        return (
-            (  # xx -x xxxxxxx xx xxx xxxxxxx.
-                '{{xxx_xxxxxxxxxx_xxxxxxxx}} xxx xxxx'
-                ' {} {{xxxx}} >&2'
-                .format(
-                    "{xxxx} {xxxxxx}"
-                    if xxxxx.xx_xxxxxxxxxx
-                    else ( # Disappearing Comment
-                        "--xxxxxxx --xxxxxx=x --xxxxxx-xxxxx=xxxxxx"
-                        " --xxxxxx-xxxx=xxxxxxxxxxx.xxx"
-                    )
-                )
-            ),
-            (x, y, z),
-        )
-
-class A:
-    class B:
-        def foo():
-            xxxxx_xxxx(
-                xx, "\t"
-                "@xxxxxx '{xxxx_xxx}\t' > {xxxxxx_xxxx}.xxxxxxx;"
-                "{xxxx_xxx} >> {xxxxxx_xxxx}.xxxxxxx 2>&1; xx=$$?;"
-                "xxxx $$xx"
-                .format(xxxx_xxx=xxxx_xxxxxxx, xxxxxx_xxxx=xxxxxxx + "/" + xxxx_xxx_xxxx, x=xxx_xxxxx_xxxxx_xxx),
-                x,
-                y,
-                z,
-            )
-
-func_call_where_string_arg_has_method_call_and_bad_parens(
-    (
-        "A long string with {}. This string is so long that it is ridiculous. It can't fit on one line at alllll.".format("formatting")
-    ),
-)
-
-func_call_where_string_arg_has_old_fmt_and_bad_parens(
-    (
-        "A long string with {}. This string is so long that it is ridiculous. It can't fit on one line at alllll." % "formatting"
-    ),
-)
-
-func_call_where_string_arg_has_old_fmt_and_bad_parens(
-    (
-        "A long string with {}. This {} is so long that it is ridiculous. It can't fit on one line at alllll." % ("formatting", "string")
-    ),
-)
-
-class A:
-    def append(self):
-        if True:
-            xxxx.xxxxxxx.xxxxx( ('xxxxxxxxxx xxxx xx xxxxxx(%x) xx %x xxxx xx xxx %x.xx'
-                                 % (len(self) + 1,
-                                    xxxx.xxxxxxxxxx,
-                                    xxxx.xxxxxxxxxx))
-                                + (' %.3f (%s) to %.3f (%s).\n'
-                                   % (xxxx.xxxxxxxxx,
-                                      xxxx.xxxxxxxxxxxxxx(xxxx.xxxxxxxxx),
-                                      x,
-                                      xxxx.xxxxxxxxxxxxxx( xx)
-                                      )))
-
-class A:
-    def foo():
-        some_func_call(
-            'xxxxxxxxxx',
-            (
-                "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
-                "\"xxxx xxxxxxx xxxxxx xxxx; xxxx xxxxxx_xxxxx xxxxxx xxxx; "
-                "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" "
-            ),
-            None,
-            ('xxxxxxxxxxx',),
-        ),
-
-class A:
-    def foo():
-        some_func_call(
-            (
-                "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
-                "xxxx, ('xxxxxxx xxxxxx xxxx, xxxx') xxxxxx_xxxxx xxxxxx xxxx; "
-                "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" "
-            ),
-            None,
-            ('xxxxxxxxxxx',),
-        ),
-
-xxxxxxx = { 'xx' : 'xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} \
--xx {1} -xx xxx=xxx_xxxx,xxx_xx,xxx_xxx,xxx_xxxx,xxx_xx,xxx_xxx |\
- xxxxxx -x xxxxxxxx -x xxxxxxxx -x',
-         'xx' : 'xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} \
--xx {1} -xx xxx=xxx_xxxx_xxx_xxxx,xxx_xx_xxx_xxxx,xxx_xxxx_xxx_xxxx,\
-xxx_xx_xxxx_xxxx,xxx_xxx_xxxx,xxx_xxx_xxxx xxxx=xxx | xxxxxx -x xxxxxxxx -x xxxxxxxx -x'
-}
-
-class A:
-    def foo(self):
-        if True:
-            xxxxx_xxxxxxxxxxxx('xxx xxxxxx xxx xxxxxxxxx.xx xx xxxxxxxx.  xxx xxxxxxxxxxxxx.xx xxxxxxx '
-                               + 'xx xxxxxx xxxxxx xxxxxx xx xxxxxxx xxx xxx ${0} xx x xxxxxxxx xxxxx'.xxxxxx(xxxxxx_xxxxxx_xxx))
-
-class A:
-    class B:
-        def foo():
-            row = {
-                'xxxxxxxxxxxxxxx' : xxxxxx_xxxxx_xxxx,
-                # 'xxxxxxxxxxxxxxxxxxxxxxx'
-                # 'xxxxxxxxxxxxxxxxxxxxxx'
-                # 'xxxxxxxxxxxxxxxxxx'
-                # 'xxxxxxxxxxxxxxxxx'
-                'xxxxxxxxxx' : xxxxx_xxxxx,
-                }
-
-class A:
-    def xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx(xxxx):
-        xxxxxxxx = [
-            xxxxxxxxxxxxxxxx(
-                'xxxx',
-                xxxxxxxxxxx={
-                    'xxxx' : 1.0,
-                },
-                xxxxxx={'xxxxxx 1' : xxxxxx(xxxx='xxxxxx 1', xxxxxx=600.0)},
-                xxxxxxxx_xxxxxxx=0.0,
-            ),
-            xxxxxxxxxxxxxxxx(
-                'xxxxxxx',
-                xxxxxxxxxxx={
-                    'xxxx' : 1.0,
-                },
-                xxxxxx={'xxxxxx 1' : xxxxxx(xxxx='xxxxxx 1', xxxxxx=200.0)},
-                xxxxxxxx_xxxxxxx=0.0,
-            ),
-            xxxxxxxxxxxxxxxx(
-                'xxxx',
-            ),
-        ]
-
-some_dictionary = {
-    'xxxxx006': ['xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx== xxxxx000 xxxxxxxxxx\n',
-                 'xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx== xxxxx010 xxxxxxxxxx\n'],
-    'xxxxx016': ['xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx== xxxxx000 xxxxxxxxxx\n',
-                 'xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx== xxxxx010 xxxxxxxxxx\n']
-}
-
-def foo():
-    xxx_xxx = (
-        'xxxx xxx xxxxxxxx_xxxx xx "xxxxxxxxxx".'
-        '\n xxx: xxxxxx xxxxxxxx_xxxx=xxxxxxxxxx'
-    ) # xxxx xxxxxxxxxx xxxx xx xxxx xx xxx xxxxxxxx xxxxxx xxxxx.
-
-some_tuple = ("some string", "some string" " which should be joined")
-
-some_commented_string = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"  # This comment gets thrown to the top.
-    " {} that I just can't think of any more good words to say about it at"
-    " allllllllllll".format("ha")  # comments here are fine
-)
-
-some_commented_string = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"  # But these
-    " {} that I just can't think of any more good words to say about it at"  # comments will stay
-    " allllllllllll".format("ha")  # comments here are fine
-)
-
-lpar_and_rpar_have_comments = func_call(  # LPAR Comment
-    "Long really ridiculous type of string that shouldn't really even exist at all. I mean commmme onnn!!!",  # Comma Comment
-)  # RPAR Comment
-
-cmd_fstring = (
-    f"sudo -E deluge-console info --detailed --sort-reverse=time_added "
-    f"{'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
-)
-
-cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
-
-cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {'{{}}' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
-
-cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {{'' if ID is None else ID}} | perl -nE 'print if /^{field}:/'"
-
-fstring = f"This string really doesn't need to be an {{{{fstring}}}}, but this one most certainly, absolutely {does}."
-
-fstring = (
-    f"We have to remember to escape {braces}."
-    " Like {these}."
-    f" But not {this}."
-)
-
-class A:
-    class B:
-        def foo():
-            st_error = STError(
-                f"This string ({string_leaf.value}) appears to be pointless (i.e. has"
-                " no parent)."
-            )
-
-def foo():
-    user_regex = _lazy_re_compile(
-        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z"  # dot-atom
-        r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"\Z)',  # quoted-string
-        re.IGNORECASE)
-
-def foo():
-    user_regex = _lazy_re_compile(
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
-        'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',  # quoted-string
-        xyz
-    )
-
-def foo():
-    user_regex = _lazy_re_compile(
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
-        'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',  # quoted-string
-        xyz
-    )
-
-class A:
-    class B:
-        def foo():
-            if not hasattr(module, name):
-                raise ValueError(
-                    "Could not find object %s in %s.\n"
-                    "Please note that you cannot serialize things like inner "
-                    "classes. Please move the object into the main module "
-                    "body to use migrations.\n"
-                    "For more information, see "
-                    "https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
-                    % (name, module_name, get_docs_version()))
-
-class A:
-    class B:
-        def foo():
-            if not hasattr(module, name):
-                raise ValueError(
-                    "Could not find object %s in %s.\nPlease note that you cannot serialize things like inner classes. Please move the object into the main module body to use migrations.\nFor more information, see https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
-                    % (name, module_name, get_docs_version()))
-
-x = (
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-)
-
-class Step(StepBase):
-    def who(self):
-        self.cmd = 'SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name} {title}/P{passenger_association}'.format(
-            last_name=last_name,
-            first_name=first_name,
-            middle_name=middle_name,
-            title=title,
-            passenger_association=passenger_association,
-        )
-
-xxxxxxx_xxxxxx_xxxxxxx = xxx(
-    [
-        xxxxxxxxxxxx(
-            xxxxxx_xxxxxxx=(
-                '((x.aaaaaaaaa = "xxxxxx.xxxxxxxxxxxxxxxxxxxxx") || (x.xxxxxxxxx = "xxxxxxxxxxxx")) && '
-                # xxxxx xxxxxxxxxxxx xxxx xxx (xxxxxxxxxxxxxxxx) xx x xxxxxxxxx xx xxxxxx.
-                "(x.bbbbbbbbbbbb.xxx != "
-                '"xxx:xxx:xxx::cccccccccccc:xxxxxxx-xxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxx") && '
-            )
-        )
-    ]
-)
-
-if __name__ == "__main__":
-    for i in range(4, 8):
-        cmd = (
-            r"for pid in $(ps aux | grep paster | grep -v grep | grep '\-%d' | awk '{print $2}'); do kill $pid; done"
-            % (i)
-        )
-
-def A():
-    def B():
-        def C():
-            def D():
-                def E():
-                    def F():
-                        def G():
-                            assert (
-                                c_float(val[0][0] / val[0][1]).value
-                                == c_float(value[0][0] / value[0][1]).value
-                            ), "%s didn't roundtrip" % tag
-
-class xxxxxxxxxxxxxxxxxxxxx(xxxx.xxxxxxxxxxxxx):
-    def xxxxxxx_xxxxxx(xxxx):
-        assert xxxxxxx_xxxx in [
-            x.xxxxx.xxxxxx.xxxxx.xxxxxx,
-            x.xxxxx.xxxxxx.xxxxx.xxxx,
-        ], ("xxxxxxxxxxx xxxxxxx xxxx (xxxxxx xxxx) %x xxx xxxxx" % xxxxxxx_xxxx)
-
-value.__dict__[
-    key
-] = "test"  # set some Thrift field to non-None in the struct aa bb cc dd ee
-
-RE_ONE_BACKSLASH = {
-    "asdf_hjkl_jkl": re.compile(
-        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
-    ),
-}
-
-RE_TWO_BACKSLASHES = {
-    "asdf_hjkl_jkl": re.compile(
-        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
-    ),
-}
-
-RE_THREE_BACKSLASHES = {
-    "asdf_hjkl_jkl": re.compile(
-        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
-    ),
-}
-
-# We do NOT split on f-string expressions.
-print(f"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam. {[f'{i}' for i in range(10)]}")
-x = f"This is a long string which contains an f-expr that should not split {{{[i for i in range(5)]}}}."
-
-# The parens should NOT be removed in this case.
-(
-    "my very long string that should get formatted if I'm careful to make sure it goes"
-    " over 88 characters which it has now"
-)
-
-# The parens should NOT be removed in this case.
-(
-    "my very long string that should get formatted if I'm careful to make sure it goes over 88 characters which"
-    " it has now"
-)
-
-# The parens should NOT be removed in this case.
-(
-    "my very long string"
-    " that should get formatted"
-    " if I'm careful to make sure"
-    " it goes over 88 characters which"
-    " it has now"
-)
-
-
-def _legacy_listen_examples():
-    text += (
-        "    \"listen for the '%(event_name)s' event\"\n"
-        "\n    # ... (event logic logic logic) ...\n"
-        % {
-            "since": since,
-        }
-    )
-
-
-class X:
-    async def foo(self):
-        msg = ""
-        for candidate in CANDIDATES:
-            msg += (
-                "**{candidate.object_type} {candidate.rev}**"
-                " - {candidate.description}\n"
-            )
-
-
-temp_msg = (
-    f"{f'{humanize_number(pos)}.': <{pound_len+2}} "
-    f"{balance: <{bal_len + 5}} "
-    f"<<{author.display_name}>>\n"
-)
-
-assert str(suffix_arr) == (
-    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert str(suffix_arr) != (
-    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert str(suffix_arr) <= (
-    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert str(suffix_arr) >= (
-    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert str(suffix_arr) < (
-    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert str(suffix_arr) > (
-    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert str(suffix_arr) in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-assert str(suffix_arr) not in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-message = (
-    f"1. Go to Google Developers Console and log in with your Google account."
-    "(https://console.developers.google.com/)"
-    "2. You should be prompted to create a new project (name does not matter)."
-    "3. Click on Enable APIs and Services at the top."
-    "4. In the list of APIs choose or search for YouTube Data API v3 and "
-    "click on it. Choose Enable."
-    "5. Click on Credentials on the left navigation bar."
-    "6. Click on Create Credential at the top."
-    '7. At the top click the link for "API key".'
-    "8. No application restrictions are needed. Click Create at the bottom."
-    "9. You now have a key to add to `{prefix}set api youtube api_key`"
-)
-message = (
-    f"1. Go to Google Developers Console and log in with your Google account."
-    "(https://console.developers.google.com/)"
-    "2. You should be prompted to create a new project (name does not matter)."
-    f"3. Click on Enable APIs and Services at the top."
-    "4. In the list of APIs choose or search for YouTube Data API v3 and "
-    "click on it. Choose Enable."
-    f"5. Click on Credentials on the left navigation bar."
-    "6. Click on Create Credential at the top."
-    '7. At the top click the link for "API key".'
-    "8. No application restrictions are needed. Click Create at the bottom."
-    "9. You now have a key to add to `{prefix}set api youtube api_key`"
-)
-message = (
-    f"1. Go to Google Developers Console and log in with your Google account."
-    "(https://console.developers.google.com/)"
-    "2. You should be prompted to create a new project (name does not matter)."
-    f"3. Click on Enable APIs and Services at the top."
-    "4. In the list of APIs choose or search for YouTube Data API v3 and "
-    "click on it. Choose Enable."
-    f"5. Click on Credentials on the left navigation bar."
-    "6. Click on Create Credential at the top."
-    '7. At the top click the link for "API key".'
-    "8. No application restrictions are needed. Click Create at the bottom."
-    f"9. You now have a key to add to `{prefix}set api youtube api_key`"
-)
-
-# It shouldn't matter if the string prefixes are capitalized.
-temp_msg = (
-    F"{F'{humanize_number(pos)}.': <{pound_len+2}} "
-    F"{balance: <{bal_len + 5}} "
-    F"<<{author.display_name}>>\n"
-)
-
-fstring = (
-    F"We have to remember to escape {braces}."
-    " Like {these}."
-    F" But not {this}."
-)
-
-welcome_to_programming = R"hello," R" world!"
-
-fstring = F"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
-
-x = F"This is a long string which contains an f-expr that should not split {{{[i for i in range(5)]}}}."
-
-x = (
-    "\N{BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR}\N{VARIATION SELECTOR-16}"
-)
-
-xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
-    xx_xxxxxx={
-        "x3_xxxxxxxx": "xxx3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx_xxxxxxx",
-    },
-)
-
-
-# output
-
-
-class A:
-    def foo():
-        result = type(message)("")
-
-
-# Don't merge multiline (e.g. triple-quoted) strings.
-def foo():
-    query = (
-        """SELECT xxxxxxxxxxxxxxxxxxxx(xxx)"""
-        """ FROM xxxxxxxxxxxxxxxx WHERE xxxxxxxxxx AND xxx <> xxxxxxxxxxxxxx()"""
-    )
-
-
-# There was a bug where tuples were being identified as long strings.
-long_tuple = (
-    "Apple",
-    "Berry",
-    "Cherry",
-    "Dill",
-    "Evergreen",
-    "Fig",
-    "Grape",
-    "Harry",
-    "Iglu",
-    "Jaguar",
-)
-
-stupid_format_method_bug = (
-    "Some really long string that just so happens to be the {} {} to force the 'format'"
-    " method to hang over the line length boundary. This is pretty annoying.".format(
-        "perfect", "length"
-    )
-)
-
-
-class A:
-    def foo():
-        os.system(
-            "This is a regression test. xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx"
-            " xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx"
-            " xxxx.".format("xxxxxxxxxx", "xxxxxx", "xxxxxxxxxx")
-        )
-
-
-class A:
-    def foo():
-        XXXXXXXXXXXX.append(
-            (
-                "xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx, xxxx_xxxx_xxxxxxxxxx={})"
-                .format(xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx),
-                my_var,
-                my_other_var,
-            )
-        )
-
-
-class A:
-    class B:
-        def foo():
-            bar(
-                "[{}]: xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx={}"
-                " xxxx_xxxx_xxxxxxxxxx={}, xxxx={})".format(
-                    xxxx._xxxxxxxxxxxxxx, xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx, xxxxxxx
-                ),
-                varX,
-                varY,
-                varZ,
-            )
-
-
-def foo(xxxx):
-    for xxx_xxxx, _xxx_xxx, _xxx_xxxxx, xxx_xxxx in xxxx:
-        for xxx in xxx_xxxx:
-            assert ("x" in xxx) or (xxx in xxx_xxx_xxxxx), (
-                "{0} xxxxxxx xx {1}, xxx {1} xx xxx xx xxxx xx xxx xxxx: xxx xxxx {2}"
-                .format(xxx_xxxx, xxx, xxxxxx.xxxxxxx(xxx_xxx_xxxxx))
-            )
-
-
-class A:
-    def disappearing_comment():
-        return (
-            (  # xx -x xxxxxxx xx xxx xxxxxxx.
-                "{{xxx_xxxxxxxxxx_xxxxxxxx}} xxx xxxx {} {{xxxx}} >&2".format(
-                    "{xxxx} {xxxxxx}"
-                    if xxxxx.xx_xxxxxxxxxx
-                    else (  # Disappearing Comment
-                        "--xxxxxxx --xxxxxx=x --xxxxxx-xxxxx=xxxxxx"
-                        " --xxxxxx-xxxx=xxxxxxxxxxx.xxx"
-                    )
-                )
-            ),
-            (x, y, z),
-        )
-
-
-class A:
-    class B:
-        def foo():
-            xxxxx_xxxx(
-                xx,
-                "\t"
-                "@xxxxxx '{xxxx_xxx}\t' > {xxxxxx_xxxx}.xxxxxxx;"
-                "{xxxx_xxx} >> {xxxxxx_xxxx}.xxxxxxx 2>&1; xx=$$?;"
-                "xxxx $$xx".format(
-                    xxxx_xxx=xxxx_xxxxxxx,
-                    xxxxxx_xxxx=xxxxxxx + "/" + xxxx_xxx_xxxx,
-                    x=xxx_xxxxx_xxxxx_xxx,
-                ),
-                x,
-                y,
-                z,
-            )
-
-
-func_call_where_string_arg_has_method_call_and_bad_parens(
-    "A long string with {}. This string is so long that it is ridiculous. It can't fit"
-    " on one line at alllll.".format("formatting"),
-)
-
-func_call_where_string_arg_has_old_fmt_and_bad_parens(
-    "A long string with {}. This string is so long that it is ridiculous. It can't fit"
-    " on one line at alllll." % "formatting",
-)
-
-func_call_where_string_arg_has_old_fmt_and_bad_parens(
-    "A long string with {}. This {} is so long that it is ridiculous. It can't fit on"
-    " one line at alllll." % ("formatting", "string"),
-)
-
-
-class A:
-    def append(self):
-        if True:
-            xxxx.xxxxxxx.xxxxx(
-                "xxxxxxxxxx xxxx xx xxxxxx(%x) xx %x xxxx xx xxx %x.xx"
-                % (len(self) + 1, xxxx.xxxxxxxxxx, xxxx.xxxxxxxxxx)
-                + " %.3f (%s) to %.3f (%s).\n"
-                % (
-                    xxxx.xxxxxxxxx,
-                    xxxx.xxxxxxxxxxxxxx(xxxx.xxxxxxxxx),
-                    x,
-                    xxxx.xxxxxxxxxxxxxx(xx),
-                )
-            )
-
-
-class A:
-    def foo():
-        some_func_call(
-            "xxxxxxxxxx",
-            "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
-            '"xxxx xxxxxxx xxxxxx xxxx; xxxx xxxxxx_xxxxx xxxxxx xxxx; '
-            "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" ",
-            None,
-            ("xxxxxxxxxxx",),
-        ),
-
-
-class A:
-    def foo():
-        some_func_call(
-            "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
-            "xxxx, ('xxxxxxx xxxxxx xxxx, xxxx') xxxxxx_xxxxx xxxxxx xxxx; "
-            "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" ",
-            None,
-            ("xxxxxxxxxxx",),
-        ),
-
-
-xxxxxxx = {
-    "xx": (
-        "xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} -xx {1} -xx"
-        " xxx=xxx_xxxx,xxx_xx,xxx_xxx,xxx_xxxx,xxx_xx,xxx_xxx | xxxxxx -x xxxxxxxx -x"
-        " xxxxxxxx -x"
-    ),
-    "xx": (
-        "xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} -xx {1} -xx"
-        " xxx=xxx_xxxx_xxx_xxxx,xxx_xx_xxx_xxxx,xxx_xxxx_xxx_xxxx,xxx_xx_xxxx_xxxx,xxx_xxx_xxxx,xxx_xxx_xxxx"
-        " xxxx=xxx | xxxxxx -x xxxxxxxx -x xxxxxxxx -x"
-    ),
-}
-
-
-class A:
-    def foo(self):
-        if True:
-            xxxxx_xxxxxxxxxxxx(
-                "xxx xxxxxx xxx xxxxxxxxx.xx xx xxxxxxxx.  xxx xxxxxxxxxxxxx.xx"
-                " xxxxxxx "
-                + "xx xxxxxx xxxxxx xxxxxx xx xxxxxxx xxx xxx ${0} xx x xxxxxxxx xxxxx"
-                .xxxxxx(xxxxxx_xxxxxx_xxx)
-            )
-
-
-class A:
-    class B:
-        def foo():
-            row = {
-                "xxxxxxxxxxxxxxx": xxxxxx_xxxxx_xxxx,
-                # 'xxxxxxxxxxxxxxxxxxxxxxx'
-                # 'xxxxxxxxxxxxxxxxxxxxxx'
-                # 'xxxxxxxxxxxxxxxxxx'
-                # 'xxxxxxxxxxxxxxxxx'
-                "xxxxxxxxxx": xxxxx_xxxxx,
-            }
-
-
-class A:
-    def xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx(xxxx):
-        xxxxxxxx = [
-            xxxxxxxxxxxxxxxx(
-                "xxxx",
-                xxxxxxxxxxx={
-                    "xxxx": 1.0,
-                },
-                xxxxxx={"xxxxxx 1": xxxxxx(xxxx="xxxxxx 1", xxxxxx=600.0)},
-                xxxxxxxx_xxxxxxx=0.0,
-            ),
-            xxxxxxxxxxxxxxxx(
-                "xxxxxxx",
-                xxxxxxxxxxx={
-                    "xxxx": 1.0,
-                },
-                xxxxxx={"xxxxxx 1": xxxxxx(xxxx="xxxxxx 1", xxxxxx=200.0)},
-                xxxxxxxx_xxxxxxx=0.0,
-            ),
-            xxxxxxxxxxxxxxxx(
-                "xxxx",
-            ),
-        ]
-
-
-some_dictionary = {
-    "xxxxx006": [
-        "xxx-xxx"
-        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx=="
-        " xxxxx000 xxxxxxxxxx\n",
-        "xxx-xxx"
-        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx=="
-        " xxxxx010 xxxxxxxxxx\n",
-    ],
-    "xxxxx016": [
-        "xxx-xxx"
-        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx=="
-        " xxxxx000 xxxxxxxxxx\n",
-        "xxx-xxx"
-        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx=="
-        " xxxxx010 xxxxxxxxxx\n",
-    ],
-}
-
-
-def foo():
-    xxx_xxx = (  # xxxx xxxxxxxxxx xxxx xx xxxx xx xxx xxxxxxxx xxxxxx xxxxx.
-        'xxxx xxx xxxxxxxx_xxxx xx "xxxxxxxxxx".\n xxx: xxxxxx xxxxxxxx_xxxx=xxxxxxxxxx'
-    )
-
-
-some_tuple = ("some string", "some string which should be joined")
-
-some_commented_string = (  # This comment gets thrown to the top.
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
-    " {} that I just can't think of any more good words to say about it at"
-    " allllllllllll".format("ha")  # comments here are fine
-)
-
-some_commented_string = (
-    "This string is long but not so long that it needs hahahah toooooo be so greatttt"  # But these
-    " {} that I just can't think of any more good words to say about it at"  # comments will stay
-    " allllllllllll".format("ha")  # comments here are fine
-)
-
-lpar_and_rpar_have_comments = func_call(  # LPAR Comment
-    "Long really ridiculous type of string that shouldn't really even exist at all. I"
-    " mean commmme onnn!!!",  # Comma Comment
-)  # RPAR Comment
-
-cmd_fstring = (
-    "sudo -E deluge-console info --detailed --sort-reverse=time_added "
-    f"{'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
-)
-
-cmd_fstring = (
-    "sudo -E deluge-console info --detailed --sort-reverse=time_added"
-    f" {'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
-)
-
-cmd_fstring = (
-    "sudo -E deluge-console info --detailed --sort-reverse=time_added"
-    f" {'{{}}' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
-)
-
-cmd_fstring = (
-    "sudo -E deluge-console info --detailed --sort-reverse=time_added {'' if ID is"
-    f" None else ID}} | perl -nE 'print if /^{field}:/'"
-)
-
-fstring = (
-    "This string really doesn't need to be an {{fstring}}, but this one most"
-    f" certainly, absolutely {does}."
-)
-
-fstring = f"We have to remember to escape {braces}. Like {{these}}. But not {this}."
-
-
-class A:
-    class B:
-        def foo():
-            st_error = STError(
-                f"This string ({string_leaf.value}) appears to be pointless (i.e. has"
-                " no parent)."
-            )
-
-
-def foo():
-    user_regex = _lazy_re_compile(
-        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z"  # dot-atom
-        r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"\Z)',  # quoted-string
-        re.IGNORECASE,
-    )
-
-
-def foo():
-    user_regex = _lazy_re_compile(
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",  # quoted-string
-        xyz,
-    )
-
-
-def foo():
-    user_regex = _lazy_re_compile(
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",  # quoted-string
-        xyz,
-    )
-
-
-class A:
-    class B:
-        def foo():
-            if not hasattr(module, name):
-                raise ValueError(
-                    "Could not find object %s in %s.\n"
-                    "Please note that you cannot serialize things like inner "
-                    "classes. Please move the object into the main module "
-                    "body to use migrations.\n"
-                    "For more information, see "
-                    "https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
-                    % (name, module_name, get_docs_version())
-                )
-
-
-class A:
-    class B:
-        def foo():
-            if not hasattr(module, name):
-                raise ValueError(
-                    "Could not find object %s in %s.\nPlease note that you cannot"
-                    " serialize things like inner classes. Please move the object into"
-                    " the main module body to use migrations.\nFor more information,"
-                    " see https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
-                    % (name, module_name, get_docs_version())
-                )
-
-
-x = (
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-)
-
-
-class Step(StepBase):
-    def who(self):
-        self.cmd = (
-            "SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name}"
-            " {title}/P{passenger_association}".format(
-                last_name=last_name,
-                first_name=first_name,
-                middle_name=middle_name,
-                title=title,
-                passenger_association=passenger_association,
-            )
-        )
-
-
-xxxxxxx_xxxxxx_xxxxxxx = xxx(
-    [
-        xxxxxxxxxxxx(
-            xxxxxx_xxxxxxx=(
-                '((x.aaaaaaaaa = "xxxxxx.xxxxxxxxxxxxxxxxxxxxx") || (x.xxxxxxxxx ='
-                ' "xxxxxxxxxxxx")) && '
-                # xxxxx xxxxxxxxxxxx xxxx xxx (xxxxxxxxxxxxxxxx) xx x xxxxxxxxx xx xxxxxx.
-                "(x.bbbbbbbbbbbb.xxx != "
-                '"xxx:xxx:xxx::cccccccccccc:xxxxxxx-xxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxx") && '
-            )
-        )
-    ]
-)
-
-if __name__ == "__main__":
-    for i in range(4, 8):
-        cmd = (
-            r"for pid in $(ps aux | grep paster | grep -v grep | grep '\-%d' | awk"
-            r" '{print $2}'); do kill $pid; done" % (i)
-        )
-
-
-def A():
-    def B():
-        def C():
-            def D():
-                def E():
-                    def F():
-                        def G():
-                            assert (
-                                c_float(val[0][0] / val[0][1]).value
-                                == c_float(value[0][0] / value[0][1]).value
-                            ), "%s didn't roundtrip" % tag
-
-
-class xxxxxxxxxxxxxxxxxxxxx(xxxx.xxxxxxxxxxxxx):
-    def xxxxxxx_xxxxxx(xxxx):
-        assert xxxxxxx_xxxx in [
-            x.xxxxx.xxxxxx.xxxxx.xxxxxx,
-            x.xxxxx.xxxxxx.xxxxx.xxxx,
-        ], (
-            "xxxxxxxxxxx xxxxxxx xxxx (xxxxxx xxxx) %x xxx xxxxx" % xxxxxxx_xxxx
-        )
-
-
-value.__dict__[
-    key
-] = "test"  # set some Thrift field to non-None in the struct aa bb cc dd ee
-
-RE_ONE_BACKSLASH = {
-    "asdf_hjkl_jkl": re.compile(
-        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
-    ),
-}
-
-RE_TWO_BACKSLASHES = {
-    "asdf_hjkl_jkl": re.compile(
-        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\"
-        r" )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
-    ),
-}
-
-RE_THREE_BACKSLASHES = {
-    "asdf_hjkl_jkl": re.compile(
-        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
-    ),
-}
-
-# We do NOT split on f-string expressions.
-print(
-    "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam."
-    f" {[f'{i}' for i in range(10)]}"
-)
-x = (
-    "This is a long string which contains an f-expr that should not split"
-    f" {{{[i for i in range(5)]}}}."
-)
-
-# The parens should NOT be removed in this case.
-(
-    "my very long string that should get formatted if I'm careful to make sure it goes"
-    " over 88 characters which it has now"
-)
-
-# The parens should NOT be removed in this case.
-(
-    "my very long string that should get formatted if I'm careful to make sure it goes"
-    " over 88 characters which it has now"
-)
-
-# The parens should NOT be removed in this case.
-(
-    "my very long string"
-    " that should get formatted"
-    " if I'm careful to make sure"
-    " it goes over 88 characters which"
-    " it has now"
-)
-
-
-def _legacy_listen_examples():
-    text += (
-        "    \"listen for the '%(event_name)s' event\"\n"
-        "\n    # ... (event logic logic logic) ...\n"
-        % {
-            "since": since,
-        }
-    )
-
-
-class X:
-    async def foo(self):
-        msg = ""
-        for candidate in CANDIDATES:
-            msg += (
-                "**{candidate.object_type} {candidate.rev}**"
-                " - {candidate.description}\n"
-            )
-
-
-temp_msg = (
-    f"{f'{humanize_number(pos)}.': <{pound_len+2}} "
-    f"{balance: <{bal_len + 5}} "
-    f"<<{author.display_name}>>\n"
-)
-
-assert (
-    str(suffix_arr)
-    == "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    != "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    <= "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    >= "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    < "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    > "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
-    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
-    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$',"
-    " 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$',"
-    " 'ykangaroo$']"
-)
-assert (
-    str(suffix_arr)
-    not in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$',"
-    " 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$',"
-    " 'rykangaroo$', 'ykangaroo$']"
-)
-message = (
-    f"1. Go to Google Developers Console and log in with your Google account."
-    f"(https://console.developers.google.com/)"
-    f"2. You should be prompted to create a new project (name does not matter)."
-    f"3. Click on Enable APIs and Services at the top."
-    f"4. In the list of APIs choose or search for YouTube Data API v3 and "
-    f"click on it. Choose Enable."
-    f"5. Click on Credentials on the left navigation bar."
-    f"6. Click on Create Credential at the top."
-    f'7. At the top click the link for "API key".'
-    f"8. No application restrictions are needed. Click Create at the bottom."
-    f"9. You now have a key to add to `{{prefix}}set api youtube api_key`"
-)
-message = (
-    f"1. Go to Google Developers Console and log in with your Google account."
-    f"(https://console.developers.google.com/)"
-    f"2. You should be prompted to create a new project (name does not matter)."
-    f"3. Click on Enable APIs and Services at the top."
-    f"4. In the list of APIs choose or search for YouTube Data API v3 and "
-    f"click on it. Choose Enable."
-    f"5. Click on Credentials on the left navigation bar."
-    f"6. Click on Create Credential at the top."
-    f'7. At the top click the link for "API key".'
-    f"8. No application restrictions are needed. Click Create at the bottom."
-    f"9. You now have a key to add to `{{prefix}}set api youtube api_key`"
-)
-message = (
-    "1. Go to Google Developers Console and log in with your Google account."
-    "(https://console.developers.google.com/)"
-    "2. You should be prompted to create a new project (name does not matter)."
-    "3. Click on Enable APIs and Services at the top."
-    "4. In the list of APIs choose or search for YouTube Data API v3 and "
-    "click on it. Choose Enable."
-    "5. Click on Credentials on the left navigation bar."
-    "6. Click on Create Credential at the top."
-    '7. At the top click the link for "API key".'
-    "8. No application restrictions are needed. Click Create at the bottom."
-    f"9. You now have a key to add to `{prefix}set api youtube api_key`"
-)
-
-# It shouldn't matter if the string prefixes are capitalized.
-temp_msg = (
-    f"{F'{humanize_number(pos)}.': <{pound_len+2}} "
-    f"{balance: <{bal_len + 5}} "
-    f"<<{author.display_name}>>\n"
-)
-
-fstring = f"We have to remember to escape {braces}. Like {{these}}. But not {this}."
-
-welcome_to_programming = R"hello," R" world!"
-
-fstring = (
-    f"f-strings definitely make things more {difficult} than they need to be for"
-    " {black}. But boy they sure are handy. The problem is that some lines will need"
-    f" to have the 'f' whereas others do not. This {line}, for example, needs one."
-)
-
-x = (
-    "This is a long string which contains an f-expr that should not split"
-    f" {{{[i for i in range(5)]}}}."
-)
-
-x = (
-    "\N{BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR}\N{VARIATION SELECTOR-16}"
-)
-
-xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
-    xx_xxxxxx={
-        "x3_xxxxxxxx": (
-            "xxx3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx_xxxxxxx"
-        ),
-    },
-)
diff -pruN 22.3.0-1/tests/data/miscellaneous/async_as_identifier.py 22.6.0-1/tests/data/miscellaneous/async_as_identifier.py
--- 22.3.0-1/tests/data/miscellaneous/async_as_identifier.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/async_as_identifier.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,49 @@
+def async():
+    pass
+
+
+def await():
+    pass
+
+
+await = lambda: None
+async = lambda: None
+async()
+await()
+
+
+def sync_fn():
+    await = lambda: None
+    async = lambda: None
+    async()
+    await()
+
+
+async def async_fn():
+    await async_fn()
+
+
+# output
+def async():
+    pass
+
+
+def await():
+    pass
+
+
+await = lambda: None
+async = lambda: None
+async()
+await()
+
+
+def sync_fn():
+    await = lambda: None
+    async = lambda: None
+    async()
+    await()
+
+
+async def async_fn():
+    await async_fn()
diff -pruN 22.3.0-1/tests/data/miscellaneous/blackd_diff.diff 22.6.0-1/tests/data/miscellaneous/blackd_diff.diff
--- 22.3.0-1/tests/data/miscellaneous/blackd_diff.diff	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/blackd_diff.diff	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,13 @@
+--- [Deterministic header]
++++ [Deterministic header]
+@@ -1,6 +1,5 @@
+-def abc ():
+-    return ["hello", "world",
+-            "!"]
++def abc():
++    return ["hello", "world", "!"]
+ 
+-print(   "Incorrect formatting"    
+-)
++
++print("Incorrect formatting")
diff -pruN 22.3.0-1/tests/data/miscellaneous/blackd_diff.py 22.6.0-1/tests/data/miscellaneous/blackd_diff.py
--- 22.3.0-1/tests/data/miscellaneous/blackd_diff.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/blackd_diff.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,6 @@
+def abc ():
+    return ["hello", "world",
+            "!"]
+
+print(   "Incorrect formatting"    
+)
diff -pruN 22.3.0-1/tests/data/miscellaneous/debug_visitor.out 22.6.0-1/tests/data/miscellaneous/debug_visitor.out
--- 22.3.0-1/tests/data/miscellaneous/debug_visitor.out	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/debug_visitor.out	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,810 @@
+file_input
+  decorated
+    decorator
+      AT
+ '@'
+      NAME
+ 'dataclass'
+      NEWLINE
+ '\n'
+    /decorator
+    classdef
+      NAME
+ 'class'
+      NAME
+ ' '
+ 'DebugVisitor'
+      LPAR
+ '('
+      power
+        NAME
+ 'Visitor'
+        trailer
+          LSQB
+ '['
+          NAME
+ 'T'
+          RSQB
+ ']'
+        /trailer
+      /power
+      RPAR
+ ')'
+      COLON
+ ':'
+      suite
+        NEWLINE
+ '\n'
+        INDENT
+ ''
+        simple_stmt
+          expr_stmt
+            NAME
+ '    '
+ 'tree_depth'
+            annassign
+              COLON
+ ':'
+              NAME
+ ' '
+ 'int'
+              EQUAL
+ ' '
+ '='
+              NUMBER
+ ' '
+ '0'
+            /annassign
+          /expr_stmt
+          NEWLINE
+ '\n'
+        /simple_stmt
+        funcdef
+          NAME
+ '\n    '
+ 'def'
+          NAME
+ ' '
+ 'visit_default'
+          parameters
+            LPAR
+ '('
+            typedargslist
+              NAME
+ 'self'
+              COMMA
+ ','
+              tname
+                NAME
+ ' '
+ 'node'
+                COLON
+ ':'
+                NAME
+ ' '
+ 'LN'
+              /tname
+            /typedargslist
+            RPAR
+ ')'
+          /parameters
+          RARROW
+ ' '
+ '->'
+          power
+            NAME
+ ' '
+ 'Iterator'
+            trailer
+              LSQB
+ '['
+              NAME
+ 'T'
+              RSQB
+ ']'
+            /trailer
+          /power
+          COLON
+ ':'
+          suite
+            NEWLINE
+ '\n'
+            INDENT
+ ''
+            simple_stmt
+              expr_stmt
+                NAME
+ '        '
+ 'indent'
+                EQUAL
+ ' '
+ '='
+                term
+                  STRING
+ ' '
+ "' '"
+                  STAR
+ ' '
+ '*'
+                  atom
+                    LPAR
+ ' '
+ '('
+                    term
+                      NUMBER
+ '2'
+                      STAR
+ ' '
+ '*'
+                      power
+                        NAME
+ ' '
+ 'self'
+                        trailer
+                          DOT
+ '.'
+                          NAME
+ 'tree_depth'
+                        /trailer
+                      /power
+                    /term
+                    RPAR
+ ')'
+                  /atom
+                /term
+              /expr_stmt
+              NEWLINE
+ '\n'
+            /simple_stmt
+            if_stmt
+              NAME
+ '        '
+ 'if'
+              power
+                NAME
+ ' '
+ 'isinstance'
+                trailer
+                  LPAR
+ '('
+                  arglist
+                    NAME
+ 'node'
+                    COMMA
+ ','
+                    NAME
+ ' '
+ 'Node'
+                  /arglist
+                  RPAR
+ ')'
+                /trailer
+              /power
+              COLON
+ ':'
+              suite
+                NEWLINE
+ '\n'
+                INDENT
+ ''
+                simple_stmt
+                  expr_stmt
+                    NAME
+ '            '
+ '_type'
+                    EQUAL
+ ' '
+ '='
+                    power
+                      NAME
+ ' '
+ 'type_repr'
+                      trailer
+                        LPAR
+ '('
+                        power
+                          NAME
+ 'node'
+                          trailer
+                            DOT
+ '.'
+                            NAME
+ 'type'
+                          /trailer
+                        /power
+                        RPAR
+ ')'
+                      /trailer
+                    /power
+                  /expr_stmt
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                simple_stmt
+                  power
+                    NAME
+ '            '
+ 'out'
+                    trailer
+                      LPAR
+ '('
+                      arglist
+                        STRING
+ "f'{indent}{_type}'"
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'fg'
+                          EQUAL
+ '='
+                          STRING
+ "'yellow'"
+                        /argument
+                      /arglist
+                      RPAR
+ ')'
+                    /trailer
+                  /power
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                simple_stmt
+                  expr_stmt
+                    power
+                      NAME
+ '            '
+ 'self'
+                      trailer
+                        DOT
+ '.'
+                        NAME
+ 'tree_depth'
+                      /trailer
+                    /power
+                    PLUSEQUAL
+ ' '
+ '+='
+                    NUMBER
+ ' '
+ '1'
+                  /expr_stmt
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                for_stmt
+                  NAME
+ '            '
+ 'for'
+                  NAME
+ ' '
+ 'child'
+                  NAME
+ ' '
+ 'in'
+                  power
+                    NAME
+ ' '
+ 'node'
+                    trailer
+                      DOT
+ '.'
+                      NAME
+ 'children'
+                    /trailer
+                  /power
+                  COLON
+ ':'
+                  suite
+                    NEWLINE
+ '\n'
+                    INDENT
+ ''
+                    simple_stmt
+                      yield_expr
+                        NAME
+ '                '
+ 'yield'
+                        yield_arg
+                          NAME
+ ' '
+ 'from'
+                          power
+                            NAME
+ ' '
+ 'self'
+                            trailer
+                              DOT
+ '.'
+                              NAME
+ 'visit'
+                            /trailer
+                            trailer
+                              LPAR
+ '('
+                              NAME
+ 'child'
+                              RPAR
+ ')'
+                            /trailer
+                          /power
+                        /yield_arg
+                      /yield_expr
+                      NEWLINE
+ '\n'
+                    /simple_stmt
+                    DEDENT
+ ''
+                  /suite
+                /for_stmt
+                simple_stmt
+                  expr_stmt
+                    power
+                      NAME
+ '\n            '
+ 'self'
+                      trailer
+                        DOT
+ '.'
+                        NAME
+ 'tree_depth'
+                      /trailer
+                    /power
+                    MINEQUAL
+ ' '
+ '-='
+                    NUMBER
+ ' '
+ '1'
+                  /expr_stmt
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                simple_stmt
+                  power
+                    NAME
+ '            '
+ 'out'
+                    trailer
+                      LPAR
+ '('
+                      arglist
+                        STRING
+ "f'{indent}/{_type}'"
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'fg'
+                          EQUAL
+ '='
+                          STRING
+ "'yellow'"
+                        /argument
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'bold'
+                          EQUAL
+ '='
+                          NAME
+ 'False'
+                        /argument
+                      /arglist
+                      RPAR
+ ')'
+                    /trailer
+                  /power
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                DEDENT
+ ''
+              /suite
+              NAME
+ '        '
+ 'else'
+              COLON
+ ':'
+              suite
+                NEWLINE
+ '\n'
+                INDENT
+ ''
+                simple_stmt
+                  expr_stmt
+                    NAME
+ '            '
+ '_type'
+                    EQUAL
+ ' '
+ '='
+                    power
+                      NAME
+ ' '
+ 'token'
+                      trailer
+                        DOT
+ '.'
+                        NAME
+ 'tok_name'
+                      /trailer
+                      trailer
+                        DOT
+ '.'
+                        NAME
+ 'get'
+                      /trailer
+                      trailer
+                        LPAR
+ '('
+                        arglist
+                          power
+                            NAME
+ 'node'
+                            trailer
+                              DOT
+ '.'
+                              NAME
+ 'type'
+                            /trailer
+                          /power
+                          COMMA
+ ','
+                          power
+                            NAME
+ ' '
+ 'str'
+                            trailer
+                              LPAR
+ '('
+                              power
+                                NAME
+ 'node'
+                                trailer
+                                  DOT
+ '.'
+                                  NAME
+ 'type'
+                                /trailer
+                              /power
+                              RPAR
+ ')'
+                            /trailer
+                          /power
+                        /arglist
+                        RPAR
+ ')'
+                      /trailer
+                    /power
+                  /expr_stmt
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                simple_stmt
+                  power
+                    NAME
+ '            '
+ 'out'
+                    trailer
+                      LPAR
+ '('
+                      arglist
+                        STRING
+ "f'{indent}{_type}'"
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'fg'
+                          EQUAL
+ '='
+                          STRING
+ "'blue'"
+                        /argument
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'nl'
+                          EQUAL
+ '='
+                          NAME
+ 'False'
+                        /argument
+                      /arglist
+                      RPAR
+ ')'
+                    /trailer
+                  /power
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                if_stmt
+                  NAME
+ '            '
+ 'if'
+                  power
+                    NAME
+ ' '
+ 'node'
+                    trailer
+                      DOT
+ '.'
+                      NAME
+ 'prefix'
+                    /trailer
+                  /power
+                  COLON
+ ':'
+                  suite
+                    NEWLINE
+ '\n'
+                    INDENT
+ ''
+                    simple_stmt
+                      power
+                        NAME
+ "                # We don't have to handle prefixes for `Node` objects since\n                # that delegates to the first child anyway.\n                "
+ 'out'
+                        trailer
+                          LPAR
+ '('
+                          arglist
+                            STRING
+ "f' {node.prefix!r}'"
+                            COMMA
+ ','
+                            argument
+                              NAME
+ ' '
+ 'fg'
+                              EQUAL
+ '='
+                              STRING
+ "'green'"
+                            /argument
+                            COMMA
+ ','
+                            argument
+                              NAME
+ ' '
+ 'bold'
+                              EQUAL
+ '='
+                              NAME
+ 'False'
+                            /argument
+                            COMMA
+ ','
+                            argument
+                              NAME
+ ' '
+ 'nl'
+                              EQUAL
+ '='
+                              NAME
+ 'False'
+                            /argument
+                          /arglist
+                          RPAR
+ ')'
+                        /trailer
+                      /power
+                      NEWLINE
+ '\n'
+                    /simple_stmt
+                    DEDENT
+ ''
+                  /suite
+                /if_stmt
+                simple_stmt
+                  power
+                    NAME
+ '            '
+ 'out'
+                    trailer
+                      LPAR
+ '('
+                      arglist
+                        STRING
+ "f' {node.value!r}'"
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'fg'
+                          EQUAL
+ '='
+                          STRING
+ "'blue'"
+                        /argument
+                        COMMA
+ ','
+                        argument
+                          NAME
+ ' '
+ 'bold'
+                          EQUAL
+ '='
+                          NAME
+ 'False'
+                        /argument
+                      /arglist
+                      RPAR
+ ')'
+                    /trailer
+                  /power
+                  NEWLINE
+ '\n'
+                /simple_stmt
+                DEDENT
+ ''
+              /suite
+            /if_stmt
+            DEDENT
+ ''
+          /suite
+        /funcdef
+        decorated
+          decorator
+            AT
+ '\n    '
+ '@'
+            NAME
+ 'classmethod'
+            NEWLINE
+ '\n'
+          /decorator
+          funcdef
+            NAME
+ '    '
+ 'def'
+            NAME
+ ' '
+ 'show'
+            parameters
+              LPAR
+ '('
+              typedargslist
+                NAME
+ 'cls'
+                COMMA
+ ','
+                tname
+                  NAME
+ ' '
+ 'code'
+                  COLON
+ ':'
+                  NAME
+ ' '
+ 'str'
+                /tname
+              /typedargslist
+              RPAR
+ ')'
+            /parameters
+            RARROW
+ ' '
+ '->'
+            NAME
+ ' '
+ 'None'
+            COLON
+ ':'
+            suite
+              NEWLINE
+ '\n'
+              INDENT
+ ''
+              simple_stmt
+                STRING
+ '        '
+ '"""Pretty-prints a given string of `code`.\n\n        Convenience method for debugging.\n        """'
+                NEWLINE
+ '\n'
+              /simple_stmt
+              simple_stmt
+                expr_stmt
+                  NAME
+ '        '
+ 'v'
+                  annassign
+                    COLON
+ ':'
+                    power
+                      NAME
+ ' '
+ 'DebugVisitor'
+                      trailer
+                        LSQB
+ '['
+                        NAME
+ 'None'
+                        RSQB
+ ']'
+                      /trailer
+                    /power
+                    EQUAL
+ ' '
+ '='
+                    power
+                      NAME
+ ' '
+ 'DebugVisitor'
+                      trailer
+                        LPAR
+ '('
+                        RPAR
+ ')'
+                      /trailer
+                    /power
+                  /annassign
+                /expr_stmt
+                NEWLINE
+ '\n'
+              /simple_stmt
+              simple_stmt
+                power
+                  NAME
+ '        '
+ 'list'
+                  trailer
+                    LPAR
+ '('
+                    power
+                      NAME
+ 'v'
+                      trailer
+                        DOT
+ '.'
+                        NAME
+ 'visit'
+                      /trailer
+                      trailer
+                        LPAR
+ '('
+                        power
+                          NAME
+ 'lib2to3_parse'
+                          trailer
+                            LPAR
+ '('
+                            NAME
+ 'code'
+                            RPAR
+ ')'
+                          /trailer
+                        /power
+                        RPAR
+ ')'
+                      /trailer
+                    /power
+                    RPAR
+ ')'
+                  /trailer
+                /power
+                NEWLINE
+ '\n'
+              /simple_stmt
+              DEDENT
+ ''
+            /suite
+          /funcdef
+        /decorated
+        DEDENT
+ ''
+      /suite
+    /classdef
+  /decorated
+  ENDMARKER
+ ''
+/file_input
diff -pruN 22.3.0-1/tests/data/miscellaneous/debug_visitor.py 22.6.0-1/tests/data/miscellaneous/debug_visitor.py
--- 22.3.0-1/tests/data/miscellaneous/debug_visitor.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/debug_visitor.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,32 @@
+@dataclass
+class DebugVisitor(Visitor[T]):
+    tree_depth: int = 0
+
+    def visit_default(self, node: LN) -> Iterator[T]:
+        indent = ' ' * (2 * self.tree_depth)
+        if isinstance(node, Node):
+            _type = type_repr(node.type)
+            out(f'{indent}{_type}', fg='yellow')
+            self.tree_depth += 1
+            for child in node.children:
+                yield from self.visit(child)
+
+            self.tree_depth -= 1
+            out(f'{indent}/{_type}', fg='yellow', bold=False)
+        else:
+            _type = token.tok_name.get(node.type, str(node.type))
+            out(f'{indent}{_type}', fg='blue', nl=False)
+            if node.prefix:
+                # We don't have to handle prefixes for `Node` objects since
+                # that delegates to the first child anyway.
+                out(f' {node.prefix!r}', fg='green', bold=False, nl=False)
+            out(f' {node.value!r}', fg='blue', bold=False)
+
+    @classmethod
+    def show(cls, code: str) -> None:
+        """Pretty-prints a given string of `code`.
+
+        Convenience method for debugging.
+        """
+        v: DebugVisitor[None] = DebugVisitor()
+        list(v.visit(lib2to3_parse(code)))
diff -pruN 22.3.0-1/tests/data/miscellaneous/decorators.py 22.6.0-1/tests/data/miscellaneous/decorators.py
--- 22.3.0-1/tests/data/miscellaneous/decorators.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/decorators.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,182 @@
+# This file doesn't use the standard decomposition.
+# Decorator syntax test cases are separated by double # comments.
+# Those before the 'output' comment are valid under the old syntax.
+# Those after the 'ouput' comment require PEP614 relaxed syntax.
+# Do not remove the double # separator before the first test case, it allows
+# the comment before the test case to be ignored.
+
+##
+
+@decorator
+def f():
+    ...
+
+##
+
+@decorator()
+def f():
+    ...
+
+##
+
+@decorator(arg)
+def f():
+    ...
+    
+##
+
+@decorator(kwarg=0)
+def f():
+    ...
+
+##
+
+@decorator(*args)
+def f():
+    ...
+
+##
+
+@decorator(**kwargs)
+def f():
+    ...
+
+##
+
+@decorator(*args, **kwargs)
+def f():
+    ...
+
+##
+
+@decorator(*args, **kwargs,)
+def f():
+    ...
+
+##
+
+@dotted.decorator
+def f():
+    ...
+
+##
+
+@dotted.decorator(arg)
+def f():
+    ...
+    
+##
+
+@dotted.decorator(kwarg=0)
+def f():
+    ...
+
+##
+
+@dotted.decorator(*args)
+def f():
+    ...
+
+##
+
+@dotted.decorator(**kwargs)
+def f():
+    ...
+
+##
+
+@dotted.decorator(*args, **kwargs)
+def f():
+    ...
+
+##
+
+@dotted.decorator(*args, **kwargs,)
+def f():
+    ...
+
+##
+
+@double.dotted.decorator
+def f():
+    ...
+
+##
+
+@double.dotted.decorator(arg)
+def f():
+    ...
+    
+##
+
+@double.dotted.decorator(kwarg=0)
+def f():
+    ...
+
+##
+
+@double.dotted.decorator(*args)
+def f():
+    ...
+
+##
+
+@double.dotted.decorator(**kwargs)
+def f():
+    ...
+
+##
+
+@double.dotted.decorator(*args, **kwargs)
+def f():
+    ...
+
+##
+
+@double.dotted.decorator(*args, **kwargs,)
+def f():
+    ...
+
+##
+
+@_(sequence["decorator"])
+def f():
+    ...
+
+##
+
+@eval("sequence['decorator']")
+def f():
+    ...
+
+# output
+
+##
+
+@decorator()()
+def f():
+    ...
+
+##
+
+@(decorator)
+def f():
+    ...
+
+##
+
+@sequence["decorator"]
+def f():
+    ...
+
+##
+
+@decorator[List[str]]
+def f():
+    ...
+
+##
+
+@var := decorator
+def f():
+    ...
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/miscellaneous/docstring_no_string_normalization.py 22.6.0-1/tests/data/miscellaneous/docstring_no_string_normalization.py
--- 22.3.0-1/tests/data/miscellaneous/docstring_no_string_normalization.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/docstring_no_string_normalization.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,249 @@
+class ALonelyClass:
+    '''
+    A multiline class docstring.
+    '''
+    def AnEquallyLonelyMethod(self):
+        '''
+        A multiline method docstring'''
+        pass
+
+
+def one_function():
+    '''This is a docstring with a single line of text.'''
+    pass
+
+
+def shockingly_the_quotes_are_normalized():
+    '''This is a multiline docstring.
+    This is a multiline docstring.
+    This is a multiline docstring.
+    '''
+    pass
+
+
+def foo():
+  """This is a docstring with             
+  some lines of text here
+  """
+  return
+
+
+def baz():
+  '''"This" is a string with some
+  embedded "quotes"'''
+  return
+
+
+def poit():
+  """
+  Lorem ipsum dolor sit amet.       
+
+  Consectetur adipiscing elit:
+   - sed do eiusmod tempor incididunt ut labore
+   - dolore magna aliqua
+     - enim ad minim veniam
+     - quis nostrud exercitation ullamco laboris nisi
+   - aliquip ex ea commodo consequat
+  """
+  pass
+
+
+def under_indent():
+  """
+  These lines are indented in a way that does not
+make sense.
+  """
+  pass
+
+
+def over_indent():
+  """
+  This has a shallow indent
+    - But some lines are deeper
+    - And the closing quote is too deep
+    """
+  pass
+
+
+def single_line():
+    """But with a newline after it!
+
+    """
+    pass
+
+
+def this():
+    r"""
+    'hey ho'
+    """
+
+
+def that():
+  """ "hey yah" """
+
+
+def and_that():
+  """
+  "hey yah" """
+
+
+def and_this():
+  ''' 
+  "hey yah"'''
+
+
+def believe_it_or_not_this_is_in_the_py_stdlib(): ''' 
+"hey yah"'''
+
+
+def shockingly_the_quotes_are_normalized_v2():
+    '''
+    Docstring Docstring Docstring
+    '''
+    pass
+
+
+def backslash_space():
+    '\ '
+
+
+def multiline_backslash_1():
+  '''
+  hey\there\
+  \ '''
+
+
+def multiline_backslash_2():
+  '''
+  hey there \ '''
+
+
+def multiline_backslash_3():
+  '''
+  already escaped \\ '''
+
+# output
+
+class ALonelyClass:
+    '''
+    A multiline class docstring.
+    '''
+
+    def AnEquallyLonelyMethod(self):
+        '''
+        A multiline method docstring'''
+        pass
+
+
+def one_function():
+    '''This is a docstring with a single line of text.'''
+    pass
+
+
+def shockingly_the_quotes_are_normalized():
+    '''This is a multiline docstring.
+    This is a multiline docstring.
+    This is a multiline docstring.
+    '''
+    pass
+
+
+def foo():
+    """This is a docstring with
+    some lines of text here
+    """
+    return
+
+
+def baz():
+    '''"This" is a string with some
+    embedded "quotes"'''
+    return
+
+
+def poit():
+    """
+    Lorem ipsum dolor sit amet.
+
+    Consectetur adipiscing elit:
+     - sed do eiusmod tempor incididunt ut labore
+     - dolore magna aliqua
+       - enim ad minim veniam
+       - quis nostrud exercitation ullamco laboris nisi
+     - aliquip ex ea commodo consequat
+    """
+    pass
+
+
+def under_indent():
+    """
+      These lines are indented in a way that does not
+    make sense.
+    """
+    pass
+
+
+def over_indent():
+    """
+    This has a shallow indent
+      - But some lines are deeper
+      - And the closing quote is too deep
+    """
+    pass
+
+
+def single_line():
+    """But with a newline after it!"""
+    pass
+
+
+def this():
+    r"""
+    'hey ho'
+    """
+
+
+def that():
+    """ "hey yah" """
+
+
+def and_that():
+    """
+    "hey yah" """
+
+
+def and_this():
+    '''
+    "hey yah"'''
+
+
+def believe_it_or_not_this_is_in_the_py_stdlib():
+    '''
+    "hey yah"'''
+
+
+def shockingly_the_quotes_are_normalized_v2():
+    '''
+    Docstring Docstring Docstring
+    '''
+    pass
+
+
+def backslash_space():
+    '\ '
+
+
+def multiline_backslash_1():
+    '''
+  hey\there\
+  \ '''
+
+
+def multiline_backslash_2():
+    '''
+    hey there \ '''
+
+
+def multiline_backslash_3():
+    '''
+    already escaped \\'''
diff -pruN 22.3.0-1/tests/data/miscellaneous/expression_skip_magic_trailing_comma.diff 22.6.0-1/tests/data/miscellaneous/expression_skip_magic_trailing_comma.diff
--- 22.3.0-1/tests/data/miscellaneous/expression_skip_magic_trailing_comma.diff	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/expression_skip_magic_trailing_comma.diff	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,447 @@
+--- [Deterministic header]
++++ [Deterministic header]
+@@ -1,8 +1,8 @@
+ ...
+-'some_string'
+-b'\\xa3'
++"some_string"
++b"\\xa3"
+ Name
+ None
+ True
+ False
+ 1
+@@ -21,99 +21,118 @@
+ Name1 or (Name2 and Name3) or Name4
+ Name1 or Name2 and Name3 or Name4
+ v1 << 2
+ 1 >> v2
+ 1 % finished
+-1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
+-((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
++1 + v2 - v3 * 4 ^ 5**v6 / 7 // 8
++((1 + v2) - (v3 * 4)) ^ (((5**v6) / 7) // 8)
+ not great
+ ~great
+ +value
+ -1
+ ~int and not v1 ^ 123 + v2 | True
+ (~int) and (not ((v1 ^ (123 + v2)) | True))
+-+really ** -confusing ** ~operator ** -precedence
+-flags & ~ select.EPOLLIN and waiters.write_task is not None
+++(really ** -(confusing ** ~(operator**-precedence)))
++flags & ~select.EPOLLIN and waiters.write_task is not None
+ lambda arg: None
+ lambda a=True: a
+ lambda a, b, c=True: a
+-lambda a, b, c=True, *, d=(1 << v2), e='str': a
+-lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
++lambda a, b, c=True, *, d=(1 << v2), e="str": a
++lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
+ manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
+-foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
++foo = lambda port_id, ignore_missing: {
++    "port1": port1_resource,
++    "port2": port2_resource,
++}[port_id]
+ 1 if True else 2
+ str or None if True else str or bytes or None
+ (str or None) if True else (str or bytes or None)
+ str or None if (1 if True else 2) else str or bytes or None
+ (str or None) if (1 if True else 2) else (str or bytes or None)
+-((super_long_variable_name or None) if (1 if super_long_test_name else 2) else (str or bytes or None))
+-{'2.7': dead, '3.7': (long_live or die_hard)}
+-{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
++(
++    (super_long_variable_name or None)
++    if (1 if super_long_test_name else 2)
++    else (str or bytes or None)
++)
++{"2.7": dead, "3.7": (long_live or die_hard)}
++{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
+ {**a, **b, **c}
+-{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
+-({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
++{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
++({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
+ ()
+ (1,)
+ (1, 2)
+ (1, 2, 3)
+ []
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
+-[1, 2, 3,]
++[1, 2, 3]
+ [*a]
+ [*range(10)]
+-[*a, 4, 5,]
+-[4, *a, 5,]
+-[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
++[*a, 4, 5]
++[4, *a, 5]
++[
++    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
++    element,
++    another,
++    *more,
++]
+ {i for i in (1, 2, 3)}
+-{(i ** 2) for i in (1, 2, 3)}
+-{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
+-{((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
++{(i**2) for i in (1, 2, 3)}
++{(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
++{((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
+ [i for i in (1, 2, 3)]
+-[(i ** 2) for i in (1, 2, 3)]
+-[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
+-[((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
++[(i**2) for i in (1, 2, 3)]
++[(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
++[((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
+ {i: 0 for i in (1, 2, 3)}
+-{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
++{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
+ {a: b * 2 for a, b in dictionary.items()}
+ {a: b * -2 for a, b in dictionary.items()}
+-{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
++{
++    k: v
++    for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
++}
+ Python3 > Python2 > COBOL
+ Life is Life
+ call()
+ call(arg)
+-call(kwarg='hey')
+-call(arg, kwarg='hey')
+-call(arg, another, kwarg='hey', **kwargs)
+-call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs)  # note: no trailing comma pre-3.6
++call(kwarg="hey")
++call(arg, kwarg="hey")
++call(arg, another, kwarg="hey", **kwargs)
++call(
++    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
++    arg,
++    another,
++    kwarg="hey",
++    **kwargs
++)  # note: no trailing comma pre-3.6
+ call(*gidgets[:2])
+ call(a, *gidgets[:2])
+ call(**self.screen_kwargs)
+ call(b, **self.screen_kwargs)
+ lukasz.langa.pl
+ call.me(maybe)
+-1 .real
+-1.0 .real
++(1).real
++(1.0).real
+ ....__class__
+ list[str]
+ dict[str, int]
+ tuple[str, ...]
+-tuple[
+-    str, int, float, dict[str, int]
+-]
++tuple[str, int, float, dict[str, int]]
+ tuple[str, int, float, dict[str, int],]
+ very_long_variable_name_filters: t.List[
+     t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
+ ]
+ xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+ )
+ xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+ )
+-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[
+-    ..., List[SomeClass]
+-] = classmethod(sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__))  # type: ignore
++xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(
++    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
++)  # type: ignore
+ slice[0]
+ slice[0:1]
+ slice[0:1:2]
+ slice[:]
+ slice[:-1]
+@@ -137,118 +156,197 @@
+ numpy[-(c + 1) :, d]
+ numpy[:, l[-2]]
+ numpy[:, ::-1]
+ numpy[np.newaxis, :]
+ (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
+-{'2.7': dead, '3.7': long_live or die_hard}
+-{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
++{"2.7": dead, "3.7": long_live or die_hard}
++{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
+ (SomeName)
+ SomeName
+ (Good, Bad, Ugly)
+ (i for i in (1, 2, 3))
+-((i ** 2) for i in (1, 2, 3))
+-((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
+-(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
++((i**2) for i in (1, 2, 3))
++((i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
++(((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
+ (*starred,)
+-{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
++{
++    "id": "1",
++    "type": "type",
++    "started_at": now(),
++    "ended_at": now() + timedelta(days=10),
++    "priority": 1,
++    "import_session_id": 1,
++    **kwargs,
++}
+ a = (1,)
+-b = 1,
++b = (1,)
+ c = 1
+ d = (1,) + a + (2,)
+ e = (1,).count(1)
+ f = 1, *range(10)
+ g = 1, *"ten"
+-what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
+-what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
+-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc()).all()
+-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
++what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
++    vars_to_remove
++)
++what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
++    vars_to_remove
++)
++result = (
++    session.query(models.Customer.id)
++    .filter(
++        models.Customer.account_id == account_id, models.Customer.email == email_address
++    )
++    .order_by(models.Customer.id.asc())
++    .all()
++)
++result = (
++    session.query(models.Customer.id)
++    .filter(
++        models.Customer.account_id == account_id, models.Customer.email == email_address
++    )
++    .order_by(models.Customer.id.asc())
++    .all()
++)
+ Ø = set()
+ authors.łukasz.say_thanks()
+ mapping = {
+     A: 0.25 * (10.0 / 12),
+     B: 0.1 * (10.0 / 12),
+     C: 0.1 * (10.0 / 12),
+     D: 0.1 * (10.0 / 12),
+ }
+ 
++
+ def gen():
+     yield from outside_of_generator
+-    a = (yield)
+-    b = ((yield))
+-    c = (((yield)))
++    a = yield
++    b = yield
++    c = yield
++
+ 
+ async def f():
+     await some.complicated[0].call(with_args=(True or (1 is not 1)))
+-print(* [] or [1])
++
++
++print(*[] or [1])
+ print(**{1: 3} if False else {x: x for x in range(3)})
+-print(* lambda x: x)
+-assert(not Test),("Short message")
+-assert this is ComplexTest and not requirements.fit_in_a_single_line(force=False), "Short message"
+-assert(((parens is TooMany)))
+-for x, in (1,), (2,), (3,): ...
+-for y in (): ...
+-for z in (i for i in (1, 2, 3)): ...
+-for i in (call()): ...
+-for j in (1 + (2 + 3)): ...
+-while(this and that): ...
+-for addr_family, addr_type, addr_proto, addr_canonname, addr_sockaddr in socket.getaddrinfo('google.com', 'http'):
++print(*lambda x: x)
++assert not Test, "Short message"
++assert this is ComplexTest and not requirements.fit_in_a_single_line(
++    force=False
++), "Short message"
++assert parens is TooMany
++for (x,) in (1,), (2,), (3,):
++    ...
++for y in ():
++    ...
++for z in (i for i in (1, 2, 3)):
++    ...
++for i in call():
++    ...
++for j in 1 + (2 + 3):
++    ...
++while this and that:
++    ...
++for (
++    addr_family,
++    addr_type,
++    addr_proto,
++    addr_canonname,
++    addr_sockaddr,
++) in socket.getaddrinfo("google.com", "http"):
+     pass
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-if (
+-    threading.current_thread() != threading.main_thread() and
+-    threading.current_thread() != threading.main_thread() or
+-    signal.getsignal(signal.SIGINT) != signal.default_int_handler
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    ~ aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l ** aaaa.m // aaaa.n
+-):
+-    return True
+-if (
+-    ~ aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l ** aaaaaaaa.m // aaaaaaaa.n
+-):
+-    return True
+-if (
+-    ~ aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l ** aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
+-):
+-    return True
+-aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaa * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa) / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++if (
++    threading.current_thread() != threading.main_thread()
++    and threading.current_thread() != threading.main_thread()
++    or signal.getsignal(signal.SIGINT) != signal.default_int_handler
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e
++    | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n
++):
++    return True
++if (
++    ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e
++    | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h
++    ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n
++):
++    return True
++if (
++    ~aaaaaaaaaaaaaaaa.a
++    + aaaaaaaaaaaaaaaa.b
++    - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e
++    | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h
++    ^ aaaaaaaaaaaaaaaa.i
++    << aaaaaaaaaaaaaaaa.k
++    >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
++):
++    return True
++(
++    aaaaaaaaaaaaaaaa
++    + aaaaaaaaaaaaaaaa
++    - aaaaaaaaaaaaaaaa
++    * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
++    / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
++)
+ aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
+-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++(
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++)
+ bbbb >> bbbb * bbbb
+-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ^bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++(
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    ^ bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    ^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++)
+ last_call()
+ # standalone comment at ENDMARKER
diff -pruN 22.3.0-1/tests/data/miscellaneous/force_py36.py 22.6.0-1/tests/data/miscellaneous/force_py36.py
--- 22.3.0-1/tests/data/miscellaneous/force_py36.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/force_py36.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,16 @@
+# The input source must not contain any Py36-specific syntax (e.g. argument type
+# annotations, trailing comma after *rest) or this test becomes invalid.
+def long_function_name(argument_one, argument_two, argument_three, argument_four, argument_five, argument_six, *rest): ...
+# output
+# The input source must not contain any Py36-specific syntax (e.g. argument type
+# annotations, trailing comma after *rest) or this test becomes invalid.
+def long_function_name(
+    argument_one,
+    argument_two,
+    argument_three,
+    argument_four,
+    argument_five,
+    argument_six,
+    *rest,
+):
+    ...
diff -pruN 22.3.0-1/tests/data/miscellaneous/force_pyi.py 22.6.0-1/tests/data/miscellaneous/force_pyi.py
--- 22.3.0-1/tests/data/miscellaneous/force_pyi.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/force_pyi.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,65 @@
+from typing import Union
+
+@bird
+def zoo(): ...
+
+class A: ...
+@bar
+class B:
+    def BMethod(self) -> None: ...
+    @overload
+    def BMethod(self, arg : List[str]) -> None: ...
+
+class C: ...
+@hmm
+class D: ...
+class E: ...
+
+@baz
+def foo() -> None:
+    ...
+
+class F (A , C): ...
+def spam() -> None: ...
+
+@overload
+def spam(arg: str) -> str: ...
+
+var  : int = 1
+
+def eggs() -> Union[str, int]: ...
+
+# output
+
+from typing import Union
+
+@bird
+def zoo(): ...
+
+class A: ...
+
+@bar
+class B:
+    def BMethod(self) -> None: ...
+    @overload
+    def BMethod(self, arg: List[str]) -> None: ...
+
+class C: ...
+
+@hmm
+class D: ...
+
+class E: ...
+
+@baz
+def foo() -> None: ...
+
+class F(A, C): ...
+
+def spam() -> None: ...
+@overload
+def spam(arg: str) -> str: ...
+
+var: int = 1
+
+def eggs() -> Union[str, int]: ...
diff -pruN 22.3.0-1/tests/data/miscellaneous/long_strings_flag_disabled.py 22.6.0-1/tests/data/miscellaneous/long_strings_flag_disabled.py
--- 22.3.0-1/tests/data/miscellaneous/long_strings_flag_disabled.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/long_strings_flag_disabled.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,292 @@
+x = "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
+
+x += "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
+
+y = "Short string"
+
+print(
+    "This is a really long string inside of a print statement with extra arguments attached at the end of it.",
+    x,
+    y,
+    z,
+)
+
+print(
+    "This is a really long string inside of a print statement with no extra arguments attached at the end of it."
+)
+
+D1 = {
+    "The First": "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.",
+    "The Second": "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.",
+}
+
+D2 = {
+    1.0: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.",
+    2.0: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.",
+}
+
+D3 = {
+    x: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.",
+    y: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.",
+}
+
+D4 = {
+    "A long and ridiculous {}".format(
+        string_key
+    ): "This is a really really really long string that has to go i,side of a dictionary. It is soooo bad.",
+    some_func(
+        "calling", "some", "stuff"
+    ): "This is a really really really long string that has to go inside of a dictionary. It is {soooo} bad (#{x}).".format(
+        sooo="soooo", x=2
+    ),
+    "A %s %s"
+    % (
+        "formatted",
+        "string",
+    ): "This is a really really really long string that has to go inside of a dictionary. It is %s bad (#%d)."
+    % ("soooo", 2),
+}
+
+func_with_keywords(
+    my_arg,
+    my_kwarg="Long keyword strings also need to be wrapped, but they will probably need to be handled a little bit differently.",
+)
+
+bad_split1 = (
+    "But what should happen when code has already been formatted but in the wrong way? Like"
+    " with a space at the end instead of the beginning. Or what about when it is split too soon?"
+)
+
+bad_split2 = (
+    "But what should happen when code has already "
+    "been formatted but in the wrong way? Like "
+    "with a space at the end instead of the "
+    "beginning. Or what about when it is split too "
+    "soon? In the case of a split that is too "
+    "short, black will try to honer the custom "
+    "split."
+)
+
+bad_split3 = (
+    "What if we have inline comments on "  # First Comment
+    "each line of a bad split? In that "  # Second Comment
+    "case, we should just leave it alone."  # Third Comment
+)
+
+bad_split_func1(
+    "But what should happen when code has already "
+    "been formatted but in the wrong way? Like "
+    "with a space at the end instead of the "
+    "beginning. Or what about when it is split too "
+    "soon? In the case of a split that is too "
+    "short, black will try to honer the custom "
+    "split.",
+    xxx,
+    yyy,
+    zzz,
+)
+
+bad_split_func2(
+    xxx,
+    yyy,
+    zzz,
+    long_string_kwarg="But what should happen when code has already been formatted but in the wrong way? Like "
+    "with a space at the end instead of the beginning. Or what about when it is split too "
+    "soon?",
+)
+
+bad_split_func3(
+    (
+        "But what should happen when code has already "
+        r"been formatted but in the wrong way? Like "
+        "with a space at the end instead of the "
+        r"beginning. Or what about when it is split too "
+        r"soon? In the case of a split that is too "
+        "short, black will try to honer the custom "
+        "split."
+    ),
+    xxx,
+    yyy,
+    zzz,
+)
+
+raw_string = r"This is a long raw string. When re-formatting this string, black needs to make sure it prepends the 'r' onto the new string."
+
+fmt_string1 = "We also need to be sure to preserve any and all {} which may or may not be attached to the string in question.".format(
+    "method calls"
+)
+
+fmt_string2 = "But what about when the string is {} but {}".format(
+    "short",
+    "the method call is really really really really really really really really long?",
+)
+
+old_fmt_string1 = (
+    "While we are on the topic of %s, we should also note that old-style formatting must also be preserved, since some %s still uses it."
+    % ("formatting", "code")
+)
+
+old_fmt_string2 = "This is a %s %s %s %s" % (
+    "really really really really really",
+    "old",
+    "way to format strings!",
+    "Use f-strings instead!",
+)
+
+old_fmt_string3 = (
+    "Whereas only the strings after the percent sign were long in the last example, this example uses a long initial string as well. This is another %s %s %s %s"
+    % (
+        "really really really really really",
+        "old",
+        "way to format strings!",
+        "Use f-strings instead!",
+    )
+)
+
+fstring = f"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
+
+fstring_with_no_fexprs = f"Some regular string that needs to get split certainly but is NOT an fstring by any means whatsoever."
+
+comment_string = "Long lines with inline comments should have their comments appended to the reformatted string's enclosing right parentheses."  # This comment gets thrown to the top.
+
+arg_comment_string = print(
+    "Long lines with inline comments which are apart of (and not the only member of) an argument list should have their comments appended to the reformatted string's enclosing left parentheses.",  # This comment stays on the bottom.
+    "Arg #2",
+    "Arg #3",
+    "Arg #4",
+    "Arg #5",
+)
+
+pragma_comment_string1 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa: E501
+
+pragma_comment_string2 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa
+
+"""This is a really really really long triple quote string and it should not be touched."""
+
+triple_quote_string = """This is a really really really long triple quote string assignment and it should not be touched."""
+
+assert (
+    some_type_of_boolean_expression
+), "Followed by a really really really long string that is used to provide context to the AssertionError exception."
+
+assert (
+    some_type_of_boolean_expression
+), "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string {}.".format(
+    "formatting"
+)
+
+assert some_type_of_boolean_expression, (
+    "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string %s."
+    % "formatting"
+)
+
+assert some_type_of_boolean_expression, (
+    "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic %s %s."
+    % ("string", "formatting")
+)
+
+some_function_call(
+    "With a reallly generic name and with a really really long string that is, at some point down the line, "
+    + added
+    + " to a variable and then added to another string."
+)
+
+some_function_call(
+    "With a reallly generic name and with a really really long string that is, at some point down the line, "
+    + added
+    + " to a variable and then added to another string. But then what happens when the final string is also supppppperrrrr long?! Well then that second (realllllllly long) string should be split too.",
+    "and a second argument",
+    and_a_third,
+)
+
+return "A really really really really really really really really really really really really really long {} {}".format(
+    "return", "value"
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma which should NOT be there.",
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma which should NOT be there.",  # comment after comma
+)
+
+func_with_bad_comma(
+    (
+        "This is a really long string argument to a function that has a trailing comma"
+        " which should NOT be there."
+    ),
+)
+
+func_with_bad_comma(
+    (
+        "This is a really long string argument to a function that has a trailing comma"
+        " which should NOT be there."
+    ),  # comment after comma
+)
+
+func_with_bad_parens_that_wont_fit_in_one_line(
+    ("short string that should have parens stripped"), x, y, z
+)
+
+func_with_bad_parens_that_wont_fit_in_one_line(
+    x, y, ("short string that should have parens stripped"), z
+)
+
+func_with_bad_parens(
+    ("short string that should have parens stripped"),
+    x,
+    y,
+    z,
+)
+
+func_with_bad_parens(
+    x,
+    y,
+    ("short string that should have parens stripped"),
+    z,
+)
+
+annotated_variable: Final = (
+    "This is a large "
+    + STRING
+    + " that has been "
+    + CONCATENATED
+    + "using the '+' operator."
+)
+annotated_variable: Final = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
+annotated_variable: Literal[
+    "fakse_literal"
+] = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
+
+backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\"
+backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\\\"
+backslashes = "This is a really 'long' string with \"embedded double quotes\" and 'single' quotes that also handles checking for an odd number of backslashes \\\", like this...\\\\\\"
+
+short_string = "Hi" " there."
+
+func_call(short_string=("Hi" " there."))
+
+raw_strings = r"Don't" " get" r" merged" " unless they are all raw."
+
+
+def foo():
+    yield "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
+
+
+x = f"This is a {{really}} long string that needs to be split without a doubt (i.e. most definitely). In short, this {string} that can't possibly be {{expected}} to fit all together on one line. In {fact} it may even take up three or more lines... like four or five... but probably just four."
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # type: ignore
+    " of it."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # noqa
+    " of it."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # pylint: disable=some-pylint-check
+    " of it."
+)
diff -pruN 22.3.0-1/tests/data/miscellaneous/missing_final_newline.diff 22.6.0-1/tests/data/miscellaneous/missing_final_newline.diff
--- 22.3.0-1/tests/data/miscellaneous/missing_final_newline.diff	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/missing_final_newline.diff	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,8 @@
+--- [Deterministic header]
++++ [Deterministic header]
+@@ -1,3 +1,3 @@
+ # A comment-only file, with no final EOL character
+ # This triggers https://bugs.python.org/issue2142
+-# This is the line without the EOL character
+\ No newline at end of file
++# This is the line without the EOL character
diff -pruN 22.3.0-1/tests/data/miscellaneous/missing_final_newline.py 22.6.0-1/tests/data/miscellaneous/missing_final_newline.py
--- 22.3.0-1/tests/data/miscellaneous/missing_final_newline.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/missing_final_newline.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,3 @@
+# A comment-only file, with no final EOL character
+# This triggers https://bugs.python.org/issue2142
+# This is the line without the EOL character
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/miscellaneous/pattern_matching_invalid.py 22.6.0-1/tests/data/miscellaneous/pattern_matching_invalid.py
--- 22.3.0-1/tests/data/miscellaneous/pattern_matching_invalid.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/pattern_matching_invalid.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,18 @@
+# First match, no errors
+match something:
+    case bla():
+        pass
+
+# Problem on line 10
+match invalid_case:
+    case valid_case:
+        pass
+    case a := b:
+        pass
+    case valid_case:
+        pass
+
+# No problems either
+match something:
+    case bla():
+        pass
diff -pruN 22.3.0-1/tests/data/miscellaneous/power_op_newline.py 22.6.0-1/tests/data/miscellaneous/power_op_newline.py
--- 22.3.0-1/tests/data/miscellaneous/power_op_newline.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/power_op_newline.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,10 @@
+importA;()<<0**0#
+
+# output
+
+importA
+(
+    ()
+    << 0
+    ** 0
+)  #
diff -pruN 22.3.0-1/tests/data/miscellaneous/python2_detection.py 22.6.0-1/tests/data/miscellaneous/python2_detection.py
--- 22.3.0-1/tests/data/miscellaneous/python2_detection.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/python2_detection.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,90 @@
+# This uses a similar construction to the decorators.py test data file FYI.
+
+print "hello, world!"
+
+###
+
+exec "print('hello, world!')"
+
+###
+
+def set_position((x, y), value):
+    pass
+
+###
+
+try:
+    pass
+except Exception, err:
+    pass
+
+###
+
+raise RuntimeError, "I feel like crashing today :p"
+
+###
+
+`wow_these_really_did_exist`
+
+###
+
+10L
+
+###
+
+10l
+
+###
+
+0123
+
+# output
+
+print("hello python three!")
+
+###
+
+exec("I'm not sure if you can use exec like this but that's not important here!")
+
+###
+
+try:
+    pass
+except make_exception(1, 2):
+    pass
+
+###
+
+try:
+    pass
+except Exception as err:
+    pass
+
+###
+
+raise RuntimeError(make_msg(1, 2))
+
+###
+
+raise RuntimeError("boom!",)
+
+###
+
+def set_position(x, y, value):
+    pass
+
+###
+
+10
+
+###
+
+0
+
+###
+
+000
+
+###
+
+0o12
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/miscellaneous/string_quotes.py 22.6.0-1/tests/data/miscellaneous/string_quotes.py
--- 22.3.0-1/tests/data/miscellaneous/string_quotes.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/string_quotes.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,112 @@
+''''''
+'\''
+'"'
+"'"
+"\""
+"Hello"
+"Don't do that"
+'Here is a "'
+'What\'s the deal here?'
+"What's the deal \"here\"?"
+"And \"here\"?"
+"""Strings with "" in them"""
+'''Strings with "" in them'''
+'''Here's a "'''
+'''Here's a " '''
+'''Just a normal triple
+quote'''
+f"just a normal {f} string"
+f'''This is a triple-quoted {f}-string'''
+f'MOAR {" ".join([])}'
+f"MOAR {' '.join([])}"
+r"raw string ftw"
+r'Date d\'expiration:(.*)'
+r'Tricky "quote'
+r'Not-so-tricky \"quote'
+rf'{yay}'
+'\n\
+The \"quick\"\n\
+brown fox\n\
+jumps over\n\
+the \'lazy\' dog.\n\
+'
+re.compile(r'[\\"]')
+"x = ''; y = \"\""
+"x = '''; y = \"\""
+"x = ''''; y = \"\""
+"x = '' ''; y = \"\""
+"x = ''; y = \"\"\""
+"x = '''; y = \"\"\"\""
+"x = ''''; y = \"\"\"\"\""
+"x = '' ''; y = \"\"\"\"\""
+'unnecessary \"\"escaping'
+"unnecessary \'\'escaping"
+'\\""'
+"\\''"
+'Lots of \\\\\\\\\'quotes\''
+f'{y * " "} \'{z}\''
+f'{{y * " "}} \'{z}\''
+f'\'{z}\' {y * " "}'
+f'{y * x} \'{z}\''
+'\'{z}\' {y * " "}'
+'{y * x} \'{z}\''
+
+# We must bail out if changing the quotes would introduce backslashes in f-string
+# expressions. xref: https://github.com/psf/black/issues/2348
+f"\"{b}\"{' ' * (long-len(b)+1)}: \"{sts}\",\n"
+f"\"{a}\"{'hello' * b}\"{c}\""
+
+# output
+
+""""""
+"'"
+'"'
+"'"
+'"'
+"Hello"
+"Don't do that"
+'Here is a "'
+"What's the deal here?"
+'What\'s the deal "here"?'
+'And "here"?'
+"""Strings with "" in them"""
+"""Strings with "" in them"""
+'''Here's a "'''
+"""Here's a " """
+"""Just a normal triple
+quote"""
+f"just a normal {f} string"
+f"""This is a triple-quoted {f}-string"""
+f'MOAR {" ".join([])}'
+f"MOAR {' '.join([])}"
+r"raw string ftw"
+r"Date d\'expiration:(.*)"
+r'Tricky "quote'
+r"Not-so-tricky \"quote"
+rf"{yay}"
+"\nThe \"quick\"\nbrown fox\njumps over\nthe 'lazy' dog.\n"
+re.compile(r'[\\"]')
+"x = ''; y = \"\""
+"x = '''; y = \"\""
+"x = ''''; y = \"\""
+"x = '' ''; y = \"\""
+'x = \'\'; y = """'
+'x = \'\'\'; y = """"'
+'x = \'\'\'\'; y = """""'
+'x = \'\' \'\'; y = """""'
+'unnecessary ""escaping'
+"unnecessary ''escaping"
+'\\""'
+"\\''"
+"Lots of \\\\\\\\'quotes'"
+f'{y * " "} \'{z}\''
+f"{{y * \" \"}} '{z}'"
+f'\'{z}\' {y * " "}'
+f"{y * x} '{z}'"
+"'{z}' {y * \" \"}"
+"{y * x} '{z}'"
+
+# We must bail out if changing the quotes would introduce backslashes in f-string
+# expressions. xref: https://github.com/psf/black/issues/2348
+f"\"{b}\"{' ' * (long-len(b)+1)}: \"{sts}\",\n"
+f"\"{a}\"{'hello' * b}\"{c}\""
diff -pruN 22.3.0-1/tests/data/miscellaneous/stub.pyi 22.6.0-1/tests/data/miscellaneous/stub.pyi
--- 22.3.0-1/tests/data/miscellaneous/stub.pyi	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/miscellaneous/stub.pyi	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,151 @@
+X: int
+
+def f(): ...
+
+
+class D: 
+    ...
+
+
+class C:
+    ...
+
+class B:
+    this_lack_of_newline_should_be_kept: int
+    def b(self) -> None: ...
+
+    but_this_newline_should_also_be_kept: int
+
+class A:
+    attr: int
+    attr2: str
+
+    def f(self) -> int:
+        ...
+
+    def g(self) -> str: ...
+
+
+
+def g():
+    ...
+
+def h(): ...
+
+if sys.version_info >= (3, 8):
+    class E:
+        def f(self): ...
+    class F:
+
+        def f(self): ...
+    class G: ...
+    class H: ...
+else:
+    class I: ...
+    class J: ...
+    def f(): ...
+
+    class K:
+        def f(self): ...
+    def f(): ...
+
+class Nested:
+    class dirty: ...
+    class little: ...
+    class secret:
+        def who_has_to_know(self): ...
+    def verse(self): ...
+
+class Conditional:
+    def f(self): ...
+    if sys.version_info >= (3, 8):
+        def g(self): ...
+    else:
+        def g(self): ...
+    def h(self): ...
+    def i(self): ...
+    if sys.version_info >= (3, 8):
+        def j(self): ...
+    def k(self): ...
+    if sys.version_info >= (3, 8):
+        class A: ...
+        class B: ...
+        class C:
+            def l(self): ...
+            def m(self): ...
+
+
+# output
+X: int
+
+def f(): ...
+
+class D: ...
+class C: ...
+
+class B:
+    this_lack_of_newline_should_be_kept: int
+    def b(self) -> None: ...
+
+    but_this_newline_should_also_be_kept: int
+
+class A:
+    attr: int
+    attr2: str
+
+    def f(self) -> int: ...
+    def g(self) -> str: ...
+
+def g(): ...
+def h(): ...
+
+if sys.version_info >= (3, 8):
+    class E:
+        def f(self): ...
+
+    class F:
+        def f(self): ...
+
+    class G: ...
+    class H: ...
+
+else:
+    class I: ...
+    class J: ...
+
+    def f(): ...
+
+    class K:
+        def f(self): ...
+
+    def f(): ...
+
+class Nested:
+    class dirty: ...
+    class little: ...
+
+    class secret:
+        def who_has_to_know(self): ...
+
+    def verse(self): ...
+
+class Conditional:
+    def f(self): ...
+    if sys.version_info >= (3, 8):
+        def g(self): ...
+    else:
+        def g(self): ...
+
+    def h(self): ...
+    def i(self): ...
+    if sys.version_info >= (3, 8):
+        def j(self): ...
+
+    def k(self): ...
+    if sys.version_info >= (3, 8):
+        class A: ...
+        class B: ...
+
+        class C:
+            def l(self): ...
+            def m(self): ...
diff -pruN 22.3.0-1/tests/data/missing_final_newline.diff 22.6.0-1/tests/data/missing_final_newline.diff
--- 22.3.0-1/tests/data/missing_final_newline.diff	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/missing_final_newline.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,8 +0,0 @@
---- [Deterministic header]
-+++ [Deterministic header]
-@@ -1,3 +1,3 @@
- # A comment-only file, with no final EOL character
- # This triggers https://bugs.python.org/issue2142
--# This is the line without the EOL character
-\ No newline at end of file
-+# This is the line without the EOL character
diff -pruN 22.3.0-1/tests/data/missing_final_newline.py 22.6.0-1/tests/data/missing_final_newline.py
--- 22.3.0-1/tests/data/missing_final_newline.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/missing_final_newline.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-# A comment-only file, with no final EOL character
-# This triggers https://bugs.python.org/issue2142
-# This is the line without the EOL character
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/non_python_notebook.ipynb 22.6.0-1/tests/data/non_python_notebook.ipynb
--- 22.3.0-1/tests/data/non_python_notebook.ipynb	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/non_python_notebook.ipynb	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-{"metadata":{"kernelspec":{"name":"ir","display_name":"R","language":"R"},"language_info":{"name":"R","codemirror_mode":"r","pygments_lexer":"r","mimetype":"text/x-r-source","file_extension":".r","version":"4.0.5"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"library(tidyverse) ","metadata":{"_uuid":"051d70d956493feee0c6d64651c6a088724dca2a","_execution_state":"idle"},"execution_count":null,"outputs":[]}]}
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/notebook_empty_metadata.ipynb 22.6.0-1/tests/data/notebook_empty_metadata.ipynb
--- 22.3.0-1/tests/data/notebook_empty_metadata.ipynb	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/notebook_empty_metadata.ipynb	1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
-   "source": [
-    "%%time\n",
-    "\n",
-    "print('foo')"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {},
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff -pruN 22.3.0-1/tests/data/notebook_no_trailing_newline.ipynb 22.6.0-1/tests/data/notebook_no_trailing_newline.ipynb
--- 22.3.0-1/tests/data/notebook_no_trailing_newline.ipynb	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/notebook_no_trailing_newline.ipynb	1970-01-01 00:00:00.000000000 +0000
@@ -1,39 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
-   "source": [
-    "%%time\n",
-    "\n",
-    "print('foo')"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "interpreter": {
-   "hash": "e758f3098b5b55f4d87fe30bbdc1367f20f246b483f96267ee70e6c40cb185d8"
-  },
-  "kernelspec": {
-   "display_name": "Python 3.8.10 64-bit ('black': venv)",
-   "name": "python3"
-  },
-  "language_info": {
-   "name": "python",
-   "version": ""
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/notebook_trailing_newline.ipynb 22.6.0-1/tests/data/notebook_trailing_newline.ipynb
--- 22.3.0-1/tests/data/notebook_trailing_newline.ipynb	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/notebook_trailing_newline.ipynb	1970-01-01 00:00:00.000000000 +0000
@@ -1,39 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
-   "source": [
-    "%%time\n",
-    "\n",
-    "print('foo')"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "interpreter": {
-   "hash": "e758f3098b5b55f4d87fe30bbdc1367f20f246b483f96267ee70e6c40cb185d8"
-  },
-  "kernelspec": {
-   "display_name": "Python 3.8.10 64-bit ('black': venv)",
-   "name": "python3"
-  },
-  "language_info": {
-   "name": "python",
-   "version": ""
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff -pruN 22.3.0-1/tests/data/notebook_which_cant_be_parsed.ipynb 22.6.0-1/tests/data/notebook_which_cant_be_parsed.ipynb
--- 22.3.0-1/tests/data/notebook_which_cant_be_parsed.ipynb	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/notebook_which_cant_be_parsed.ipynb	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-foo
diff -pruN 22.3.0-1/tests/data/notebook_without_changes.ipynb 22.6.0-1/tests/data/notebook_without_changes.ipynb
--- 22.3.0-1/tests/data/notebook_without_changes.ipynb	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/notebook_without_changes.ipynb	1970-01-01 00:00:00.000000000 +0000
@@ -1,46 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "tags": []
-   },
-   "outputs": [],
-   "source": [
-    "%%time\n",
-    "\n",
-    "print(\"foo\")"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "This notebook should not be reformatted"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "interpreter": {
-   "hash": "e758f3098b5b55f4d87fe30bbdc1367f20f246b483f96267ee70e6c40cb185d8"
-  },
-  "kernelspec": {
-   "display_name": "Python 3.8.10 64-bit ('black': venv)",
-   "name": "python3"
-  },
-  "language_info": {
-   "name": "python",
-   "version": ""
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/numeric_literals.py 22.6.0-1/tests/data/numeric_literals.py
--- 22.3.0-1/tests/data/numeric_literals.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/numeric_literals.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-#!/usr/bin/env python3.6
-
-x = 123456789
-x = 123456
-x = .1
-x = 1.
-x = 1E+1
-x = 1E-1
-x = 1.000_000_01
-x = 123456789.123456789
-x = 123456789.123456789E123456789
-x = 123456789E123456789
-x = 123456789J
-x = 123456789.123456789J
-x = 0XB1ACC
-x = 0B1011
-x = 0O777
-x = 0.000000006
-x = 10000
-x = 133333
-
-# output
-
-
-#!/usr/bin/env python3.6
-
-x = 123456789
-x = 123456
-x = 0.1
-x = 1.0
-x = 1e1
-x = 1e-1
-x = 1.000_000_01
-x = 123456789.123456789
-x = 123456789.123456789e123456789
-x = 123456789e123456789
-x = 123456789j
-x = 123456789.123456789j
-x = 0xB1ACC
-x = 0b1011
-x = 0o777
-x = 0.000000006
-x = 10000
-x = 133333
diff -pruN 22.3.0-1/tests/data/numeric_literals_skip_underscores.py 22.6.0-1/tests/data/numeric_literals_skip_underscores.py
--- 22.3.0-1/tests/data/numeric_literals_skip_underscores.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/numeric_literals_skip_underscores.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-#!/usr/bin/env python3.6
-
-x = 123456789
-x = 1_2_3_4_5_6_7
-x = 1E+1
-x = 0xb1acc
-x = 0.00_00_006
-x = 12_34_567J
-x = .1_2
-x = 1_2.
-
-# output
-
-#!/usr/bin/env python3.6
-
-x = 123456789
-x = 1_2_3_4_5_6_7
-x = 1e1
-x = 0xB1ACC
-x = 0.00_00_006
-x = 12_34_567j
-x = 0.1_2
-x = 1_2.0
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/one_element_subscript.py 22.6.0-1/tests/data/one_element_subscript.py
--- 22.3.0-1/tests/data/one_element_subscript.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/one_element_subscript.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,36 +0,0 @@
-# We should not treat the trailing comma
-# in a single-element subscript.
-a: tuple[int,]
-b = tuple[int,]
-
-# The magic comma still applies to multi-element subscripts.
-c: tuple[int, int,]
-d = tuple[int, int,]
-
-# Magic commas still work as expected for non-subscripts.
-small_list = [1,]
-list_of_types = [tuple[int,],]
-
-# output
-# We should not treat the trailing comma
-# in a single-element subscript.
-a: tuple[int,]
-b = tuple[int,]
-
-# The magic comma still applies to multi-element subscripts.
-c: tuple[
-    int,
-    int,
-]
-d = tuple[
-    int,
-    int,
-]
-
-# Magic commas still work as expected for non-subscripts.
-small_list = [
-    1,
-]
-list_of_types = [
-    tuple[int,],
-]
diff -pruN 22.3.0-1/tests/data/parenthesized_context_managers.py 22.6.0-1/tests/data/parenthesized_context_managers.py
--- 22.3.0-1/tests/data/parenthesized_context_managers.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/parenthesized_context_managers.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-with (CtxManager() as example):
-    ...
-
-with (CtxManager1(), CtxManager2()):
-    ...
-
-with (CtxManager1() as example, CtxManager2()):
-    ...
-
-with (CtxManager1(), CtxManager2() as example):
-    ...
-
-with (CtxManager1() as example1, CtxManager2() as example2):
-    ...
-
-with (
-    CtxManager1() as example1,
-    CtxManager2() as example2,
-    CtxManager3() as example3,
-):
-    ...
diff -pruN 22.3.0-1/tests/data/pattern_matching_complex.py 22.6.0-1/tests/data/pattern_matching_complex.py
--- 22.3.0-1/tests/data/pattern_matching_complex.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pattern_matching_complex.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,144 +0,0 @@
-# Cases sampled from Lib/test/test_patma.py
-
-# case black_test_patma_098
-match x:
-    case -0j:
-        y = 0
-# case black_test_patma_142
-match x:
-    case bytes(z):
-        y = 0
-# case black_test_patma_073
-match x:
-    case 0 if 0:
-        y = 0
-    case 0 if 1:
-        y = 1
-# case black_test_patma_006
-match 3:
-    case 0 | 1 | 2 | 3:
-        x = True
-# case black_test_patma_049
-match x:
-    case [0, 1] | [1, 0]:
-        y = 0
-# case black_check_sequence_then_mapping
-match x:
-    case [*_]:
-        return "seq"
-    case {}:
-        return "map"
-# case black_test_patma_035
-match x:
-    case {0: [1, 2, {}]}:
-        y = 0
-    case {0: [1, 2, {}] | True} | {1: [[]]} | {0: [1, 2, {}]} | [] | "X" | {}:
-        y = 1
-    case []:
-        y = 2
-# case black_test_patma_107
-match x:
-    case 0.25 + 1.75j:
-        y = 0
-# case black_test_patma_097
-match x:
-    case -0j:
-        y = 0
-# case black_test_patma_007
-match 4:
-    case 0 | 1 | 2 | 3:
-        x = True
-# case black_test_patma_154
-match x:
-    case 0 if x:
-        y = 0
-# case black_test_patma_134
-match x:
-    case {1: 0}:
-        y = 0
-    case {0: 0}:
-        y = 1
-    case {**z}:
-        y = 2
-# case black_test_patma_185
-match Seq():
-    case [*_]:
-        y = 0
-# case black_test_patma_063
-match x:
-    case 1:
-        y = 0
-    case 1:
-        y = 1
-# case black_test_patma_248
-match x:
-    case {"foo": bar}:
-        y = bar
-# case black_test_patma_019
-match (0, 1, 2):
-    case [0, 1, *x, 2]:
-        y = 0
-# case black_test_patma_052
-match x:
-    case [0]:
-        y = 0
-    case [1, 0] if (x := x[:0]):
-        y = 1
-    case [1, 0]:
-        y = 2
-# case black_test_patma_191
-match w:
-    case [x, y, *_]:
-        z = 0
-# case black_test_patma_110
-match x:
-    case -0.25 - 1.75j:
-        y = 0
-# case black_test_patma_151
-match (x,):
-    case [y]:
-        z = 0
-# case black_test_patma_114
-match x:
-    case A.B.C.D:
-        y = 0
-# case black_test_patma_232
-match x:
-    case None:
-        y = 0
-# case black_test_patma_058
-match x:
-    case 0:
-        y = 0
-# case black_test_patma_233
-match x:
-    case False:
-        y = 0
-# case black_test_patma_078
-match x:
-    case []:
-        y = 0
-    case [""]:
-        y = 1
-    case "":
-        y = 2
-# case black_test_patma_156
-match x:
-    case z:
-        y = 0
-# case black_test_patma_189
-match w:
-    case [x, y, *rest]:
-        z = 0
-# case black_test_patma_042
-match x:
-    case (0 as z) | (1 as z) | (2 as z) if z == x % 2:
-        y = 0
-# case black_test_patma_034
-match x:
-    case {0: [1, 2, {}]}:
-        y = 0
-    case {0: [1, 2, {}] | False} | {1: [[]]} | {0: [1, 2, {}]} | [] | "X" | {}:
-        y = 1
-    case []:
-        y = 2
diff -pruN 22.3.0-1/tests/data/pattern_matching_extras.py 22.6.0-1/tests/data/pattern_matching_extras.py
--- 22.3.0-1/tests/data/pattern_matching_extras.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pattern_matching_extras.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,119 +0,0 @@
-import match
-
-match something:
-    case [a as b]:
-        print(b)
-    case [a as b, c, d, e as f]:
-        print(f)
-    case Point(a as b):
-        print(b)
-    case Point(int() as x, int() as y):
-        print(x, y)
-
-
-match = 1
-case: int = re.match(something)
-
-match re.match(case):
-    case type("match", match):
-        pass
-    case match:
-        pass
-
-
-def func(match: case, case: match) -> case:
-    match Something():
-        case func(match, case):
-            ...
-        case another:
-            ...
-
-
-match maybe, multiple:
-    case perhaps, 5:
-        pass
-    case perhaps, 6,:
-        pass
-
-
-match more := (than, one), indeed,:
-    case _, (5, 6):
-        pass
-    case [[5], (6)], [7],:
-        pass
-    case _:
-        pass
-
-
-match a, *b, c:
-    case [*_]:
-        assert "seq" == _
-    case {}:
-        assert "map" == b
-
-
-match match(
-    case,
-    match(
-        match, case, match, looooooooooooooooooooooooooooooooooooong, match, case, match
-    ),
-    case,
-):
-    case case(
-        match=case,
-        case=re.match(
-            loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
-        ),
-    ):
-        pass
-
-    case [a as match]:
-        pass
-
-    case case:
-        pass
-
-
-match match:
-    case case:
-        pass
-
-
-match a, *b(), c:
-    case d, *f, g:
-        pass
-
-
-match something:
-    case {
-        "key": key as key_1,
-        "password": PASS.ONE | PASS.TWO | PASS.THREE as password,
-    }:
-        pass
-    case {"maybe": something(complicated as this) as that}:
-        pass
-
-
-match something:
-    case 1 as a:
-        pass
-
-    case 2 as b, 3 as c:
-        pass
-
-    case 4 as d, (5 as e), (6 | 7 as g), *h:
-        pass
-
-
-match bar1:
-    case Foo(aa=Callable() as aa, bb=int()):
-        print(bar1.aa, bar1.bb)
-    case _:
-        print("no match", "\n")
-
-
-match bar1:
-    case Foo(
-        normal=x, perhaps=[list, {an: d, dict: 1.0}] as y, otherwise=something, q=t as u
-    ):
-        pass
diff -pruN 22.3.0-1/tests/data/pattern_matching_generic.py 22.6.0-1/tests/data/pattern_matching_generic.py
--- 22.3.0-1/tests/data/pattern_matching_generic.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pattern_matching_generic.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,107 +0,0 @@
-re.match()
-match = a
-with match() as match:
-    match = f"{match}"
-
-re.match()
-match = a
-with match() as match:
-    match = f"{match}"
-
-
-def get_grammars(target_versions: Set[TargetVersion]) -> List[Grammar]:
-    if not target_versions:
-        # No target_version specified, so try all grammars.
-        return [
-            # Python 3.7+
-            pygram.python_grammar_no_print_statement_no_exec_statement_async_keywords,
-            # Python 3.0-3.6
-            pygram.python_grammar_no_print_statement_no_exec_statement,
-            # Python 2.7 with future print_function import
-            pygram.python_grammar_no_print_statement,
-            # Python 2.7
-            pygram.python_grammar,
-        ]
-
-    match match:
-        case case:
-            match match:
-                case case:
-                    pass
-
-    if all(version.is_python2() for version in target_versions):
-        # Python 2-only code, so try Python 2 grammars.
-        return [
-            # Python 2.7 with future print_function import
-            pygram.python_grammar_no_print_statement,
-            # Python 2.7
-            pygram.python_grammar,
-        ]
-
-    re.match()
-    match = a
-    with match() as match:
-        match = f"{match}"
-
-    def test_patma_139(self):
-        x = False
-        match x:
-            case bool(z):
-                y = 0
-        self.assertIs(x, False)
-        self.assertEqual(y, 0)
-        self.assertIs(z, x)
-
-    # Python 3-compatible code, so only try Python 3 grammar.
-    grammars = []
-    if supports_feature(target_versions, Feature.PATTERN_MATCHING):
-        # Python 3.10+
-        grammars.append(pygram.python_grammar_soft_keywords)
-    # If we have to parse both, try to parse async as a keyword first
-    if not supports_feature(
-        target_versions, Feature.ASYNC_IDENTIFIERS
-    ) and not supports_feature(target_versions, Feature.PATTERN_MATCHING):
-        # Python 3.7-3.9
-        grammars.append(
-            pygram.python_grammar_no_print_statement_no_exec_statement_async_keywords
-        )
-    if not supports_feature(target_versions, Feature.ASYNC_KEYWORDS):
-        # Python 3.0-3.6
-        grammars.append(pygram.python_grammar_no_print_statement_no_exec_statement)
-
-    def test_patma_155(self):
-        x = 0
-        y = None
-        match x:
-            case 1e1000:
-                y = 0
-        self.assertEqual(x, 0)
-        self.assertIs(y, None)
-
-        x = range(3)
-        match x:
-            case [y, case as x, z]:
-                w = 0
-
-    # At least one of the above branches must have been taken, because every Python
-    # version has exactly one of the two 'ASYNC_*' flags
-    return grammars
-
-
-def lib2to3_parse(src_txt: str, target_versions: Iterable[TargetVersion] = ()) -> Node:
-    """Given a string with source, return the lib2to3 Node."""
-    if not src_txt.endswith("\n"):
-        src_txt += "\n"
-
-    grammars = get_grammars(set(target_versions))
-
-
-re.match()
-match = a
-with match() as match:
-    match = f"{match}"
-
-re.match()
-match = a
-with match() as match:
-    match = f"{match}"
diff -pruN 22.3.0-1/tests/data/pattern_matching_invalid.py 22.6.0-1/tests/data/pattern_matching_invalid.py
--- 22.3.0-1/tests/data/pattern_matching_invalid.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pattern_matching_invalid.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-# First match, no errors
-match something:
-    case bla():
-        pass
-
-# Problem on line 10
-match invalid_case:
-    case valid_case:
-        pass
-    case a := b:
-        pass
-    case valid_case:
-        pass
-
-# No problems either
-match something:
-    case bla():
-        pass
diff -pruN 22.3.0-1/tests/data/pattern_matching_simple.py 22.6.0-1/tests/data/pattern_matching_simple.py
--- 22.3.0-1/tests/data/pattern_matching_simple.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pattern_matching_simple.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,92 +0,0 @@
-# Cases sampled from PEP 636 examples
-
-match command.split():
-    case [action, obj]:
-        ...  # interpret action, obj
-
-match command.split():
-    case [action]:
-        ...  # interpret single-verb action
-    case [action, obj]:
-        ...  # interpret action, obj
-
-match command.split():
-    case ["quit"]:
-        print("Goodbye!")
-        quit_game()
-    case ["look"]:
-        current_room.describe()
-    case ["get", obj]:
-        character.get(obj, current_room)
-    case ["go", direction]:
-        current_room = current_room.neighbor(direction)
-    # The rest of your commands go here
-
-match command.split():
-    case ["drop", *objects]:
-        for obj in objects:
-            character.drop(obj, current_room)
-    # The rest of your commands go here
-
-match command.split():
-    case ["quit"]:
-        pass
-    case ["go", direction]:
-        print("Going:", direction)
-    case ["drop", *objects]:
-        print("Dropping: ", *objects)
-    case _:
-        print(f"Sorry, I couldn't understand {command!r}")
-
-match command.split():
-    case ["north"] | ["go", "north"]:
-        current_room = current_room.neighbor("north")
-    case ["get", obj] | ["pick", "up", obj] | ["pick", obj, "up"]:
-        ...  # Code for picking up the given object
-
-match command.split():
-    case ["go", ("north" | "south" | "east" | "west")]:
-        current_room = current_room.neighbor(...)
-        # how do I know which direction to go?
-
-match command.split():
-    case ["go", ("north" | "south" | "east" | "west") as direction]:
-        current_room = current_room.neighbor(direction)
-
-match command.split():
-    case ["go", direction] if direction in current_room.exits:
-        current_room = current_room.neighbor(direction)
-    case ["go", _]:
-        print("Sorry, you can't go that way")
-
-match event.get():
-    case Click(position=(x, y)):
-        handle_click_at(x, y)
-    case KeyPress(key_name="Q") | Quit():
-        game.quit()
-    case KeyPress(key_name="up arrow"):
-        game.go_north()
-    case KeyPress():
-        pass  # Ignore other keystrokes
-    case other_event:
-        raise ValueError(f"Unrecognized event: {other_event}")
-
-match event.get():
-    case Click((x, y), button=Button.LEFT):  # This is a left click
-        handle_click_at(x, y)
-    case Click():
-        pass  # ignore other clicks
-
-
-def where_is(point):
-    match point:
-        case Point(x=0, y=0):
-            print("Origin")
-        case Point(x=0, y=y):
-            print(f"Y={y}")
-        case Point(x=x, y=0):
-            print(f"X={x}")
-        case Point():
-            print("Somewhere else")
-        case _:
-            print("Not a point")
diff -pruN 22.3.0-1/tests/data/pattern_matching_style.py 22.6.0-1/tests/data/pattern_matching_style.py
--- 22.3.0-1/tests/data/pattern_matching_style.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pattern_matching_style.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,91 +0,0 @@
-match something:
-    case b(): print(1+1)
-    case c(
-        very_complex=True,
-        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-   1
-    ): print(1)
-    case c(
-        very_complex=True,
-        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
-    ): print(2)
-    case a: pass
-
-match(
-    arg # comment
-)
-
-match(
-)
-
-match(
-
-
-)
-
-case(
-    arg # comment
-)
-
-case(
-)
-
-case(
-
-
-)
-
-
-re.match(
-    something # fast
-)
-re.match(
-
-
-
-)
-match match(
-
-
-):
-    case case(
-        arg, # comment
-    ):
-        pass
-
-# output
-
-match something:
-    case b():
-        print(1 + 1)
-    case c(
-        very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
-    ):
-        print(1)
-    case c(
-        very_complex=True,
-        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
-    ):
-        print(2)
-    case a:
-        pass
-
-match(arg)  # comment
-
-match()
-
-match()
-
-case(arg)  # comment
-
-case()
-
-case()
-
-
-re.match(something)  # fast
-re.match()
-match match():
-    case case(
-        arg,  # comment
-    ):
-        pass
diff -pruN 22.3.0-1/tests/data/pep_570.py 22.6.0-1/tests/data/pep_570.py
--- 22.3.0-1/tests/data/pep_570.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pep_570.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-def positional_only_arg(a, /):
-    pass
-
-
-def all_markers(a, b, /, c, d, *, e, f):
-    pass
-
-
-def all_markers_with_args_and_kwargs(
-    a_long_one,
-    b_long_one,
-    /,
-    c_long_one,
-    d_long_one,
-    *args,
-    e_long_one,
-    f_long_one,
-    **kwargs,
-):
-    pass
-
-
-def all_markers_with_defaults(a, b=1, /, c=2, d=3, *, e=4, f=5):
-    pass
-
-
-def long_one_with_long_parameter_names(
-    but_all_of_them,
-    are_positional_only,
-    arguments_mmmmkay,
-    so_this_is_only_valid_after,
-    three_point_eight,
-    /,
-):
-    pass
-
-
-lambda a, /: a
-
-lambda a, b, /, c, d, *, e, f: a
-
-lambda a, b, /, c, d, *args, e, f, **kwargs: args
-
-lambda a, b=1, /, c=2, d=3, *, e=4, f=5: 1
diff -pruN 22.3.0-1/tests/data/pep_572_do_not_remove_parens.py 22.6.0-1/tests/data/pep_572_do_not_remove_parens.py
--- 22.3.0-1/tests/data/pep_572_do_not_remove_parens.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pep_572_do_not_remove_parens.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-# Most of the following examples are really dumb, some of them aren't even accepted by Python,
-# we're fixing them only so fuzzers (which follow the grammar which actually allows these
-# examples matter of fact!) don't yell at us :p
-
-del (a := [1])
-
-try:
-    pass
-except (a := 1) as (b := why_does_this_exist):
-    pass
-
-for (z := 124) in (x := -124):
-    pass
-
-with (y := [3, 2, 1]) as (funfunfun := indeed):
-    pass
-
-
-@(please := stop)
-def sigh():
-    pass
diff -pruN 22.3.0-1/tests/data/pep_572.py 22.6.0-1/tests/data/pep_572.py
--- 22.3.0-1/tests/data/pep_572.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pep_572.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,47 +0,0 @@
-(a := 1)
-(a := a)
-if (match := pattern.search(data)) is None:
-    pass
-if match := pattern.search(data):
-    pass
-[y := f(x), y**2, y**3]
-filtered_data = [y for x in data if (y := f(x)) is None]
-(y := f(x))
-y0 = (y1 := f(x))
-foo(x=(y := f(x)))
-
-
-def foo(answer=(p := 42)):
-    pass
-
-
-def foo(answer: (p := 42) = 5):
-    pass
-
-
-lambda: (x := 1)
-(x := lambda: 1)
-(x := lambda: (y := 1))
-lambda line: (m := re.match(pattern, line)) and m.group(1)
-x = (y := 0)
-(z := (y := (x := 0)))
-(info := (name, phone, *rest))
-(x := 1, 2)
-(total := total + tax)
-len(lines := f.readlines())
-foo(x := 3, cat="vector")
-foo(cat=(category := "vector"))
-if any(len(longline := l) >= 100 for l in lines):
-    print(longline)
-if env_base := os.environ.get("PYTHONUSERBASE", None):
-    return env_base
-if self._is_special and (ans := self._check_nans(context=context)):
-    return ans
-foo(b := 2, a=1)
-foo((b := 2), a=1)
-foo(c=(b := 2), a=1)
-
-while x := f(x):
-    pass
-while x := f(x):
-    pass
diff -pruN 22.3.0-1/tests/data/pep_572_py310.py 22.6.0-1/tests/data/pep_572_py310.py
--- 22.3.0-1/tests/data/pep_572_py310.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pep_572_py310.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-# Unparenthesized walruses are now allowed in indices since Python 3.10.
-x[a:=0]
-x[a:=0, b:=1]
-x[5, b:=0]
diff -pruN 22.3.0-1/tests/data/pep_572_py39.py 22.6.0-1/tests/data/pep_572_py39.py
--- 22.3.0-1/tests/data/pep_572_py39.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pep_572_py39.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,7 +0,0 @@
-# Unparenthesized walruses are now allowed in set literals & set comprehensions
-# since Python 3.9
-{x := 1, 2, 3}
-{x4 := x**5 for x in range(7)}
-# We better not remove the parentheses here (since it's a 3.10 feature)
-x[(a := 1)]
-x[(a := 1), (b := 3)]
diff -pruN 22.3.0-1/tests/data/pep_572_remove_parens.py 22.6.0-1/tests/data/pep_572_remove_parens.py
--- 22.3.0-1/tests/data/pep_572_remove_parens.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/pep_572_remove_parens.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,105 +0,0 @@
-if (foo := 0):
-    pass
-
-if (foo := 1):
-    pass
-
-if (y := 5 + 5):
-    pass
-
-y = (x := 0)
-
-y += (x := 0)
-
-(y := 5 + 5)
-
-test: int = (test2 := 2)
-
-a, b = (test := (1, 2))
-
-# see also https://github.com/psf/black/issues/2139
-assert (foo := 42 - 12)
-
-foo(x=(y := f(x)))
-
-
-def foo(answer=(p := 42)):
-    ...
-
-
-def foo2(answer: (p := 42) = 5):
-    ...
-
-
-lambda: (x := 1)
-
-a[(x := 12)]
-a[:(x := 13)]
-
-# we don't touch expressions in f-strings but if we do one day, don't break 'em
-f'{(x:=10)}'
-
-
-def a():
-    return (x := 3)
-    await (b := 1)
-    yield (a := 2)
-    raise (c := 3)
-
-def this_is_so_dumb() -> (please := no):
-    pass
-
-
-# output
-if foo := 0:
-    pass
-
-if foo := 1:
-    pass
-
-if y := 5 + 5:
-    pass
-
-y = (x := 0)
-
-y += (x := 0)
-
-(y := 5 + 5)
-
-test: int = (test2 := 2)
-
-a, b = (test := (1, 2))
-
-# see also https://github.com/psf/black/issues/2139
-assert (foo := 42 - 12)
-
-foo(x=(y := f(x)))
-
-
-def foo(answer=(p := 42)):
-    ...
-
-
-def foo2(answer: (p := 42) = 5):
-    ...
-
-
-lambda: (x := 1)
-
-a[(x := 12)]
-a[:(x := 13)]
-
-# we don't touch expressions in f-strings but if we do one day, don't break 'em
-f"{(x:=10)}"
-
-
-def a():
-    return (x := 3)
-    await (b := 1)
-    yield (a := 2)
-    raise (c := 3)
-
-
-def this_is_so_dumb() -> (please := no):
-    pass
-
diff -pruN 22.3.0-1/tests/data/percent_precedence.py 22.6.0-1/tests/data/percent_precedence.py
--- 22.3.0-1/tests/data/percent_precedence.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/percent_precedence.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,41 +0,0 @@
-("" % a) ** 2
-("" % a)[0]
-("" % a)()
-("" % a).b
-
-2 * ("" % a)
-2 @ ("" % a)
-2 / ("" % a)
-2 // ("" % a)
-2 % ("" % a)
-+("" % a)
-b + ("" % a)
--("" % a)
-b - ("" % a)
-b + -("" % a)
-~("" % a)
-2 ** ("" % a)
-await ("" % a)
-b[("" % a)]
-b(("" % a))
-# output
-("" % a) ** 2
-("" % a)[0]
-("" % a)()
-("" % a).b
-
-2 * ("" % a)
-2 @ ("" % a)
-2 / ("" % a)
-2 // ("" % a)
-2 % ("" % a)
-+("" % a)
-b + "" % a
--("" % a)
-b - "" % a
-b + -("" % a)
-~("" % a)
-2 ** ("" % a)
-await ("" % a)
-b[("" % a)]
-b(("" % a))
diff -pruN 22.3.0-1/tests/data/power_op_newline.py 22.6.0-1/tests/data/power_op_newline.py
--- 22.3.0-1/tests/data/power_op_newline.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/power_op_newline.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,10 +0,0 @@
-importA;()<<0**0#
-
-# output
-
-importA
-(
-    ()
-    << 0
-    ** 0
-)  #
diff -pruN 22.3.0-1/tests/data/power_op_spacing.py 22.6.0-1/tests/data/power_op_spacing.py
--- 22.3.0-1/tests/data/power_op_spacing.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/power_op_spacing.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,103 +0,0 @@
-def function(**kwargs):
-    t = a**2 + b**3
-    return t ** 2
-
-
-def function_replace_spaces(**kwargs):
-    t = a **2 + b** 3 + c ** 4
-
-
-def function_dont_replace_spaces():
-    {**a, **b, **c}
-
-
-a = 5**~4
-b = 5 ** f()
-c = -(5**2)
-d = 5 ** f["hi"]
-e = lazy(lambda **kwargs: 5)
-f = f() ** 5
-g = a.b**c.d
-h = 5 ** funcs.f()
-i = funcs.f() ** 5
-j = super().name ** 5
-k = [(2**idx, value) for idx, value in pairs]
-l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
-m = [([2**63], [1, 2**63])]
-n = count <= 10**5
-o = settings(max_examples=10**6)
-p = {(k, k**2): v**2 for k, v in pairs}
-q = [10**i for i in range(6)]
-r = x**y
-
-a = 5.0**~4.0
-b = 5.0 ** f()
-c = -(5.0**2.0)
-d = 5.0 ** f["hi"]
-e = lazy(lambda **kwargs: 5)
-f = f() ** 5.0
-g = a.b**c.d
-h = 5.0 ** funcs.f()
-i = funcs.f() ** 5.0
-j = super().name ** 5.0
-k = [(2.0**idx, value) for idx, value in pairs]
-l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
-m = [([2.0**63.0], [1.0, 2**63.0])]
-n = count <= 10**5.0
-o = settings(max_examples=10**6.0)
-p = {(k, k**2): v**2.0 for k, v in pairs}
-q = [10.5**i for i in range(6)]
-
-
-# output
-
-
-def function(**kwargs):
-    t = a**2 + b**3
-    return t**2
-
-
-def function_replace_spaces(**kwargs):
-    t = a**2 + b**3 + c**4
-
-
-def function_dont_replace_spaces():
-    {**a, **b, **c}
-
-
-a = 5**~4
-b = 5 ** f()
-c = -(5**2)
-d = 5 ** f["hi"]
-e = lazy(lambda **kwargs: 5)
-f = f() ** 5
-g = a.b**c.d
-h = 5 ** funcs.f()
-i = funcs.f() ** 5
-j = super().name ** 5
-k = [(2**idx, value) for idx, value in pairs]
-l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
-m = [([2**63], [1, 2**63])]
-n = count <= 10**5
-o = settings(max_examples=10**6)
-p = {(k, k**2): v**2 for k, v in pairs}
-q = [10**i for i in range(6)]
-r = x**y
-
-a = 5.0**~4.0
-b = 5.0 ** f()
-c = -(5.0**2.0)
-d = 5.0 ** f["hi"]
-e = lazy(lambda **kwargs: 5)
-f = f() ** 5.0
-g = a.b**c.d
-h = 5.0 ** funcs.f()
-i = funcs.f() ** 5.0
-j = super().name ** 5.0
-k = [(2.0**idx, value) for idx, value in pairs]
-l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
-m = [([2.0**63.0], [1.0, 2**63.0])]
-n = count <= 10**5.0
-o = settings(max_examples=10**6.0)
-p = {(k, k**2): v**2.0 for k, v in pairs}
-q = [10.5**i for i in range(6)]
diff -pruN 22.3.0-1/tests/data/preview/cantfit.py 22.6.0-1/tests/data/preview/cantfit.py
--- 22.3.0-1/tests/data/preview/cantfit.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/cantfit.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,107 @@
+# long variable name
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 0
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 1  # with a comment
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
+    1, 2, 3
+]
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function()
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
+    arg1, arg2, arg3
+)
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
+    [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
+)
+# long function name
+normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying()
+normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
+    arg1, arg2, arg3
+)
+normal_name = but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
+    [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
+)
+# long arguments
+normal_name = normal_function_name(
+    "but with super long string arguments that on their own exceed the line limit so there's no way it can ever fit",
+    "eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs",
+    this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it=0,
+)
+string_variable_name = (
+    "a string that is waaaaaaaayyyyyyyy too long, even in parens, there's nothing you can do"  # noqa
+)
+for key in """
+    hostname
+    port
+    username
+""".split():
+    if key in self.connect_kwargs:
+        raise ValueError(err.format(key))
+concatenated_strings = "some strings that are " "concatenated implicitly, so if you put them on separate " "lines it will fit"
+del concatenated_strings, string_variable_name, normal_function_name, normal_name, need_more_to_make_the_line_long_enough
+
+
+# output
+
+
+# long variable name
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
+    0
+)
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
+    1  # with a comment
+)
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
+    1,
+    2,
+    3,
+]
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = (
+    function()
+)
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
+    arg1, arg2, arg3
+)
+this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = function(
+    [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
+)
+# long function name
+normal_name = (
+    but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying()
+)
+normal_name = (
+    but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
+        arg1, arg2, arg3
+    )
+)
+normal_name = (
+    but_the_function_name_is_now_ridiculously_long_and_it_is_still_super_annoying(
+        [1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3
+    )
+)
+# long arguments
+normal_name = normal_function_name(
+    "but with super long string arguments that on their own exceed the line limit so"
+    " there's no way it can ever fit",
+    "eggs with spam and eggs and spam with eggs with spam and eggs and spam with eggs"
+    " with spam and eggs and spam with eggs",
+    this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it=0,
+)
+string_variable_name = "a string that is waaaaaaaayyyyyyyy too long, even in parens, there's nothing you can do"  # noqa
+for key in """
+    hostname
+    port
+    username
+""".split():
+    if key in self.connect_kwargs:
+        raise ValueError(err.format(key))
+concatenated_strings = (
+    "some strings that are "
+    "concatenated implicitly, so if you put them on separate "
+    "lines it will fit"
+)
+del (
+    concatenated_strings,
+    string_variable_name,
+    normal_function_name,
+    normal_name,
+    need_more_to_make_the_line_long_enough,
+)
diff -pruN 22.3.0-1/tests/data/preview/comments7.py 22.6.0-1/tests/data/preview/comments7.py
--- 22.3.0-1/tests/data/preview/comments7.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/comments7.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,271 @@
+from .config import (
+    Any,
+    Bool,
+    ConfigType,
+    ConfigTypeAttributes,
+    Int,
+    Path,
+    #  String,
+    #  resolve_to_config_type,
+    #  DEFAULT_TYPE_ATTRIBUTES,
+)
+
+
+from .config import (
+    Any,
+    Bool,
+    ConfigType,
+    ConfigTypeAttributes,
+    Int,
+    no_comma_here_yet
+    #  and some comments,
+    #  resolve_to_config_type,
+    #  DEFAULT_TYPE_ATTRIBUTES,
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent  # NOT DRY
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent as component  # DRY
+)
+
+
+result = 1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+result = (
+    1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+)
+
+result = (
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # aaa
+)
+
+result = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # aaa
+
+
+def func():
+    c = call(
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0789,
+        a[-1],  # type: ignore
+    )
+    c = call(
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0789,
+        a[-1]  # type: ignore
+    )
+    c = call(
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0456,
+        0.0789,
+        a[-1]  # type: ignore
+    )
+
+    # The type: ignore exception only applies to line length, not
+    # other types of formatting.
+    c = call(
+        "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa",  # type: ignore
+        "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa"
+    )
+
+
+class C:
+    @pytest.mark.parametrize(
+        ("post_data", "message"),
+        [
+            # metadata_version errors.
+            (
+                {},
+                "None is an invalid value for Metadata-Version. Error: This field is"
+                " required. see"
+                " https://packaging.python.org/specifications/core-metadata"
+            ),
+            (
+                {"metadata_version": "-1"},
+                "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
+                " Version see"
+                " https://packaging.python.org/specifications/core-metadata"
+            ),
+            # name errors.
+            (
+                {"metadata_version": "1.2"},
+                "'' is an invalid value for Name. Error: This field is required. see"
+                " https://packaging.python.org/specifications/core-metadata"
+            ),
+            (
+                {"metadata_version": "1.2", "name": "foo-"},
+                "'foo-' is an invalid value for Name. Error: Must start and end with a"
+                " letter or numeral and contain only ascii numeric and '.', '_' and"
+                " '-'. see https://packaging.python.org/specifications/core-metadata"
+            ),
+            # version errors.
+            (
+                {"metadata_version": "1.2", "name": "example"},
+                "'' is an invalid value for Version. Error: This field is required. see"
+                " https://packaging.python.org/specifications/core-metadata"
+            ),
+            (
+                {"metadata_version": "1.2", "name": "example", "version": "dog"},
+                "'dog' is an invalid value for Version. Error: Must start and end with"
+                " a letter or numeral and contain only ascii numeric and '.', '_' and"
+                " '-'. see https://packaging.python.org/specifications/core-metadata"
+            )
+        ]
+    )
+    def test_fails_invalid_post_data(
+        self, pyramid_config, db_request, post_data, message
+    ):
+        ...
+
+square = Square(4) # type: Optional[Square]
+
+# output
+
+from .config import (
+    Any,
+    Bool,
+    ConfigType,
+    ConfigTypeAttributes,
+    Int,
+    Path,
+    #  String,
+    #  resolve_to_config_type,
+    #  DEFAULT_TYPE_ATTRIBUTES,
+)
+
+
+from .config import (
+    Any,
+    Bool,
+    ConfigType,
+    ConfigTypeAttributes,
+    Int,
+    no_comma_here_yet,
+    #  and some comments,
+    #  resolve_to_config_type,
+    #  DEFAULT_TYPE_ATTRIBUTES,
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent,  # NOT DRY
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent as component,  # DRY
+)
+
+
+result = 1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+result = 1  # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+result = (  # aaa
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+)
+
+result = (  # aaa
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+)
+
+
+def func():
+    c = call(
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0789,
+        a[-1],  # type: ignore
+    )
+    c = call(0.0123, 0.0456, 0.0789, 0.0123, 0.0789, a[-1])  # type: ignore
+    c = call(
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0456,
+        0.0789,
+        a[-1],  # type: ignore
+    )
+
+    # The type: ignore exception only applies to line length, not
+    # other types of formatting.
+    c = call(
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",  # type: ignore
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+        "aaaaaaaa",
+    )
+
+
+class C:
+    @pytest.mark.parametrize(
+        ("post_data", "message"),
+        [
+            # metadata_version errors.
+            (
+                {},
+                "None is an invalid value for Metadata-Version. Error: This field is"
+                " required. see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            (
+                {"metadata_version": "-1"},
+                "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
+                " Version see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            # name errors.
+            (
+                {"metadata_version": "1.2"},
+                "'' is an invalid value for Name. Error: This field is required. see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            (
+                {"metadata_version": "1.2", "name": "foo-"},
+                "'foo-' is an invalid value for Name. Error: Must start and end with a"
+                " letter or numeral and contain only ascii numeric and '.', '_' and"
+                " '-'. see https://packaging.python.org/specifications/core-metadata",
+            ),
+            # version errors.
+            (
+                {"metadata_version": "1.2", "name": "example"},
+                "'' is an invalid value for Version. Error: This field is required. see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            (
+                {"metadata_version": "1.2", "name": "example", "version": "dog"},
+                "'dog' is an invalid value for Version. Error: Must start and end with"
+                " a letter or numeral and contain only ascii numeric and '.', '_' and"
+                " '-'. see https://packaging.python.org/specifications/core-metadata",
+            ),
+        ],
+    )
+    def test_fails_invalid_post_data(
+        self, pyramid_config, db_request, post_data, message
+    ):
+        ...
+
+
+square = Square(4)  # type: Optional[Square]
diff -pruN 22.3.0-1/tests/data/preview/comments8.py 22.6.0-1/tests/data/preview/comments8.py
--- 22.3.0-1/tests/data/preview/comments8.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/comments8.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,15 @@
+# The percent-percent comments are Spyder IDE cells.
+# Both `#%%`` and `# %%` are accepted, so `black` standardises
+# to the latter.
+
+#%%
+# %%
+
+# output
+
+# The percent-percent comments are Spyder IDE cells.
+# Both `#%%`` and `# %%` are accepted, so `black` standardises
+# to the latter.
+
+# %%
+# %%
diff -pruN 22.3.0-1/tests/data/preview/docstring_preview.py 22.6.0-1/tests/data/preview/docstring_preview.py
--- 22.3.0-1/tests/data/preview/docstring_preview.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/docstring_preview.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,89 @@
+def docstring_almost_at_line_limit():
+    """long docstring.................................................................
+    """
+
+
+def docstring_almost_at_line_limit_with_prefix():
+    f"""long docstring................................................................
+    """
+
+
+def mulitline_docstring_almost_at_line_limit():
+    """long docstring.................................................................
+
+    ..................................................................................
+    """
+
+
+def mulitline_docstring_almost_at_line_limit_with_prefix():
+    f"""long docstring................................................................
+
+    ..................................................................................
+    """
+
+
+def docstring_at_line_limit():
+    """long docstring................................................................"""
+
+
+def docstring_at_line_limit_with_prefix():
+    f"""long docstring..............................................................."""
+
+
+def multiline_docstring_at_line_limit():
+    """first line-----------------------------------------------------------------------
+
+    second line----------------------------------------------------------------------"""
+
+
+def multiline_docstring_at_line_limit_with_prefix():
+    f"""first line----------------------------------------------------------------------
+
+    second line----------------------------------------------------------------------"""
+
+
+# output
+
+
+def docstring_almost_at_line_limit():
+    """long docstring.................................................................
+    """
+
+
+def docstring_almost_at_line_limit_with_prefix():
+    f"""long docstring................................................................
+    """
+
+
+def mulitline_docstring_almost_at_line_limit():
+    """long docstring.................................................................
+
+    ..................................................................................
+    """
+
+
+def mulitline_docstring_almost_at_line_limit_with_prefix():
+    f"""long docstring................................................................
+
+    ..................................................................................
+    """
+
+
+def docstring_at_line_limit():
+    """long docstring................................................................"""
+
+
+def docstring_at_line_limit_with_prefix():
+    f"""long docstring..............................................................."""
+
+
+def multiline_docstring_at_line_limit():
+    """first line-----------------------------------------------------------------------
+
+    second line----------------------------------------------------------------------"""
+
+
+def multiline_docstring_at_line_limit_with_prefix():
+    f"""first line----------------------------------------------------------------------
+
+    second line----------------------------------------------------------------------"""
diff -pruN 22.3.0-1/tests/data/preview/long_strings__edge_case.py 22.6.0-1/tests/data/preview/long_strings__edge_case.py
--- 22.3.0-1/tests/data/preview/long_strings__edge_case.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/long_strings__edge_case.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,140 @@
+some_variable = "This string is long but not so long that it needs to be split just yet"
+some_variable = 'This string is long but not so long that it needs to be split just yet'
+some_variable = "This string is long, just long enough that it needs to be split, u get?"
+some_variable = 'This string is long, just long enough that it needs to be split, u get?'
+some_variable = "This string is long, just long enough that it needs to be split, u get? So we stay"
+some_variable = 'This string is long, just long enough that it needs to be split, u get? So we stay'
+some_variable = "This string is long, just long enough that it needs to be split, u get? So we split"
+some_variable = 'This string is long, just long enough that it needs to be split, u get? So we split'
+some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at alll".format("ha")
+some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at allll".format("ha")
+some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at alllllllllll".format("ha")
+some_variable = "This string is long but not so long that it needs hahahah toooooo be so greatttt {} that I just can't think of any more good words to say about it at allllllllllll".format("ha")
+some_variable = "This is a long string that will end with a method that is not calleddd".format
+addition_inside_tuple = (
+    some_string_inside_a_variable
+    + "Some string that is just long enough to cause a split to take place.............",
+    xyz,
+    "Some really long string that needs to get split eventually but I'm running out of things to say" + some_string_inside_a_variable
+)
+addition_inside_tuple = (
+    some_string_inside_a_variable
+    + "Some string that is just long enough to cause a split to take place.............."
+)
+return "Hi there. This is areally really reallllly long string that needs to be split!!!"
+ternary_expression = (
+    "Short String"
+    if some_condition
+    else "This is a really long string that will eventually need to be split right here."
+)
+return f'{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaa'
+return f'{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaaa'
+assert str(result) == "This long string should be split at some point right close to or around hereeeeeee"
+assert str(result) < "This long string should be split at some point right close to or around hereeeeee"
+assert "A format string: %s" % "This long string should be split at some point right close to or around hereeeeeee" != result
+msg += "This long string should be wrapped in parens at some point right around hereeeee"
+msg += "This long string should be split at some point right close to or around hereeeeeeee"
+msg += "This long string should not be split at any point ever since it is just righttt"
+
+
+# output
+
+
+some_variable = "This string is long but not so long that it needs to be split just yet"
+some_variable = "This string is long but not so long that it needs to be split just yet"
+some_variable = (
+    "This string is long, just long enough that it needs to be split, u get?"
+)
+some_variable = (
+    "This string is long, just long enough that it needs to be split, u get?"
+)
+some_variable = (
+    "This string is long, just long enough that it needs to be split, u get? So we stay"
+)
+some_variable = (
+    "This string is long, just long enough that it needs to be split, u get? So we stay"
+)
+some_variable = (
+    "This string is long, just long enough that it needs to be split, u get? So we"
+    " split"
+)
+some_variable = (
+    "This string is long, just long enough that it needs to be split, u get? So we"
+    " split"
+)
+some_variable = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
+    " {} that I just can't think of any more good words to say about it at alll".format(
+        "ha"
+    )
+)
+some_variable = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
+    " {} that I just can't think of any more good words to say about it at allll"
+    .format("ha")
+)
+some_variable = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
+    " {} that I just can't think of any more good words to say about it at alllllllllll"
+    .format("ha")
+)
+some_variable = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
+    " {} that I just can't think of any more good words to say about it at"
+    " allllllllllll".format("ha")
+)
+some_variable = (
+    "This is a long string that will end with a method that is not calleddd".format
+)
+addition_inside_tuple = (
+    some_string_inside_a_variable
+    + "Some string that is just long enough to cause a split to take"
+    " place.............",
+    xyz,
+    "Some really long string that needs to get split eventually but I'm running out of"
+    " things to say"
+    + some_string_inside_a_variable,
+)
+addition_inside_tuple = (
+    some_string_inside_a_variable
+    + "Some string that is just long enough to cause a split to take"
+    " place.............."
+)
+return (
+    "Hi there. This is areally really reallllly long string that needs to be split!!!"
+)
+ternary_expression = (
+    "Short String"
+    if some_condition
+    else (
+        "This is a really long string that will eventually need to be split right here."
+    )
+)
+return (
+    f"{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaa"
+)
+return f"{x}/b/c/d/d/d/dadfjsadjsaidoaisjdsfjaofjdfijaidfjaodfjaoifjodjafojdoajaaaaaaaaaaaa"
+assert (
+    str(result)
+    == "This long string should be split at some point right close to or around"
+    " hereeeeeee"
+)
+assert (
+    str(result)
+    < "This long string should be split at some point right close to or around"
+    " hereeeeee"
+)
+assert (
+    "A format string: %s"
+    % "This long string should be split at some point right close to or around"
+    " hereeeeeee"
+    != result
+)
+msg += (
+    "This long string should be wrapped in parens at some point right around hereeeee"
+)
+msg += (
+    "This long string should be split at some point right close to or around"
+    " hereeeeeeee"
+)
+msg += "This long string should not be split at any point ever since it is just righttt"
diff -pruN 22.3.0-1/tests/data/preview/long_strings.py 22.6.0-1/tests/data/preview/long_strings.py
--- 22.3.0-1/tests/data/preview/long_strings.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/long_strings.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,661 @@
+x = "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
+
+x += "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
+
+y = (
+    'Short string'
+)
+
+print('This is a really long string inside of a print statement with extra arguments attached at the end of it.', x, y, z)
+
+print("This is a really long string inside of a print statement with no extra arguments attached at the end of it.")
+
+D1 = {"The First": "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.", "The Second": "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary."}
+
+D2 = {1.0: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.", 2.0: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary."}
+
+D3 = {x: "This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.", y: "This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary."}
+
+D4 = {"A long and ridiculous {}".format(string_key): "This is a really really really long string that has to go i,side of a dictionary. It is soooo bad.", some_func("calling", "some", "stuff"): "This is a really really really long string that has to go inside of a dictionary. It is {soooo} bad (#{x}).".format(sooo="soooo", x=2), "A %s %s" % ("formatted", "string"): "This is a really really really long string that has to go inside of a dictionary. It is %s bad (#%d)." % ("soooo", 2)}
+
+func_with_keywords(my_arg, my_kwarg="Long keyword strings also need to be wrapped, but they will probably need to be handled a little bit differently.")
+
+bad_split1 = (
+    'But what should happen when code has already been formatted but in the wrong way? Like'
+    " with a space at the end instead of the beginning. Or what about when it is split too soon?"
+)
+
+bad_split2 = "But what should happen when code has already " \
+             "been formatted but in the wrong way? Like " \
+             "with a space at the end instead of the " \
+             "beginning. Or what about when it is split too " \
+             "soon? In the case of a split that is too " \
+             "short, black will try to honer the custom " \
+             "split."
+
+bad_split3 = (
+    "What if we have inline comments on "  # First Comment
+    "each line of a bad split? In that "  # Second Comment
+    "case, we should just leave it alone."  # Third Comment
+)
+
+bad_split_func1(
+    "But what should happen when code has already "
+    "been formatted but in the wrong way? Like "
+    "with a space at the end instead of the "
+    "beginning. Or what about when it is split too "
+    "soon? In the case of a split that is too "
+    "short, black will try to honer the custom "
+    "split.",
+    xxx, yyy, zzz
+)
+
+bad_split_func2(
+    xxx, yyy, zzz,
+    long_string_kwarg="But what should happen when code has already been formatted but in the wrong way? Like "
+                      "with a space at the end instead of the beginning. Or what about when it is split too "
+                      "soon?",
+)
+
+bad_split_func3(
+    (
+        "But what should happen when code has already "
+        r"been formatted but in the wrong way? Like "
+        "with a space at the end instead of the "
+        r"beginning. Or what about when it is split too "
+        r"soon? In the case of a split that is too "
+        "short, black will try to honer the custom "
+        "split."
+    ),
+    xxx,
+    yyy,
+    zzz,
+)
+
+raw_string = r"This is a long raw string. When re-formatting this string, black needs to make sure it prepends the 'r' onto the new string."
+
+fmt_string1 = "We also need to be sure to preserve any and all {} which may or may not be attached to the string in question.".format("method calls")
+
+fmt_string2 = "But what about when the string is {} but {}".format("short", "the method call is really really really really really really really really long?")
+
+old_fmt_string1 = "While we are on the topic of %s, we should also note that old-style formatting must also be preserved, since some %s still uses it." % ("formatting", "code")
+
+old_fmt_string2 = "This is a %s %s %s %s" % ("really really really really really", "old", "way to format strings!", "Use f-strings instead!")
+
+old_fmt_string3 = "Whereas only the strings after the percent sign were long in the last example, this example uses a long initial string as well. This is another %s %s %s %s" % ("really really really really really", "old", "way to format strings!", "Use f-strings instead!")
+
+fstring = f"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
+
+fstring_with_no_fexprs = f"Some regular string that needs to get split certainly but is NOT an fstring by any means whatsoever."
+
+comment_string = "Long lines with inline comments should have their comments appended to the reformatted string's enclosing right parentheses."  # This comment gets thrown to the top.
+
+arg_comment_string = print("Long lines with inline comments which are apart of (and not the only member of) an argument list should have their comments appended to the reformatted string's enclosing left parentheses.",  # This comment stays on the bottom.
+    "Arg #2", "Arg #3", "Arg #4", "Arg #5")
+
+pragma_comment_string1 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa: E501
+
+pragma_comment_string2 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa
+
+"""This is a really really really long triple quote string and it should not be touched."""
+
+triple_quote_string = """This is a really really really long triple quote string assignment and it should not be touched."""
+
+assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception."
+
+assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string {}.".format("formatting")
+
+assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic string %s." % "formatting"
+
+assert some_type_of_boolean_expression, "Followed by a really really really long string that is used to provide context to the AssertionError exception, which uses dynamic %s %s." % ("string", "formatting")
+
+some_function_call("With a reallly generic name and with a really really long string that is, at some point down the line, " + added + " to a variable and then added to another string.")
+
+some_function_call("With a reallly generic name and with a really really long string that is, at some point down the line, " + added + " to a variable and then added to another string. But then what happens when the final string is also supppppperrrrr long?! Well then that second (realllllllly long) string should be split too.", "and a second argument", and_a_third)
+
+return "A really really really really really really really really really really really really really long {} {}".format("return", "value")
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma which should NOT be there.",
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma which should NOT be there.", # comment after comma
+)
+
+func_with_bad_comma(
+    (
+        "This is a really long string argument to a function that has a trailing comma"
+        " which should NOT be there."
+    ),
+)
+
+func_with_bad_comma(
+    (
+        "This is a really long string argument to a function that has a trailing comma"
+        " which should NOT be there."
+    ), # comment after comma
+)
+
+func_with_bad_parens_that_wont_fit_in_one_line(
+    ("short string that should have parens stripped"),
+    x,
+    y,
+    z
+)
+
+func_with_bad_parens_that_wont_fit_in_one_line(
+    x,
+    y,
+    ("short string that should have parens stripped"),
+    z
+)
+
+func_with_bad_parens(
+    ("short string that should have parens stripped"),
+    x,
+    y,
+    z,
+)
+
+func_with_bad_parens(
+    x,
+    y,
+    ("short string that should have parens stripped"),
+    z,
+)
+
+annotated_variable: Final = "This is a large " + STRING + " that has been " + CONCATENATED + "using the '+' operator."
+annotated_variable: Final = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
+annotated_variable: Literal["fakse_literal"] = "This is a large string that has a type annotation attached to it. A type annotation should NOT stop a long string from being wrapped."
+
+backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\"
+backslashes = "This is a really long string with \"embedded\" double quotes and 'single' quotes that also handles checking for an even number of backslashes \\\\"
+backslashes = "This is a really 'long' string with \"embedded double quotes\" and 'single' quotes that also handles checking for an odd number of backslashes \\\", like this...\\\\\\"
+
+short_string = (
+    "Hi"
+    " there."
+)
+
+func_call(
+    short_string=(
+        "Hi"
+        " there."
+    )
+)
+
+raw_strings = r"Don't" " get" r" merged" " unless they are all raw."
+
+def foo():
+    yield "This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three."
+
+x = f"This is a {{really}} long string that needs to be split without a doubt (i.e. most definitely). In short, this {string} that can't possibly be {{expected}} to fit all together on one line. In {fact} it may even take up three or more lines... like four or five... but probably just four."
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # type: ignore
+    " of it."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # noqa
+    " of it."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # pylint: disable=some-pylint-check
+    " of it."
+)
+
+string_with_nameescape = (
+    "........................................................................ \N{LAO KO LA}"
+)
+
+string_with_nameescape = (
+    "........................................................................... \N{LAO KO LA}"
+)
+
+string_with_nameescape = (
+    "............................................................................ \N{LAO KO LA}"
+)
+
+string_with_nameescape_and_escaped_backslash = (
+    "...................................................................... \\\N{LAO KO LA}"
+)
+
+string_with_nameescape_and_escaped_backslash = (
+    "......................................................................... \\\N{LAO KO LA}"
+)
+
+string_with_nameescape_and_escaped_backslash = (
+    ".......................................................................... \\\N{LAO KO LA}"
+)
+
+string_with_escaped_nameescape = (
+    "........................................................................ \\N{LAO KO LA}"
+)
+
+string_with_escaped_nameescape = (
+    "........................................................................... \\N{LAO KO LA}"
+)
+
+
+# output
+
+
+x = (
+    "This is a really long string that can't possibly be expected to fit all together"
+    " on one line. In fact it may even take up three or more lines... like four or"
+    " five... but probably just three."
+)
+
+x += (
+    "This is a really long string that can't possibly be expected to fit all together"
+    " on one line. In fact it may even take up three or more lines... like four or"
+    " five... but probably just three."
+)
+
+y = "Short string"
+
+print(
+    "This is a really long string inside of a print statement with extra arguments"
+    " attached at the end of it.",
+    x,
+    y,
+    z,
+)
+
+print(
+    "This is a really long string inside of a print statement with no extra arguments"
+    " attached at the end of it."
+)
+
+D1 = {
+    "The First": (
+        "This is a really long string that can't possibly be expected to fit all"
+        " together on one line. Also it is inside a dictionary, so formatting is more"
+        " difficult."
+    ),
+    "The Second": (
+        "This is another really really (not really) long string that also can't be"
+        " expected to fit on one line and is, like the other string, inside a"
+        " dictionary."
+    ),
+}
+
+D2 = {
+    1.0: (
+        "This is a really long string that can't possibly be expected to fit all"
+        " together on one line. Also it is inside a dictionary, so formatting is more"
+        " difficult."
+    ),
+    2.0: (
+        "This is another really really (not really) long string that also can't be"
+        " expected to fit on one line and is, like the other string, inside a"
+        " dictionary."
+    ),
+}
+
+D3 = {
+    x: (
+        "This is a really long string that can't possibly be expected to fit all"
+        " together on one line. Also it is inside a dictionary, so formatting is more"
+        " difficult."
+    ),
+    y: (
+        "This is another really really (not really) long string that also can't be"
+        " expected to fit on one line and is, like the other string, inside a"
+        " dictionary."
+    ),
+}
+
+D4 = {
+    "A long and ridiculous {}".format(string_key): (
+        "This is a really really really long string that has to go i,side of a"
+        " dictionary. It is soooo bad."
+    ),
+    some_func("calling", "some", "stuff"): (
+        "This is a really really really long string that has to go inside of a"
+        " dictionary. It is {soooo} bad (#{x}).".format(sooo="soooo", x=2)
+    ),
+    "A %s %s"
+    % ("formatted", "string"): (
+        "This is a really really really long string that has to go inside of a"
+        " dictionary. It is %s bad (#%d)."
+    )
+    % ("soooo", 2),
+}
+
+func_with_keywords(
+    my_arg,
+    my_kwarg=(
+        "Long keyword strings also need to be wrapped, but they will probably need to"
+        " be handled a little bit differently."
+    ),
+)
+
+bad_split1 = (
+    "But what should happen when code has already been formatted but in the wrong way?"
+    " Like with a space at the end instead of the beginning. Or what about when it is"
+    " split too soon?"
+)
+
+bad_split2 = (
+    "But what should happen when code has already "
+    "been formatted but in the wrong way? Like "
+    "with a space at the end instead of the "
+    "beginning. Or what about when it is split too "
+    "soon? In the case of a split that is too "
+    "short, black will try to honer the custom "
+    "split."
+)
+
+bad_split3 = (
+    "What if we have inline comments on "  # First Comment
+    "each line of a bad split? In that "  # Second Comment
+    "case, we should just leave it alone."  # Third Comment
+)
+
+bad_split_func1(
+    "But what should happen when code has already "
+    "been formatted but in the wrong way? Like "
+    "with a space at the end instead of the "
+    "beginning. Or what about when it is split too "
+    "soon? In the case of a split that is too "
+    "short, black will try to honer the custom "
+    "split.",
+    xxx,
+    yyy,
+    zzz,
+)
+
+bad_split_func2(
+    xxx,
+    yyy,
+    zzz,
+    long_string_kwarg=(
+        "But what should happen when code has already been formatted but in the wrong"
+        " way? Like with a space at the end instead of the beginning. Or what about"
+        " when it is split too soon?"
+    ),
+)
+
+bad_split_func3(
+    (
+        "But what should happen when code has already "
+        r"been formatted but in the wrong way? Like "
+        "with a space at the end instead of the "
+        r"beginning. Or what about when it is split too "
+        r"soon? In the case of a split that is too "
+        "short, black will try to honer the custom "
+        "split."
+    ),
+    xxx,
+    yyy,
+    zzz,
+)
+
+raw_string = (
+    r"This is a long raw string. When re-formatting this string, black needs to make"
+    r" sure it prepends the 'r' onto the new string."
+)
+
+fmt_string1 = (
+    "We also need to be sure to preserve any and all {} which may or may not be"
+    " attached to the string in question.".format("method calls")
+)
+
+fmt_string2 = "But what about when the string is {} but {}".format(
+    "short",
+    "the method call is really really really really really really really really long?",
+)
+
+old_fmt_string1 = (
+    "While we are on the topic of %s, we should also note that old-style formatting"
+    " must also be preserved, since some %s still uses it." % ("formatting", "code")
+)
+
+old_fmt_string2 = "This is a %s %s %s %s" % (
+    "really really really really really",
+    "old",
+    "way to format strings!",
+    "Use f-strings instead!",
+)
+
+old_fmt_string3 = (
+    "Whereas only the strings after the percent sign were long in the last example,"
+    " this example uses a long initial string as well. This is another %s %s %s %s"
+    % (
+        "really really really really really",
+        "old",
+        "way to format strings!",
+        "Use f-strings instead!",
+    )
+)
+
+fstring = (
+    f"f-strings definitely make things more {difficult} than they need to be for"
+    " {black}. But boy they sure are handy. The problem is that some lines will need"
+    f" to have the 'f' whereas others do not. This {line}, for example, needs one."
+)
+
+fstring_with_no_fexprs = (
+    f"Some regular string that needs to get split certainly but is NOT an fstring by"
+    f" any means whatsoever."
+)
+
+comment_string = (  # This comment gets thrown to the top.
+    "Long lines with inline comments should have their comments appended to the"
+    " reformatted string's enclosing right parentheses."
+)
+
+arg_comment_string = print(
+    "Long lines with inline comments which are apart of (and not the only member of) an"
+    " argument list should have their comments appended to the reformatted string's"
+    " enclosing left parentheses.",  # This comment stays on the bottom.
+    "Arg #2",
+    "Arg #3",
+    "Arg #4",
+    "Arg #5",
+)
+
+pragma_comment_string1 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa: E501
+
+pragma_comment_string2 = "Lines which end with an inline pragma comment of the form `# <pragma>: <...>` should be left alone."  # noqa
+
+"""This is a really really really long triple quote string and it should not be touched."""
+
+triple_quote_string = """This is a really really really long triple quote string assignment and it should not be touched."""
+
+assert some_type_of_boolean_expression, (
+    "Followed by a really really really long string that is used to provide context to"
+    " the AssertionError exception."
+)
+
+assert some_type_of_boolean_expression, (
+    "Followed by a really really really long string that is used to provide context to"
+    " the AssertionError exception, which uses dynamic string {}.".format("formatting")
+)
+
+assert some_type_of_boolean_expression, (
+    "Followed by a really really really long string that is used to provide context to"
+    " the AssertionError exception, which uses dynamic string %s." % "formatting"
+)
+
+assert some_type_of_boolean_expression, (
+    "Followed by a really really really long string that is used to provide context to"
+    " the AssertionError exception, which uses dynamic %s %s."
+    % ("string", "formatting")
+)
+
+some_function_call(
+    "With a reallly generic name and with a really really long string that is, at some"
+    " point down the line, "
+    + added
+    + " to a variable and then added to another string."
+)
+
+some_function_call(
+    "With a reallly generic name and with a really really long string that is, at some"
+    " point down the line, "
+    + added
+    + " to a variable and then added to another string. But then what happens when the"
+    " final string is also supppppperrrrr long?! Well then that second (realllllllly"
+    " long) string should be split too.",
+    "and a second argument",
+    and_a_third,
+)
+
+return (
+    "A really really really really really really really really really really really"
+    " really really long {} {}".format("return", "value")
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma"
+    " which should NOT be there.",
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma"
+    " which should NOT be there.",  # comment after comma
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma"
+    " which should NOT be there.",
+)
+
+func_with_bad_comma(
+    "This is a really long string argument to a function that has a trailing comma"
+    " which should NOT be there.",  # comment after comma
+)
+
+func_with_bad_parens_that_wont_fit_in_one_line(
+    "short string that should have parens stripped", x, y, z
+)
+
+func_with_bad_parens_that_wont_fit_in_one_line(
+    x, y, "short string that should have parens stripped", z
+)
+
+func_with_bad_parens(
+    "short string that should have parens stripped",
+    x,
+    y,
+    z,
+)
+
+func_with_bad_parens(
+    x,
+    y,
+    "short string that should have parens stripped",
+    z,
+)
+
+annotated_variable: Final = (
+    "This is a large "
+    + STRING
+    + " that has been "
+    + CONCATENATED
+    + "using the '+' operator."
+)
+annotated_variable: Final = (
+    "This is a large string that has a type annotation attached to it. A type"
+    " annotation should NOT stop a long string from being wrapped."
+)
+annotated_variable: Literal["fakse_literal"] = (
+    "This is a large string that has a type annotation attached to it. A type"
+    " annotation should NOT stop a long string from being wrapped."
+)
+
+backslashes = (
+    "This is a really long string with \"embedded\" double quotes and 'single' quotes"
+    " that also handles checking for an even number of backslashes \\"
+)
+backslashes = (
+    "This is a really long string with \"embedded\" double quotes and 'single' quotes"
+    " that also handles checking for an even number of backslashes \\\\"
+)
+backslashes = (
+    "This is a really 'long' string with \"embedded double quotes\" and 'single' quotes"
+    ' that also handles checking for an odd number of backslashes \\", like'
+    " this...\\\\\\"
+)
+
+short_string = "Hi there."
+
+func_call(short_string="Hi there.")
+
+raw_strings = r"Don't" " get" r" merged" " unless they are all raw."
+
+
+def foo():
+    yield (
+        "This is a really long string that can't possibly be expected to fit all"
+        " together on one line. In fact it may even take up three or more lines... like"
+        " four or five... but probably just three."
+    )
+
+
+x = (
+    "This is a {really} long string that needs to be split without a doubt (i.e."
+    f" most definitely). In short, this {string} that can't possibly be {{expected}} to"
+    f" fit all together on one line. In {fact} it may even take up three or more"
+    " lines... like four or five... but probably just four."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # type: ignore
+    " of it."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # noqa
+    " of it."
+)
+
+long_unmergable_string_with_pragma = (
+    "This is a really long string that can't be merged because it has a likely pragma at the end"  # pylint: disable=some-pylint-check
+    " of it."
+)
+
+string_with_nameescape = (
+    "........................................................................"
+    " \N{LAO KO LA}"
+)
+
+string_with_nameescape = (
+    "..........................................................................."
+    " \N{LAO KO LA}"
+)
+
+string_with_nameescape = (
+    "............................................................................"
+    " \N{LAO KO LA}"
+)
+
+string_with_nameescape_and_escaped_backslash = (
+    "......................................................................"
+    " \\\N{LAO KO LA}"
+)
+
+string_with_nameescape_and_escaped_backslash = (
+    "........................................................................."
+    " \\\N{LAO KO LA}"
+)
+
+string_with_nameescape_and_escaped_backslash = (
+    ".........................................................................."
+    " \\\N{LAO KO LA}"
+)
+
+string_with_escaped_nameescape = (
+    "........................................................................ \\N{LAO"
+    " KO LA}"
+)
+
+string_with_escaped_nameescape = (
+    "..........................................................................."
+    " \\N{LAO KO LA}"
+)
diff -pruN 22.3.0-1/tests/data/preview/long_strings__regression.py 22.6.0-1/tests/data/preview/long_strings__regression.py
--- 22.3.0-1/tests/data/preview/long_strings__regression.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/long_strings__regression.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,1166 @@
+class A:
+    def foo():
+        result = type(message)("")
+
+
+# Don't merge multiline (e.g. triple-quoted) strings.
+def foo():
+    query = (
+        """SELECT xxxxxxxxxxxxxxxxxxxx(xxx)"""
+        """ FROM xxxxxxxxxxxxxxxx WHERE xxxxxxxxxx AND xxx <> xxxxxxxxxxxxxx()""")
+
+# There was a bug where tuples were being identified as long strings.
+long_tuple = ('Apple', 'Berry', 'Cherry', 'Dill', 'Evergreen', 'Fig',
+           'Grape', 'Harry', 'Iglu', 'Jaguar')
+
+stupid_format_method_bug = "Some really long string that just so happens to be the {} {} to force the 'format' method to hang over the line length boundary. This is pretty annoying.".format("perfect", "length")
+
+class A:
+    def foo():
+        os.system("This is a regression test. xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx.".format("xxxxxxxxxx", "xxxxxx", "xxxxxxxxxx"))
+
+
+class A:
+    def foo():
+        XXXXXXXXXXXX.append(
+            (
+                "xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx, xxxx_xxxx_xxxxxxxxxx={})".format(
+                    xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx
+                ),
+                my_var,
+                my_other_var,
+            )
+        )
+
+class A:
+    class B:
+        def foo():
+            bar(
+                (
+                    "[{}]: xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx={}"
+                    " xxxx_xxxx_xxxxxxxxxx={}, xxxx={})"
+                    .format(xxxx._xxxxxxxxxxxxxx, xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx, xxxxxxx)
+                ),
+                varX,
+                varY,
+                varZ,
+            )
+
+def foo(xxxx):
+    for (xxx_xxxx, _xxx_xxx, _xxx_xxxxx, xxx_xxxx) in xxxx:
+        for xxx in xxx_xxxx:
+            assert ("x" in xxx) or (
+                xxx in xxx_xxx_xxxxx
+            ), "{0} xxxxxxx xx {1}, xxx {1} xx xxx xx xxxx xx xxx xxxx: xxx xxxx {2}".format(
+                xxx_xxxx, xxx, xxxxxx.xxxxxxx(xxx_xxx_xxxxx)
+            )
+
+class A:
+    def disappearing_comment():
+        return (
+            (  # xx -x xxxxxxx xx xxx xxxxxxx.
+                '{{xxx_xxxxxxxxxx_xxxxxxxx}} xxx xxxx'
+                ' {} {{xxxx}} >&2'
+                .format(
+                    "{xxxx} {xxxxxx}"
+                    if xxxxx.xx_xxxxxxxxxx
+                    else ( # Disappearing Comment
+                        "--xxxxxxx --xxxxxx=x --xxxxxx-xxxxx=xxxxxx"
+                        " --xxxxxx-xxxx=xxxxxxxxxxx.xxx"
+                    )
+                )
+            ),
+            (x, y, z),
+        )
+
+class A:
+    class B:
+        def foo():
+            xxxxx_xxxx(
+                xx, "\t"
+                "@xxxxxx '{xxxx_xxx}\t' > {xxxxxx_xxxx}.xxxxxxx;"
+                "{xxxx_xxx} >> {xxxxxx_xxxx}.xxxxxxx 2>&1; xx=$$?;"
+                "xxxx $$xx"
+                .format(xxxx_xxx=xxxx_xxxxxxx, xxxxxx_xxxx=xxxxxxx + "/" + xxxx_xxx_xxxx, x=xxx_xxxxx_xxxxx_xxx),
+                x,
+                y,
+                z,
+            )
+
+func_call_where_string_arg_has_method_call_and_bad_parens(
+    (
+        "A long string with {}. This string is so long that it is ridiculous. It can't fit on one line at alllll.".format("formatting")
+    ),
+)
+
+func_call_where_string_arg_has_old_fmt_and_bad_parens(
+    (
+        "A long string with {}. This string is so long that it is ridiculous. It can't fit on one line at alllll." % "formatting"
+    ),
+)
+
+func_call_where_string_arg_has_old_fmt_and_bad_parens(
+    (
+        "A long string with {}. This {} is so long that it is ridiculous. It can't fit on one line at alllll." % ("formatting", "string")
+    ),
+)
+
+class A:
+    def append(self):
+        if True:
+            xxxx.xxxxxxx.xxxxx( ('xxxxxxxxxx xxxx xx xxxxxx(%x) xx %x xxxx xx xxx %x.xx'
+                                 % (len(self) + 1,
+                                    xxxx.xxxxxxxxxx,
+                                    xxxx.xxxxxxxxxx))
+                                + (' %.3f (%s) to %.3f (%s).\n'
+                                   % (xxxx.xxxxxxxxx,
+                                      xxxx.xxxxxxxxxxxxxx(xxxx.xxxxxxxxx),
+                                      x,
+                                      xxxx.xxxxxxxxxxxxxx( xx)
+                                      )))
+
+class A:
+    def foo():
+        some_func_call(
+            'xxxxxxxxxx',
+            (
+                "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
+                "\"xxxx xxxxxxx xxxxxx xxxx; xxxx xxxxxx_xxxxx xxxxxx xxxx; "
+                "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" "
+            ),
+            None,
+            ('xxxxxxxxxxx',),
+        ),
+
+class A:
+    def foo():
+        some_func_call(
+            (
+                "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
+                "xxxx, ('xxxxxxx xxxxxx xxxx, xxxx') xxxxxx_xxxxx xxxxxx xxxx; "
+                "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" "
+            ),
+            None,
+            ('xxxxxxxxxxx',),
+        ),
+
+xxxxxxx = { 'xx' : 'xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} \
+-xx {1} -xx xxx=xxx_xxxx,xxx_xx,xxx_xxx,xxx_xxxx,xxx_xx,xxx_xxx |\
+ xxxxxx -x xxxxxxxx -x xxxxxxxx -x',
+         'xx' : 'xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} \
+-xx {1} -xx xxx=xxx_xxxx_xxx_xxxx,xxx_xx_xxx_xxxx,xxx_xxxx_xxx_xxxx,\
+xxx_xx_xxxx_xxxx,xxx_xxx_xxxx,xxx_xxx_xxxx xxxx=xxx | xxxxxx -x xxxxxxxx -x xxxxxxxx -x'
+}
+
+class A:
+    def foo(self):
+        if True:
+            xxxxx_xxxxxxxxxxxx('xxx xxxxxx xxx xxxxxxxxx.xx xx xxxxxxxx.  xxx xxxxxxxxxxxxx.xx xxxxxxx '
+                               + 'xx xxxxxx xxxxxx xxxxxx xx xxxxxxx xxx xxx ${0} xx x xxxxxxxx xxxxx'.xxxxxx(xxxxxx_xxxxxx_xxx))
+
+class A:
+    class B:
+        def foo():
+            row = {
+                'xxxxxxxxxxxxxxx' : xxxxxx_xxxxx_xxxx,
+                # 'xxxxxxxxxxxxxxxxxxxxxxx'
+                # 'xxxxxxxxxxxxxxxxxxxxxx'
+                # 'xxxxxxxxxxxxxxxxxx'
+                # 'xxxxxxxxxxxxxxxxx'
+                'xxxxxxxxxx' : xxxxx_xxxxx,
+                }
+
+class A:
+    def xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx(xxxx):
+        xxxxxxxx = [
+            xxxxxxxxxxxxxxxx(
+                'xxxx',
+                xxxxxxxxxxx={
+                    'xxxx' : 1.0,
+                },
+                xxxxxx={'xxxxxx 1' : xxxxxx(xxxx='xxxxxx 1', xxxxxx=600.0)},
+                xxxxxxxx_xxxxxxx=0.0,
+            ),
+            xxxxxxxxxxxxxxxx(
+                'xxxxxxx',
+                xxxxxxxxxxx={
+                    'xxxx' : 1.0,
+                },
+                xxxxxx={'xxxxxx 1' : xxxxxx(xxxx='xxxxxx 1', xxxxxx=200.0)},
+                xxxxxxxx_xxxxxxx=0.0,
+            ),
+            xxxxxxxxxxxxxxxx(
+                'xxxx',
+            ),
+        ]
+
+some_dictionary = {
+    'xxxxx006': ['xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx== xxxxx000 xxxxxxxxxx\n',
+                 'xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx== xxxxx010 xxxxxxxxxx\n'],
+    'xxxxx016': ['xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx== xxxxx000 xxxxxxxxxx\n',
+                 'xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx== xxxxx010 xxxxxxxxxx\n']
+}
+
+def foo():
+    xxx_xxx = (
+        'xxxx xxx xxxxxxxx_xxxx xx "xxxxxxxxxx".'
+        '\n xxx: xxxxxx xxxxxxxx_xxxx=xxxxxxxxxx'
+    ) # xxxx xxxxxxxxxx xxxx xx xxxx xx xxx xxxxxxxx xxxxxx xxxxx.
+
+some_tuple = ("some string", "some string" " which should be joined")
+
+some_commented_string = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"  # This comment gets thrown to the top.
+    " {} that I just can't think of any more good words to say about it at"
+    " allllllllllll".format("ha")  # comments here are fine
+)
+
+some_commented_string = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"  # But these
+    " {} that I just can't think of any more good words to say about it at"  # comments will stay
+    " allllllllllll".format("ha")  # comments here are fine
+)
+
+lpar_and_rpar_have_comments = func_call(  # LPAR Comment
+    "Long really ridiculous type of string that shouldn't really even exist at all. I mean commmme onnn!!!",  # Comma Comment
+)  # RPAR Comment
+
+cmd_fstring = (
+    f"sudo -E deluge-console info --detailed --sort-reverse=time_added "
+    f"{'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
+)
+
+cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
+
+cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {'{{}}' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
+
+cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {{'' if ID is None else ID}} | perl -nE 'print if /^{field}:/'"
+
+fstring = f"This string really doesn't need to be an {{{{fstring}}}}, but this one most certainly, absolutely {does}."
+
+fstring = (
+    f"We have to remember to escape {braces}."
+    " Like {these}."
+    f" But not {this}."
+)
+
+class A:
+    class B:
+        def foo():
+            st_error = STError(
+                f"This string ({string_leaf.value}) appears to be pointless (i.e. has"
+                " no parent)."
+            )
+
+def foo():
+    user_regex = _lazy_re_compile(
+        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z"  # dot-atom
+        r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"\Z)',  # quoted-string
+        re.IGNORECASE)
+
+def foo():
+    user_regex = _lazy_re_compile(
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
+        'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',  # quoted-string
+        xyz
+    )
+
+def foo():
+    user_regex = _lazy_re_compile(
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
+        'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',  # quoted-string
+        xyz
+    )
+
+class A:
+    class B:
+        def foo():
+            if not hasattr(module, name):
+                raise ValueError(
+                    "Could not find object %s in %s.\n"
+                    "Please note that you cannot serialize things like inner "
+                    "classes. Please move the object into the main module "
+                    "body to use migrations.\n"
+                    "For more information, see "
+                    "https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
+                    % (name, module_name, get_docs_version()))
+
+class A:
+    class B:
+        def foo():
+            if not hasattr(module, name):
+                raise ValueError(
+                    "Could not find object %s in %s.\nPlease note that you cannot serialize things like inner classes. Please move the object into the main module body to use migrations.\nFor more information, see https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
+                    % (name, module_name, get_docs_version()))
+
+x = (
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+)
+
+class Step(StepBase):
+    def who(self):
+        self.cmd = 'SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name} {title}/P{passenger_association}'.format(
+            last_name=last_name,
+            first_name=first_name,
+            middle_name=middle_name,
+            title=title,
+            passenger_association=passenger_association,
+        )
+
+xxxxxxx_xxxxxx_xxxxxxx = xxx(
+    [
+        xxxxxxxxxxxx(
+            xxxxxx_xxxxxxx=(
+                '((x.aaaaaaaaa = "xxxxxx.xxxxxxxxxxxxxxxxxxxxx") || (x.xxxxxxxxx = "xxxxxxxxxxxx")) && '
+                # xxxxx xxxxxxxxxxxx xxxx xxx (xxxxxxxxxxxxxxxx) xx x xxxxxxxxx xx xxxxxx.
+                "(x.bbbbbbbbbbbb.xxx != "
+                '"xxx:xxx:xxx::cccccccccccc:xxxxxxx-xxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxx") && '
+            )
+        )
+    ]
+)
+
+if __name__ == "__main__":
+    for i in range(4, 8):
+        cmd = (
+            r"for pid in $(ps aux | grep paster | grep -v grep | grep '\-%d' | awk '{print $2}'); do kill $pid; done"
+            % (i)
+        )
+
+def A():
+    def B():
+        def C():
+            def D():
+                def E():
+                    def F():
+                        def G():
+                            assert (
+                                c_float(val[0][0] / val[0][1]).value
+                                == c_float(value[0][0] / value[0][1]).value
+                            ), "%s didn't roundtrip" % tag
+
+class xxxxxxxxxxxxxxxxxxxxx(xxxx.xxxxxxxxxxxxx):
+    def xxxxxxx_xxxxxx(xxxx):
+        assert xxxxxxx_xxxx in [
+            x.xxxxx.xxxxxx.xxxxx.xxxxxx,
+            x.xxxxx.xxxxxx.xxxxx.xxxx,
+        ], ("xxxxxxxxxxx xxxxxxx xxxx (xxxxxx xxxx) %x xxx xxxxx" % xxxxxxx_xxxx)
+
+value.__dict__[
+    key
+] = "test"  # set some Thrift field to non-None in the struct aa bb cc dd ee
+
+RE_ONE_BACKSLASH = {
+    "asdf_hjkl_jkl": re.compile(
+        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
+    ),
+}
+
+RE_TWO_BACKSLASHES = {
+    "asdf_hjkl_jkl": re.compile(
+        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
+    ),
+}
+
+RE_THREE_BACKSLASHES = {
+    "asdf_hjkl_jkl": re.compile(
+        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
+    ),
+}
+
+# We do NOT split on f-string expressions.
+print(f"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam. {[f'{i}' for i in range(10)]}")
+x = f"This is a long string which contains an f-expr that should not split {{{[i for i in range(5)]}}}."
+
+# The parens should NOT be removed in this case.
+(
+    "my very long string that should get formatted if I'm careful to make sure it goes"
+    " over 88 characters which it has now"
+)
+
+# The parens should NOT be removed in this case.
+(
+    "my very long string that should get formatted if I'm careful to make sure it goes over 88 characters which"
+    " it has now"
+)
+
+# The parens should NOT be removed in this case.
+(
+    "my very long string"
+    " that should get formatted"
+    " if I'm careful to make sure"
+    " it goes over 88 characters which"
+    " it has now"
+)
+
+
+def _legacy_listen_examples():
+    text += (
+        "    \"listen for the '%(event_name)s' event\"\n"
+        "\n    # ... (event logic logic logic) ...\n"
+        % {
+            "since": since,
+        }
+    )
+
+
+class X:
+    async def foo(self):
+        msg = ""
+        for candidate in CANDIDATES:
+            msg += (
+                "**{candidate.object_type} {candidate.rev}**"
+                " - {candidate.description}\n"
+            )
+
+
+temp_msg = (
+    f"{f'{humanize_number(pos)}.': <{pound_len+2}} "
+    f"{balance: <{bal_len + 5}} "
+    f"<<{author.display_name}>>\n"
+)
+
+assert str(suffix_arr) == (
+    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert str(suffix_arr) != (
+    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert str(suffix_arr) <= (
+    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert str(suffix_arr) >= (
+    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert str(suffix_arr) < (
+    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert str(suffix_arr) > (
+    "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert str(suffix_arr) in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+assert str(suffix_arr) not in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+message = (
+    f"1. Go to Google Developers Console and log in with your Google account."
+    "(https://console.developers.google.com/)"
+    "2. You should be prompted to create a new project (name does not matter)."
+    "3. Click on Enable APIs and Services at the top."
+    "4. In the list of APIs choose or search for YouTube Data API v3 and "
+    "click on it. Choose Enable."
+    "5. Click on Credentials on the left navigation bar."
+    "6. Click on Create Credential at the top."
+    '7. At the top click the link for "API key".'
+    "8. No application restrictions are needed. Click Create at the bottom."
+    "9. You now have a key to add to `{prefix}set api youtube api_key`"
+)
+message = (
+    f"1. Go to Google Developers Console and log in with your Google account."
+    "(https://console.developers.google.com/)"
+    "2. You should be prompted to create a new project (name does not matter)."
+    f"3. Click on Enable APIs and Services at the top."
+    "4. In the list of APIs choose or search for YouTube Data API v3 and "
+    "click on it. Choose Enable."
+    f"5. Click on Credentials on the left navigation bar."
+    "6. Click on Create Credential at the top."
+    '7. At the top click the link for "API key".'
+    "8. No application restrictions are needed. Click Create at the bottom."
+    "9. You now have a key to add to `{prefix}set api youtube api_key`"
+)
+message = (
+    f"1. Go to Google Developers Console and log in with your Google account."
+    "(https://console.developers.google.com/)"
+    "2. You should be prompted to create a new project (name does not matter)."
+    f"3. Click on Enable APIs and Services at the top."
+    "4. In the list of APIs choose or search for YouTube Data API v3 and "
+    "click on it. Choose Enable."
+    f"5. Click on Credentials on the left navigation bar."
+    "6. Click on Create Credential at the top."
+    '7. At the top click the link for "API key".'
+    "8. No application restrictions are needed. Click Create at the bottom."
+    f"9. You now have a key to add to `{prefix}set api youtube api_key`"
+)
+
+# It shouldn't matter if the string prefixes are capitalized.
+temp_msg = (
+    F"{F'{humanize_number(pos)}.': <{pound_len+2}} "
+    F"{balance: <{bal_len + 5}} "
+    F"<<{author.display_name}>>\n"
+)
+
+fstring = (
+    F"We have to remember to escape {braces}."
+    " Like {these}."
+    F" But not {this}."
+)
+
+welcome_to_programming = R"hello," R" world!"
+
+fstring = F"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
+
+x = F"This is a long string which contains an f-expr that should not split {{{[i for i in range(5)]}}}."
+
+x = (
+    "\N{BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR}\N{VARIATION SELECTOR-16}"
+)
+
+xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
+    xx_xxxxxx={
+        "x3_xxxxxxxx": "xxx3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx_xxxxxxx",
+    },
+)
+
+
+# output
+
+
+class A:
+    def foo():
+        result = type(message)("")
+
+
+# Don't merge multiline (e.g. triple-quoted) strings.
+def foo():
+    query = (
+        """SELECT xxxxxxxxxxxxxxxxxxxx(xxx)"""
+        """ FROM xxxxxxxxxxxxxxxx WHERE xxxxxxxxxx AND xxx <> xxxxxxxxxxxxxx()"""
+    )
+
+
+# There was a bug where tuples were being identified as long strings.
+long_tuple = (
+    "Apple",
+    "Berry",
+    "Cherry",
+    "Dill",
+    "Evergreen",
+    "Fig",
+    "Grape",
+    "Harry",
+    "Iglu",
+    "Jaguar",
+)
+
+stupid_format_method_bug = (
+    "Some really long string that just so happens to be the {} {} to force the 'format'"
+    " method to hang over the line length boundary. This is pretty annoying.".format(
+        "perfect", "length"
+    )
+)
+
+
+class A:
+    def foo():
+        os.system(
+            "This is a regression test. xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx"
+            " xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx"
+            " xxxx.".format("xxxxxxxxxx", "xxxxxx", "xxxxxxxxxx")
+        )
+
+
+class A:
+    def foo():
+        XXXXXXXXXXXX.append(
+            (
+                "xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx, xxxx_xxxx_xxxxxxxxxx={})"
+                .format(xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx),
+                my_var,
+                my_other_var,
+            )
+        )
+
+
+class A:
+    class B:
+        def foo():
+            bar(
+                "[{}]: xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx={}"
+                " xxxx_xxxx_xxxxxxxxxx={}, xxxx={})".format(
+                    xxxx._xxxxxxxxxxxxxx, xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx, xxxxxxx
+                ),
+                varX,
+                varY,
+                varZ,
+            )
+
+
+def foo(xxxx):
+    for xxx_xxxx, _xxx_xxx, _xxx_xxxxx, xxx_xxxx in xxxx:
+        for xxx in xxx_xxxx:
+            assert ("x" in xxx) or (xxx in xxx_xxx_xxxxx), (
+                "{0} xxxxxxx xx {1}, xxx {1} xx xxx xx xxxx xx xxx xxxx: xxx xxxx {2}"
+                .format(xxx_xxxx, xxx, xxxxxx.xxxxxxx(xxx_xxx_xxxxx))
+            )
+
+
+class A:
+    def disappearing_comment():
+        return (
+            (  # xx -x xxxxxxx xx xxx xxxxxxx.
+                "{{xxx_xxxxxxxxxx_xxxxxxxx}} xxx xxxx {} {{xxxx}} >&2".format(
+                    "{xxxx} {xxxxxx}"
+                    if xxxxx.xx_xxxxxxxxxx
+                    else (  # Disappearing Comment
+                        "--xxxxxxx --xxxxxx=x --xxxxxx-xxxxx=xxxxxx"
+                        " --xxxxxx-xxxx=xxxxxxxxxxx.xxx"
+                    )
+                )
+            ),
+            (x, y, z),
+        )
+
+
+class A:
+    class B:
+        def foo():
+            xxxxx_xxxx(
+                xx,
+                "\t"
+                "@xxxxxx '{xxxx_xxx}\t' > {xxxxxx_xxxx}.xxxxxxx;"
+                "{xxxx_xxx} >> {xxxxxx_xxxx}.xxxxxxx 2>&1; xx=$$?;"
+                "xxxx $$xx".format(
+                    xxxx_xxx=xxxx_xxxxxxx,
+                    xxxxxx_xxxx=xxxxxxx + "/" + xxxx_xxx_xxxx,
+                    x=xxx_xxxxx_xxxxx_xxx,
+                ),
+                x,
+                y,
+                z,
+            )
+
+
+func_call_where_string_arg_has_method_call_and_bad_parens(
+    "A long string with {}. This string is so long that it is ridiculous. It can't fit"
+    " on one line at alllll.".format("formatting"),
+)
+
+func_call_where_string_arg_has_old_fmt_and_bad_parens(
+    "A long string with {}. This string is so long that it is ridiculous. It can't fit"
+    " on one line at alllll." % "formatting",
+)
+
+func_call_where_string_arg_has_old_fmt_and_bad_parens(
+    "A long string with {}. This {} is so long that it is ridiculous. It can't fit on"
+    " one line at alllll." % ("formatting", "string"),
+)
+
+
+class A:
+    def append(self):
+        if True:
+            xxxx.xxxxxxx.xxxxx(
+                "xxxxxxxxxx xxxx xx xxxxxx(%x) xx %x xxxx xx xxx %x.xx"
+                % (len(self) + 1, xxxx.xxxxxxxxxx, xxxx.xxxxxxxxxx)
+                + " %.3f (%s) to %.3f (%s).\n"
+                % (
+                    xxxx.xxxxxxxxx,
+                    xxxx.xxxxxxxxxxxxxx(xxxx.xxxxxxxxx),
+                    x,
+                    xxxx.xxxxxxxxxxxxxx(xx),
+                )
+            )
+
+
+class A:
+    def foo():
+        some_func_call(
+            "xxxxxxxxxx",
+            "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
+            '"xxxx xxxxxxx xxxxxx xxxx; xxxx xxxxxx_xxxxx xxxxxx xxxx; '
+            "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" ",
+            None,
+            ("xxxxxxxxxxx",),
+        ),
+
+
+class A:
+    def foo():
+        some_func_call(
+            "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
+            "xxxx, ('xxxxxxx xxxxxx xxxx, xxxx') xxxxxx_xxxxx xxxxxx xxxx; "
+            "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" ",
+            None,
+            ("xxxxxxxxxxx",),
+        ),
+
+
+xxxxxxx = {
+    "xx": (
+        "xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} -xx {1} -xx"
+        " xxx=xxx_xxxx,xxx_xx,xxx_xxx,xxx_xxxx,xxx_xx,xxx_xxx | xxxxxx -x xxxxxxxx -x"
+        " xxxxxxxx -x"
+    ),
+    "xx": (
+        "xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} -xx {1} -xx"
+        " xxx=xxx_xxxx_xxx_xxxx,xxx_xx_xxx_xxxx,xxx_xxxx_xxx_xxxx,xxx_xx_xxxx_xxxx,xxx_xxx_xxxx,xxx_xxx_xxxx"
+        " xxxx=xxx | xxxxxx -x xxxxxxxx -x xxxxxxxx -x"
+    ),
+}
+
+
+class A:
+    def foo(self):
+        if True:
+            xxxxx_xxxxxxxxxxxx(
+                "xxx xxxxxx xxx xxxxxxxxx.xx xx xxxxxxxx.  xxx xxxxxxxxxxxxx.xx"
+                " xxxxxxx "
+                + "xx xxxxxx xxxxxx xxxxxx xx xxxxxxx xxx xxx ${0} xx x xxxxxxxx xxxxx"
+                .xxxxxx(xxxxxx_xxxxxx_xxx)
+            )
+
+
+class A:
+    class B:
+        def foo():
+            row = {
+                "xxxxxxxxxxxxxxx": xxxxxx_xxxxx_xxxx,
+                # 'xxxxxxxxxxxxxxxxxxxxxxx'
+                # 'xxxxxxxxxxxxxxxxxxxxxx'
+                # 'xxxxxxxxxxxxxxxxxx'
+                # 'xxxxxxxxxxxxxxxxx'
+                "xxxxxxxxxx": xxxxx_xxxxx,
+            }
+
+
+class A:
+    def xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx(xxxx):
+        xxxxxxxx = [
+            xxxxxxxxxxxxxxxx(
+                "xxxx",
+                xxxxxxxxxxx={
+                    "xxxx": 1.0,
+                },
+                xxxxxx={"xxxxxx 1": xxxxxx(xxxx="xxxxxx 1", xxxxxx=600.0)},
+                xxxxxxxx_xxxxxxx=0.0,
+            ),
+            xxxxxxxxxxxxxxxx(
+                "xxxxxxx",
+                xxxxxxxxxxx={
+                    "xxxx": 1.0,
+                },
+                xxxxxx={"xxxxxx 1": xxxxxx(xxxx="xxxxxx 1", xxxxxx=200.0)},
+                xxxxxxxx_xxxxxxx=0.0,
+            ),
+            xxxxxxxxxxxxxxxx(
+                "xxxx",
+            ),
+        ]
+
+
+some_dictionary = {
+    "xxxxx006": [
+        "xxx-xxx"
+        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx=="
+        " xxxxx000 xxxxxxxxxx\n",
+        "xxx-xxx"
+        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx=="
+        " xxxxx010 xxxxxxxxxx\n",
+    ],
+    "xxxxx016": [
+        "xxx-xxx"
+        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx=="
+        " xxxxx000 xxxxxxxxxx\n",
+        "xxx-xxx"
+        " xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx=="
+        " xxxxx010 xxxxxxxxxx\n",
+    ],
+}
+
+
+def foo():
+    xxx_xxx = (  # xxxx xxxxxxxxxx xxxx xx xxxx xx xxx xxxxxxxx xxxxxx xxxxx.
+        'xxxx xxx xxxxxxxx_xxxx xx "xxxxxxxxxx".\n xxx: xxxxxx xxxxxxxx_xxxx=xxxxxxxxxx'
+    )
+
+
+some_tuple = ("some string", "some string which should be joined")
+
+some_commented_string = (  # This comment gets thrown to the top.
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"
+    " {} that I just can't think of any more good words to say about it at"
+    " allllllllllll".format("ha")  # comments here are fine
+)
+
+some_commented_string = (
+    "This string is long but not so long that it needs hahahah toooooo be so greatttt"  # But these
+    " {} that I just can't think of any more good words to say about it at"  # comments will stay
+    " allllllllllll".format("ha")  # comments here are fine
+)
+
+lpar_and_rpar_have_comments = func_call(  # LPAR Comment
+    "Long really ridiculous type of string that shouldn't really even exist at all. I"
+    " mean commmme onnn!!!",  # Comma Comment
+)  # RPAR Comment
+
+cmd_fstring = (
+    "sudo -E deluge-console info --detailed --sort-reverse=time_added "
+    f"{'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
+)
+
+cmd_fstring = (
+    "sudo -E deluge-console info --detailed --sort-reverse=time_added"
+    f" {'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
+)
+
+cmd_fstring = (
+    "sudo -E deluge-console info --detailed --sort-reverse=time_added"
+    f" {'{{}}' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
+)
+
+cmd_fstring = (
+    "sudo -E deluge-console info --detailed --sort-reverse=time_added {'' if ID is"
+    f" None else ID}} | perl -nE 'print if /^{field}:/'"
+)
+
+fstring = (
+    "This string really doesn't need to be an {{fstring}}, but this one most"
+    f" certainly, absolutely {does}."
+)
+
+fstring = f"We have to remember to escape {braces}. Like {{these}}. But not {this}."
+
+
+class A:
+    class B:
+        def foo():
+            st_error = STError(
+                f"This string ({string_leaf.value}) appears to be pointless (i.e. has"
+                " no parent)."
+            )
+
+
+def foo():
+    user_regex = _lazy_re_compile(
+        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z"  # dot-atom
+        r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"\Z)',  # quoted-string
+        re.IGNORECASE,
+    )
+
+
+def foo():
+    user_regex = _lazy_re_compile(
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",  # quoted-string
+        xyz,
+    )
+
+
+def foo():
+    user_regex = _lazy_re_compile(
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  # dot-atom
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",  # quoted-string
+        xyz,
+    )
+
+
+class A:
+    class B:
+        def foo():
+            if not hasattr(module, name):
+                raise ValueError(
+                    "Could not find object %s in %s.\n"
+                    "Please note that you cannot serialize things like inner "
+                    "classes. Please move the object into the main module "
+                    "body to use migrations.\n"
+                    "For more information, see "
+                    "https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
+                    % (name, module_name, get_docs_version())
+                )
+
+
+class A:
+    class B:
+        def foo():
+            if not hasattr(module, name):
+                raise ValueError(
+                    "Could not find object %s in %s.\nPlease note that you cannot"
+                    " serialize things like inner classes. Please move the object into"
+                    " the main module body to use migrations.\nFor more information,"
+                    " see https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
+                    % (name, module_name, get_docs_version())
+                )
+
+
+x = (
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+)
+
+
+class Step(StepBase):
+    def who(self):
+        self.cmd = (
+            "SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name}"
+            " {title}/P{passenger_association}".format(
+                last_name=last_name,
+                first_name=first_name,
+                middle_name=middle_name,
+                title=title,
+                passenger_association=passenger_association,
+            )
+        )
+
+
+xxxxxxx_xxxxxx_xxxxxxx = xxx(
+    [
+        xxxxxxxxxxxx(
+            xxxxxx_xxxxxxx=(
+                '((x.aaaaaaaaa = "xxxxxx.xxxxxxxxxxxxxxxxxxxxx") || (x.xxxxxxxxx ='
+                ' "xxxxxxxxxxxx")) && '
+                # xxxxx xxxxxxxxxxxx xxxx xxx (xxxxxxxxxxxxxxxx) xx x xxxxxxxxx xx xxxxxx.
+                "(x.bbbbbbbbbbbb.xxx != "
+                '"xxx:xxx:xxx::cccccccccccc:xxxxxxx-xxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxx") && '
+            )
+        )
+    ]
+)
+
+if __name__ == "__main__":
+    for i in range(4, 8):
+        cmd = (
+            r"for pid in $(ps aux | grep paster | grep -v grep | grep '\-%d' | awk"
+            r" '{print $2}'); do kill $pid; done" % (i)
+        )
+
+
+def A():
+    def B():
+        def C():
+            def D():
+                def E():
+                    def F():
+                        def G():
+                            assert (
+                                c_float(val[0][0] / val[0][1]).value
+                                == c_float(value[0][0] / value[0][1]).value
+                            ), "%s didn't roundtrip" % tag
+
+
+class xxxxxxxxxxxxxxxxxxxxx(xxxx.xxxxxxxxxxxxx):
+    def xxxxxxx_xxxxxx(xxxx):
+        assert xxxxxxx_xxxx in [
+            x.xxxxx.xxxxxx.xxxxx.xxxxxx,
+            x.xxxxx.xxxxxx.xxxxx.xxxx,
+        ], (
+            "xxxxxxxxxxx xxxxxxx xxxx (xxxxxx xxxx) %x xxx xxxxx" % xxxxxxx_xxxx
+        )
+
+
+value.__dict__[
+    key
+] = "test"  # set some Thrift field to non-None in the struct aa bb cc dd ee
+
+RE_ONE_BACKSLASH = {
+    "asdf_hjkl_jkl": re.compile(
+        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
+    ),
+}
+
+RE_TWO_BACKSLASHES = {
+    "asdf_hjkl_jkl": re.compile(
+        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\"
+        r" )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
+    ),
+}
+
+RE_THREE_BACKSLASHES = {
+    "asdf_hjkl_jkl": re.compile(
+        r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
+    ),
+}
+
+# We do NOT split on f-string expressions.
+print(
+    "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam."
+    f" {[f'{i}' for i in range(10)]}"
+)
+x = (
+    "This is a long string which contains an f-expr that should not split"
+    f" {{{[i for i in range(5)]}}}."
+)
+
+# The parens should NOT be removed in this case.
+(
+    "my very long string that should get formatted if I'm careful to make sure it goes"
+    " over 88 characters which it has now"
+)
+
+# The parens should NOT be removed in this case.
+(
+    "my very long string that should get formatted if I'm careful to make sure it goes"
+    " over 88 characters which it has now"
+)
+
+# The parens should NOT be removed in this case.
+(
+    "my very long string"
+    " that should get formatted"
+    " if I'm careful to make sure"
+    " it goes over 88 characters which"
+    " it has now"
+)
+
+
+def _legacy_listen_examples():
+    text += (
+        "    \"listen for the '%(event_name)s' event\"\n"
+        "\n    # ... (event logic logic logic) ...\n"
+        % {
+            "since": since,
+        }
+    )
+
+
+class X:
+    async def foo(self):
+        msg = ""
+        for candidate in CANDIDATES:
+            msg += (
+                "**{candidate.object_type} {candidate.rev}**"
+                " - {candidate.description}\n"
+            )
+
+
+temp_msg = (
+    f"{f'{humanize_number(pos)}.': <{pound_len+2}} "
+    f"{balance: <{bal_len + 5}} "
+    f"<<{author.display_name}>>\n"
+)
+
+assert (
+    str(suffix_arr)
+    == "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    != "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    <= "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    >= "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    < "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    > "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
+    "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
+    "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$',"
+    " 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$',"
+    " 'ykangaroo$']"
+)
+assert (
+    str(suffix_arr)
+    not in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$',"
+    " 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$',"
+    " 'rykangaroo$', 'ykangaroo$']"
+)
+message = (
+    f"1. Go to Google Developers Console and log in with your Google account."
+    f"(https://console.developers.google.com/)"
+    f"2. You should be prompted to create a new project (name does not matter)."
+    f"3. Click on Enable APIs and Services at the top."
+    f"4. In the list of APIs choose or search for YouTube Data API v3 and "
+    f"click on it. Choose Enable."
+    f"5. Click on Credentials on the left navigation bar."
+    f"6. Click on Create Credential at the top."
+    f'7. At the top click the link for "API key".'
+    f"8. No application restrictions are needed. Click Create at the bottom."
+    f"9. You now have a key to add to `{{prefix}}set api youtube api_key`"
+)
+message = (
+    f"1. Go to Google Developers Console and log in with your Google account."
+    f"(https://console.developers.google.com/)"
+    f"2. You should be prompted to create a new project (name does not matter)."
+    f"3. Click on Enable APIs and Services at the top."
+    f"4. In the list of APIs choose or search for YouTube Data API v3 and "
+    f"click on it. Choose Enable."
+    f"5. Click on Credentials on the left navigation bar."
+    f"6. Click on Create Credential at the top."
+    f'7. At the top click the link for "API key".'
+    f"8. No application restrictions are needed. Click Create at the bottom."
+    f"9. You now have a key to add to `{{prefix}}set api youtube api_key`"
+)
+message = (
+    "1. Go to Google Developers Console and log in with your Google account."
+    "(https://console.developers.google.com/)"
+    "2. You should be prompted to create a new project (name does not matter)."
+    "3. Click on Enable APIs and Services at the top."
+    "4. In the list of APIs choose or search for YouTube Data API v3 and "
+    "click on it. Choose Enable."
+    "5. Click on Credentials on the left navigation bar."
+    "6. Click on Create Credential at the top."
+    '7. At the top click the link for "API key".'
+    "8. No application restrictions are needed. Click Create at the bottom."
+    f"9. You now have a key to add to `{prefix}set api youtube api_key`"
+)
+
+# It shouldn't matter if the string prefixes are capitalized.
+temp_msg = (
+    f"{F'{humanize_number(pos)}.': <{pound_len+2}} "
+    f"{balance: <{bal_len + 5}} "
+    f"<<{author.display_name}>>\n"
+)
+
+fstring = f"We have to remember to escape {braces}. Like {{these}}. But not {this}."
+
+welcome_to_programming = R"hello," R" world!"
+
+fstring = (
+    f"f-strings definitely make things more {difficult} than they need to be for"
+    " {black}. But boy they sure are handy. The problem is that some lines will need"
+    f" to have the 'f' whereas others do not. This {line}, for example, needs one."
+)
+
+x = (
+    "This is a long string which contains an f-expr that should not split"
+    f" {{{[i for i in range(5)]}}}."
+)
+
+x = (
+    "\N{BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR}\N{VARIATION SELECTOR-16}"
+)
+
+xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
+    xx_xxxxxx={
+        "x3_xxxxxxxx": (
+            "xxx3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx_xxxxxxx"
+        ),
+    },
+)
diff -pruN 22.3.0-1/tests/data/preview/one_element_subscript.py 22.6.0-1/tests/data/preview/one_element_subscript.py
--- 22.3.0-1/tests/data/preview/one_element_subscript.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/one_element_subscript.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,36 @@
+# We should not treat the trailing comma
+# in a single-element subscript.
+a: tuple[int,]
+b = tuple[int,]
+
+# The magic comma still applies to multi-element subscripts.
+c: tuple[int, int,]
+d = tuple[int, int,]
+
+# Magic commas still work as expected for non-subscripts.
+small_list = [1,]
+list_of_types = [tuple[int,],]
+
+# output
+# We should not treat the trailing comma
+# in a single-element subscript.
+a: tuple[int,]
+b = tuple[int,]
+
+# The magic comma still applies to multi-element subscripts.
+c: tuple[
+    int,
+    int,
+]
+d = tuple[
+    int,
+    int,
+]
+
+# Magic commas still work as expected for non-subscripts.
+small_list = [
+    1,
+]
+list_of_types = [
+    tuple[int,],
+]
diff -pruN 22.3.0-1/tests/data/preview/percent_precedence.py 22.6.0-1/tests/data/preview/percent_precedence.py
--- 22.3.0-1/tests/data/preview/percent_precedence.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/percent_precedence.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,41 @@
+("" % a) ** 2
+("" % a)[0]
+("" % a)()
+("" % a).b
+
+2 * ("" % a)
+2 @ ("" % a)
+2 / ("" % a)
+2 // ("" % a)
+2 % ("" % a)
++("" % a)
+b + ("" % a)
+-("" % a)
+b - ("" % a)
+b + -("" % a)
+~("" % a)
+2 ** ("" % a)
+await ("" % a)
+b[("" % a)]
+b(("" % a))
+# output
+("" % a) ** 2
+("" % a)[0]
+("" % a)()
+("" % a).b
+
+2 * ("" % a)
+2 @ ("" % a)
+2 / ("" % a)
+2 // ("" % a)
+2 % ("" % a)
++("" % a)
+b + "" % a
+-("" % a)
+b - "" % a
+b + -("" % a)
+~("" % a)
+2 ** ("" % a)
+await ("" % a)
+b[("" % a)]
+b(("" % a))
diff -pruN 22.3.0-1/tests/data/preview/remove_await_parens.py 22.6.0-1/tests/data/preview/remove_await_parens.py
--- 22.3.0-1/tests/data/preview/remove_await_parens.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/remove_await_parens.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,168 @@
+import asyncio
+
+# Control example
+async def main():
+    await asyncio.sleep(1)
+
+# Remove brackets for short coroutine/task
+async def main():
+    await (asyncio.sleep(1))
+
+async def main():
+    await (
+        asyncio.sleep(1)
+    )
+
+async def main():
+    await (asyncio.sleep(1)
+    )
+
+# Check comments
+async def main():
+    await (  # Hello
+        asyncio.sleep(1)
+    )
+
+async def main():
+    await (
+        asyncio.sleep(1)  # Hello
+    )
+
+async def main():
+    await (
+        asyncio.sleep(1)
+    )  # Hello
+
+# Long lines
+async def main():
+    await asyncio.gather(asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1))
+
+# Same as above but with magic trailing comma in function
+async def main():
+    await asyncio.gather(asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1),)
+
+# Cr@zY Br@ck3Tz
+async def main():
+    await (
+        (((((((((((((
+        (((        (((
+        (((         (((
+        (((         (((
+        (((        (((
+        ((black(1)))
+        )))        )))
+        )))         )))
+        )))         )))
+        )))        )))
+        )))))))))))))
+    )
+
+# Keep brackets around non power operations and nested awaits
+async def main():
+    await (set_of_tasks | other_set)
+
+async def main():
+    await (await asyncio.sleep(1))
+
+# It's awaits all the way down...
+async def main():
+    await (await x)
+
+async def main():
+    await (yield x)
+
+async def main():
+    await (await (asyncio.sleep(1)))
+
+async def main():
+    await (await (await (await (await (asyncio.sleep(1))))))
+
+# output
+import asyncio
+
+# Control example
+async def main():
+    await asyncio.sleep(1)
+
+
+# Remove brackets for short coroutine/task
+async def main():
+    await asyncio.sleep(1)
+
+
+async def main():
+    await asyncio.sleep(1)
+
+
+async def main():
+    await asyncio.sleep(1)
+
+
+# Check comments
+async def main():
+    await asyncio.sleep(1)  # Hello
+
+
+async def main():
+    await asyncio.sleep(1)  # Hello
+
+
+async def main():
+    await asyncio.sleep(1)  # Hello
+
+
+# Long lines
+async def main():
+    await asyncio.gather(
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+    )
+
+
+# Same as above but with magic trailing comma in function
+async def main():
+    await asyncio.gather(
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+        asyncio.sleep(1),
+    )
+
+
+# Cr@zY Br@ck3Tz
+async def main():
+    await black(1)
+
+
+# Keep brackets around non power operations and nested awaits
+async def main():
+    await (set_of_tasks | other_set)
+
+
+async def main():
+    await (await asyncio.sleep(1))
+
+
+# It's awaits all the way down...
+async def main():
+    await (await x)
+
+
+async def main():
+    await (yield x)
+
+
+async def main():
+    await (await asyncio.sleep(1))
+
+
+async def main():
+    await (await (await (await (await asyncio.sleep(1)))))
diff -pruN 22.3.0-1/tests/data/preview/remove_except_parens.py 22.6.0-1/tests/data/preview/remove_except_parens.py
--- 22.3.0-1/tests/data/preview/remove_except_parens.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/remove_except_parens.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,79 @@
+# These brackets are redundant, therefore remove.
+try:
+    a.something
+except (AttributeError) as err:
+    raise err
+
+# This is tuple of exceptions.
+# Although this could be replaced with just the exception,
+# we do not remove brackets to preserve AST.
+try:
+    a.something
+except (AttributeError,) as err:
+    raise err
+
+# This is a tuple of exceptions. Do not remove brackets.
+try:
+    a.something
+except (AttributeError, ValueError) as err:
+    raise err
+
+# Test long variants.
+try:
+    a.something
+except (some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error) as err:
+    raise err
+
+try:
+    a.something
+except (some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,) as err:
+    raise err
+
+try:
+    a.something
+except (some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error, some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error) as err:
+    raise err
+
+# output
+# These brackets are redundant, therefore remove.
+try:
+    a.something
+except AttributeError as err:
+    raise err
+
+# This is tuple of exceptions.
+# Although this could be replaced with just the exception,
+# we do not remove brackets to preserve AST.
+try:
+    a.something
+except (AttributeError,) as err:
+    raise err
+
+# This is a tuple of exceptions. Do not remove brackets.
+try:
+    a.something
+except (AttributeError, ValueError) as err:
+    raise err
+
+# Test long variants.
+try:
+    a.something
+except (
+    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error
+) as err:
+    raise err
+
+try:
+    a.something
+except (
+    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,
+) as err:
+    raise err
+
+try:
+    a.something
+except (
+    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,
+    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,
+) as err:
+    raise err
diff -pruN 22.3.0-1/tests/data/preview/remove_for_brackets.py 22.6.0-1/tests/data/preview/remove_for_brackets.py
--- 22.3.0-1/tests/data/preview/remove_for_brackets.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/remove_for_brackets.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,48 @@
+# Only remove tuple brackets after `for`
+for (k, v) in d.items():
+    print(k, v)
+
+# Don't touch tuple brackets after `in`
+for module in (core, _unicodefun):
+    if hasattr(module, "_verify_python3_env"):
+        module._verify_python3_env = lambda: None
+
+# Brackets remain for long for loop lines
+for (why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long, i_dont_know_but_we_should_still_check_the_behaviour_if_they_do) in d.items():
+    print(k, v)
+
+for (k, v) in dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items():
+    print(k, v)
+
+# Test deeply nested brackets
+for (((((k, v))))) in d.items():
+    print(k, v)
+
+# output
+# Only remove tuple brackets after `for`
+for k, v in d.items():
+    print(k, v)
+
+# Don't touch tuple brackets after `in`
+for module in (core, _unicodefun):
+    if hasattr(module, "_verify_python3_env"):
+        module._verify_python3_env = lambda: None
+
+# Brackets remain for long for loop lines
+for (
+    why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long,
+    i_dont_know_but_we_should_still_check_the_behaviour_if_they_do,
+) in d.items():
+    print(k, v)
+
+for (
+    k,
+    v,
+) in (
+    dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items()
+):
+    print(k, v)
+
+# Test deeply nested brackets
+for k, v in d.items():
+    print(k, v)
diff -pruN 22.3.0-1/tests/data/preview/remove_newline_after_code_block_open.py 22.6.0-1/tests/data/preview/remove_newline_after_code_block_open.py
--- 22.3.0-1/tests/data/preview/remove_newline_after_code_block_open.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/remove_newline_after_code_block_open.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,189 @@
+import random
+
+
+def foo1():
+
+    print("The newline above me should be deleted!")
+
+
+def foo2():
+
+
+
+    print("All the newlines above me should be deleted!")
+
+
+def foo3():
+
+    print("No newline above me!")
+
+    print("There is a newline above me, and that's OK!")
+
+
+def foo4():
+
+    # There is a comment here
+
+    print("The newline above me should not be deleted!")
+
+
+class Foo:
+    def bar(self):
+
+        print("The newline above me should be deleted!")
+
+
+for i in range(5):
+
+    print(f"{i}) The line above me should be removed!")
+
+
+for i in range(5):
+
+
+
+    print(f"{i}) The lines above me should be removed!")
+
+
+for i in range(5):
+
+    for j in range(7):
+
+        print(f"{i}) The lines above me should be removed!")
+
+
+if random.randint(0, 3) == 0:
+
+    print("The new line above me is about to be removed!")
+
+
+if random.randint(0, 3) == 0:
+
+
+
+
+    print("The new lines above me is about to be removed!")
+
+
+if random.randint(0, 3) == 0:
+    if random.uniform(0, 1) > 0.5:
+        print("Two lines above me are about to be removed!")
+
+
+while True:
+
+    print("The newline above me should be deleted!")
+
+
+while True:
+
+
+
+    print("The newlines above me should be deleted!")
+
+
+while True:
+
+    while False:
+
+        print("The newlines above me should be deleted!")
+
+
+with open("/path/to/file.txt", mode="w") as file:
+
+    file.write("The new line above me is about to be removed!")
+
+
+with open("/path/to/file.txt", mode="w") as file:
+
+
+
+    file.write("The new lines above me is about to be removed!")
+
+
+with open("/path/to/file.txt", mode="r") as read_file:
+
+    with open("/path/to/output_file.txt", mode="w") as write_file:
+
+        write_file.writelines(read_file.readlines())
+
+# output
+
+import random
+
+
+def foo1():
+    print("The newline above me should be deleted!")
+
+
+def foo2():
+    print("All the newlines above me should be deleted!")
+
+
+def foo3():
+    print("No newline above me!")
+
+    print("There is a newline above me, and that's OK!")
+
+
+def foo4():
+    # There is a comment here
+
+    print("The newline above me should not be deleted!")
+
+
+class Foo:
+    def bar(self):
+        print("The newline above me should be deleted!")
+
+
+for i in range(5):
+    print(f"{i}) The line above me should be removed!")
+
+
+for i in range(5):
+    print(f"{i}) The lines above me should be removed!")
+
+
+for i in range(5):
+    for j in range(7):
+        print(f"{i}) The lines above me should be removed!")
+
+
+if random.randint(0, 3) == 0:
+    print("The new line above me is about to be removed!")
+
+
+if random.randint(0, 3) == 0:
+    print("The new lines above me is about to be removed!")
+
+
+if random.randint(0, 3) == 0:
+    if random.uniform(0, 1) > 0.5:
+        print("Two lines above me are about to be removed!")
+
+
+while True:
+    print("The newline above me should be deleted!")
+
+
+while True:
+    print("The newlines above me should be deleted!")
+
+
+while True:
+    while False:
+        print("The newlines above me should be deleted!")
+
+
+with open("/path/to/file.txt", mode="w") as file:
+    file.write("The new line above me is about to be removed!")
+
+
+with open("/path/to/file.txt", mode="w") as file:
+    file.write("The new lines above me is about to be removed!")
+
+
+with open("/path/to/file.txt", mode="r") as read_file:
+    with open("/path/to/output_file.txt", mode="w") as write_file:
+        write_file.writelines(read_file.readlines())
diff -pruN 22.3.0-1/tests/data/preview/return_annotation_brackets.py 22.6.0-1/tests/data/preview/return_annotation_brackets.py
--- 22.3.0-1/tests/data/preview/return_annotation_brackets.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview/return_annotation_brackets.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,222 @@
+# Control
+def double(a: int) -> int:
+    return 2*a
+
+# Remove the brackets
+def double(a: int) -> (int):
+    return 2*a
+
+# Some newline variations
+def double(a: int) -> (
+    int):
+    return 2*a
+
+def double(a: int) -> (int
+):
+    return 2*a
+
+def double(a: int) -> (
+    int
+):
+    return 2*a
+
+# Don't lose the comments
+def double(a: int) -> ( # Hello
+    int
+):
+    return 2*a
+
+def double(a: int) -> (
+    int # Hello
+):
+    return 2*a
+
+# Really long annotations
+def foo() -> (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+):
+    return 2
+
+def foo() -> intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds:
+    return 2
+
+def foo() -> intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds | intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds:
+    return 2
+
+def foo(a: int, b: int, c: int,) -> intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds:
+    return 2
+
+def foo(a: int, b: int, c: int,) -> intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds | intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds:
+    return 2
+
+# Split args but no need to split return
+def foo(a: int, b: int, c: int,) -> int:
+    return 2
+
+# Deeply nested brackets
+# with *interesting* spacing
+def double(a: int) -> (((((int))))):
+    return 2*a
+
+def double(a: int) -> (
+    (  (
+        ((int)
+         )
+           )
+            )
+        ):
+    return 2*a
+
+def foo() -> (
+    (  (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+)
+)):
+    return 2
+
+# Return type with commas
+def foo() -> (
+    tuple[int, int, int]
+):
+    return 2
+
+def foo() -> tuple[loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong, loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong, loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong]:
+    return 2
+
+# Magic trailing comma example
+def foo() -> tuple[int, int, int,]:
+    return 2
+
+# Long string example
+def frobnicate() -> "ThisIsTrulyUnreasonablyExtremelyLongClassName | list[ThisIsTrulyUnreasonablyExtremelyLongClassName]":
+    pass
+
+# output
+# Control
+def double(a: int) -> int:
+    return 2 * a
+
+
+# Remove the brackets
+def double(a: int) -> int:
+    return 2 * a
+
+
+# Some newline variations
+def double(a: int) -> int:
+    return 2 * a
+
+
+def double(a: int) -> int:
+    return 2 * a
+
+
+def double(a: int) -> int:
+    return 2 * a
+
+
+# Don't lose the comments
+def double(a: int) -> int:  # Hello
+    return 2 * a
+
+
+def double(a: int) -> int:  # Hello
+    return 2 * a
+
+
+# Really long annotations
+def foo() -> (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+):
+    return 2
+
+
+def foo() -> (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+):
+    return 2
+
+
+def foo() -> (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+    | intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+):
+    return 2
+
+
+def foo(
+    a: int,
+    b: int,
+    c: int,
+) -> intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds:
+    return 2
+
+
+def foo(
+    a: int,
+    b: int,
+    c: int,
+) -> (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+    | intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+):
+    return 2
+
+
+# Split args but no need to split return
+def foo(
+    a: int,
+    b: int,
+    c: int,
+) -> int:
+    return 2
+
+
+# Deeply nested brackets
+# with *interesting* spacing
+def double(a: int) -> int:
+    return 2 * a
+
+
+def double(a: int) -> int:
+    return 2 * a
+
+
+def foo() -> (
+    intsdfsafafafdfdsasdfsfsdfasdfafdsafdfdsfasdskdsdsfdsafdsafsdfdasfffsfdsfdsafafhdskfhdsfjdslkfdlfsdkjhsdfjkdshfkljds
+):
+    return 2
+
+
+# Return type with commas
+def foo() -> tuple[int, int, int]:
+    return 2
+
+
+def foo() -> (
+    tuple[
+        loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong,
+        loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong,
+        loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong,
+    ]
+):
+    return 2
+
+
+# Magic trailing comma example
+def foo() -> (
+    tuple[
+        int,
+        int,
+        int,
+    ]
+):
+    return 2
+
+
+# Long string example
+def frobnicate() -> (
+    "ThisIsTrulyUnreasonablyExtremelyLongClassName |"
+    " list[ThisIsTrulyUnreasonablyExtremelyLongClassName]"
+):
+    pass
diff -pruN 22.3.0-1/tests/data/preview_310/remove_newline_after match.py 22.6.0-1/tests/data/preview_310/remove_newline_after match.py
--- 22.3.0-1/tests/data/preview_310/remove_newline_after match.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview_310/remove_newline_after match.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,34 @@
+def http_status(status):
+
+    match status:
+
+        case 400:
+
+            return "Bad request"
+
+        case 401:
+
+            return "Unauthorized"
+
+        case 403:
+
+            return "Forbidden"
+
+        case 404:
+
+            return "Not found"
+
+# output
+def http_status(status):
+    match status:
+        case 400:
+            return "Bad request"
+
+        case 401:
+            return "Unauthorized"
+
+        case 403:
+            return "Forbidden"
+
+        case 404:
+            return "Not found"
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/preview_39/remove_with_brackets.py 22.6.0-1/tests/data/preview_39/remove_with_brackets.py
--- 22.3.0-1/tests/data/preview_39/remove_with_brackets.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/preview_39/remove_with_brackets.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,119 @@
+with (open("bla.txt")):
+    pass
+
+with (open("bla.txt")), (open("bla.txt")):
+    pass
+
+with (open("bla.txt") as f):
+    pass
+
+# Remove brackets within alias expression
+with (open("bla.txt")) as f:
+    pass
+
+# Remove brackets around one-line context managers
+with (open("bla.txt") as f, (open("x"))):
+    pass
+
+with ((open("bla.txt")) as f, open("x")):
+    pass
+
+with (CtxManager1() as example1, CtxManager2() as example2):
+    ...
+
+# Brackets remain when using magic comma
+with (CtxManager1() as example1, CtxManager2() as example2,):
+    ...
+
+# Brackets remain for multi-line context managers
+with (CtxManager1() as example1, CtxManager2() as example2, CtxManager2() as example2, CtxManager2() as example2, CtxManager2() as example2):
+    ...
+
+# Don't touch assignment expressions
+with (y := open("./test.py")) as f:
+    pass
+
+# Deeply nested examples
+# N.B. Multiple brackets are only possible
+# around the context manager itself.
+# Only one brackets is allowed around the
+# alias expression or comma-delimited context managers.
+with (((open("bla.txt")))):
+    pass
+
+with (((open("bla.txt")))), (((open("bla.txt")))):
+    pass
+
+with (((open("bla.txt")))) as f:
+    pass
+
+with ((((open("bla.txt")))) as f):
+    pass
+
+with ((((CtxManager1()))) as example1, (((CtxManager2()))) as example2):
+    ...
+
+# output
+with open("bla.txt"):
+    pass
+
+with open("bla.txt"), open("bla.txt"):
+    pass
+
+with open("bla.txt") as f:
+    pass
+
+# Remove brackets within alias expression
+with open("bla.txt") as f:
+    pass
+
+# Remove brackets around one-line context managers
+with open("bla.txt") as f, open("x"):
+    pass
+
+with open("bla.txt") as f, open("x"):
+    pass
+
+with CtxManager1() as example1, CtxManager2() as example2:
+    ...
+
+# Brackets remain when using magic comma
+with (
+    CtxManager1() as example1,
+    CtxManager2() as example2,
+):
+    ...
+
+# Brackets remain for multi-line context managers
+with (
+    CtxManager1() as example1,
+    CtxManager2() as example2,
+    CtxManager2() as example2,
+    CtxManager2() as example2,
+    CtxManager2() as example2,
+):
+    ...
+
+# Don't touch assignment expressions
+with (y := open("./test.py")) as f:
+    pass
+
+# Deeply nested examples
+# N.B. Multiple brackets are only possible
+# around the context manager itself.
+# Only one brackets is allowed around the
+# alias expression or comma-delimited context managers.
+with open("bla.txt"):
+    pass
+
+with open("bla.txt"), open("bla.txt"):
+    pass
+
+with open("bla.txt") as f:
+    pass
+
+with open("bla.txt") as f:
+    pass
+
+with CtxManager1() as example1, CtxManager2() as example2:
+    ...
diff -pruN 22.3.0-1/tests/data/py_310/parenthesized_context_managers.py 22.6.0-1/tests/data/py_310/parenthesized_context_managers.py
--- 22.3.0-1/tests/data/py_310/parenthesized_context_managers.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/parenthesized_context_managers.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,21 @@
+with (CtxManager() as example):
+    ...
+
+with (CtxManager1(), CtxManager2()):
+    ...
+
+with (CtxManager1() as example, CtxManager2()):
+    ...
+
+with (CtxManager1(), CtxManager2() as example):
+    ...
+
+with (CtxManager1() as example1, CtxManager2() as example2):
+    ...
+
+with (
+    CtxManager1() as example1,
+    CtxManager2() as example2,
+    CtxManager3() as example3,
+):
+    ...
diff -pruN 22.3.0-1/tests/data/py_310/pattern_matching_complex.py 22.6.0-1/tests/data/py_310/pattern_matching_complex.py
--- 22.3.0-1/tests/data/py_310/pattern_matching_complex.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/pattern_matching_complex.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,144 @@
+# Cases sampled from Lib/test/test_patma.py
+
+# case black_test_patma_098
+match x:
+    case -0j:
+        y = 0
+# case black_test_patma_142
+match x:
+    case bytes(z):
+        y = 0
+# case black_test_patma_073
+match x:
+    case 0 if 0:
+        y = 0
+    case 0 if 1:
+        y = 1
+# case black_test_patma_006
+match 3:
+    case 0 | 1 | 2 | 3:
+        x = True
+# case black_test_patma_049
+match x:
+    case [0, 1] | [1, 0]:
+        y = 0
+# case black_check_sequence_then_mapping
+match x:
+    case [*_]:
+        return "seq"
+    case {}:
+        return "map"
+# case black_test_patma_035
+match x:
+    case {0: [1, 2, {}]}:
+        y = 0
+    case {0: [1, 2, {}] | True} | {1: [[]]} | {0: [1, 2, {}]} | [] | "X" | {}:
+        y = 1
+    case []:
+        y = 2
+# case black_test_patma_107
+match x:
+    case 0.25 + 1.75j:
+        y = 0
+# case black_test_patma_097
+match x:
+    case -0j:
+        y = 0
+# case black_test_patma_007
+match 4:
+    case 0 | 1 | 2 | 3:
+        x = True
+# case black_test_patma_154
+match x:
+    case 0 if x:
+        y = 0
+# case black_test_patma_134
+match x:
+    case {1: 0}:
+        y = 0
+    case {0: 0}:
+        y = 1
+    case {**z}:
+        y = 2
+# case black_test_patma_185
+match Seq():
+    case [*_]:
+        y = 0
+# case black_test_patma_063
+match x:
+    case 1:
+        y = 0
+    case 1:
+        y = 1
+# case black_test_patma_248
+match x:
+    case {"foo": bar}:
+        y = bar
+# case black_test_patma_019
+match (0, 1, 2):
+    case [0, 1, *x, 2]:
+        y = 0
+# case black_test_patma_052
+match x:
+    case [0]:
+        y = 0
+    case [1, 0] if (x := x[:0]):
+        y = 1
+    case [1, 0]:
+        y = 2
+# case black_test_patma_191
+match w:
+    case [x, y, *_]:
+        z = 0
+# case black_test_patma_110
+match x:
+    case -0.25 - 1.75j:
+        y = 0
+# case black_test_patma_151
+match (x,):
+    case [y]:
+        z = 0
+# case black_test_patma_114
+match x:
+    case A.B.C.D:
+        y = 0
+# case black_test_patma_232
+match x:
+    case None:
+        y = 0
+# case black_test_patma_058
+match x:
+    case 0:
+        y = 0
+# case black_test_patma_233
+match x:
+    case False:
+        y = 0
+# case black_test_patma_078
+match x:
+    case []:
+        y = 0
+    case [""]:
+        y = 1
+    case "":
+        y = 2
+# case black_test_patma_156
+match x:
+    case z:
+        y = 0
+# case black_test_patma_189
+match w:
+    case [x, y, *rest]:
+        z = 0
+# case black_test_patma_042
+match x:
+    case (0 as z) | (1 as z) | (2 as z) if z == x % 2:
+        y = 0
+# case black_test_patma_034
+match x:
+    case {0: [1, 2, {}]}:
+        y = 0
+    case {0: [1, 2, {}] | False} | {1: [[]]} | {0: [1, 2, {}]} | [] | "X" | {}:
+        y = 1
+    case []:
+        y = 2
diff -pruN 22.3.0-1/tests/data/py_310/pattern_matching_extras.py 22.6.0-1/tests/data/py_310/pattern_matching_extras.py
--- 22.3.0-1/tests/data/py_310/pattern_matching_extras.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/pattern_matching_extras.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,119 @@
+import match
+
+match something:
+    case [a as b]:
+        print(b)
+    case [a as b, c, d, e as f]:
+        print(f)
+    case Point(a as b):
+        print(b)
+    case Point(int() as x, int() as y):
+        print(x, y)
+
+
+match = 1
+case: int = re.match(something)
+
+match re.match(case):
+    case type("match", match):
+        pass
+    case match:
+        pass
+
+
+def func(match: case, case: match) -> case:
+    match Something():
+        case func(match, case):
+            ...
+        case another:
+            ...
+
+
+match maybe, multiple:
+    case perhaps, 5:
+        pass
+    case perhaps, 6,:
+        pass
+
+
+match more := (than, one), indeed,:
+    case _, (5, 6):
+        pass
+    case [[5], (6)], [7],:
+        pass
+    case _:
+        pass
+
+
+match a, *b, c:
+    case [*_]:
+        assert "seq" == _
+    case {}:
+        assert "map" == b
+
+
+match match(
+    case,
+    match(
+        match, case, match, looooooooooooooooooooooooooooooooooooong, match, case, match
+    ),
+    case,
+):
+    case case(
+        match=case,
+        case=re.match(
+            loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
+        ),
+    ):
+        pass
+
+    case [a as match]:
+        pass
+
+    case case:
+        pass
+
+
+match match:
+    case case:
+        pass
+
+
+match a, *b(), c:
+    case d, *f, g:
+        pass
+
+
+match something:
+    case {
+        "key": key as key_1,
+        "password": PASS.ONE | PASS.TWO | PASS.THREE as password,
+    }:
+        pass
+    case {"maybe": something(complicated as this) as that}:
+        pass
+
+
+match something:
+    case 1 as a:
+        pass
+
+    case 2 as b, 3 as c:
+        pass
+
+    case 4 as d, (5 as e), (6 | 7 as g), *h:
+        pass
+
+
+match bar1:
+    case Foo(aa=Callable() as aa, bb=int()):
+        print(bar1.aa, bar1.bb)
+    case _:
+        print("no match", "\n")
+
+
+match bar1:
+    case Foo(
+        normal=x, perhaps=[list, {an: d, dict: 1.0}] as y, otherwise=something, q=t as u
+    ):
+        pass
diff -pruN 22.3.0-1/tests/data/py_310/pattern_matching_generic.py 22.6.0-1/tests/data/py_310/pattern_matching_generic.py
--- 22.3.0-1/tests/data/py_310/pattern_matching_generic.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/pattern_matching_generic.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,107 @@
+re.match()
+match = a
+with match() as match:
+    match = f"{match}"
+
+re.match()
+match = a
+with match() as match:
+    match = f"{match}"
+
+
+def get_grammars(target_versions: Set[TargetVersion]) -> List[Grammar]:
+    if not target_versions:
+        # No target_version specified, so try all grammars.
+        return [
+            # Python 3.7+
+            pygram.python_grammar_no_print_statement_no_exec_statement_async_keywords,
+            # Python 3.0-3.6
+            pygram.python_grammar_no_print_statement_no_exec_statement,
+            # Python 2.7 with future print_function import
+            pygram.python_grammar_no_print_statement,
+            # Python 2.7
+            pygram.python_grammar,
+        ]
+
+    match match:
+        case case:
+            match match:
+                case case:
+                    pass
+
+    if all(version.is_python2() for version in target_versions):
+        # Python 2-only code, so try Python 2 grammars.
+        return [
+            # Python 2.7 with future print_function import
+            pygram.python_grammar_no_print_statement,
+            # Python 2.7
+            pygram.python_grammar,
+        ]
+
+    re.match()
+    match = a
+    with match() as match:
+        match = f"{match}"
+
+    def test_patma_139(self):
+        x = False
+        match x:
+            case bool(z):
+                y = 0
+        self.assertIs(x, False)
+        self.assertEqual(y, 0)
+        self.assertIs(z, x)
+
+    # Python 3-compatible code, so only try Python 3 grammar.
+    grammars = []
+    if supports_feature(target_versions, Feature.PATTERN_MATCHING):
+        # Python 3.10+
+        grammars.append(pygram.python_grammar_soft_keywords)
+    # If we have to parse both, try to parse async as a keyword first
+    if not supports_feature(
+        target_versions, Feature.ASYNC_IDENTIFIERS
+    ) and not supports_feature(target_versions, Feature.PATTERN_MATCHING):
+        # Python 3.7-3.9
+        grammars.append(
+            pygram.python_grammar_no_print_statement_no_exec_statement_async_keywords
+        )
+    if not supports_feature(target_versions, Feature.ASYNC_KEYWORDS):
+        # Python 3.0-3.6
+        grammars.append(pygram.python_grammar_no_print_statement_no_exec_statement)
+
+    def test_patma_155(self):
+        x = 0
+        y = None
+        match x:
+            case 1e1000:
+                y = 0
+        self.assertEqual(x, 0)
+        self.assertIs(y, None)
+
+        x = range(3)
+        match x:
+            case [y, case as x, z]:
+                w = 0
+
+    # At least one of the above branches must have been taken, because every Python
+    # version has exactly one of the two 'ASYNC_*' flags
+    return grammars
+
+
+def lib2to3_parse(src_txt: str, target_versions: Iterable[TargetVersion] = ()) -> Node:
+    """Given a string with source, return the lib2to3 Node."""
+    if not src_txt.endswith("\n"):
+        src_txt += "\n"
+
+    grammars = get_grammars(set(target_versions))
+
+
+re.match()
+match = a
+with match() as match:
+    match = f"{match}"
+
+re.match()
+match = a
+with match() as match:
+    match = f"{match}"
diff -pruN 22.3.0-1/tests/data/py_310/pattern_matching_simple.py 22.6.0-1/tests/data/py_310/pattern_matching_simple.py
--- 22.3.0-1/tests/data/py_310/pattern_matching_simple.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/pattern_matching_simple.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,92 @@
+# Cases sampled from PEP 636 examples
+
+match command.split():
+    case [action, obj]:
+        ...  # interpret action, obj
+
+match command.split():
+    case [action]:
+        ...  # interpret single-verb action
+    case [action, obj]:
+        ...  # interpret action, obj
+
+match command.split():
+    case ["quit"]:
+        print("Goodbye!")
+        quit_game()
+    case ["look"]:
+        current_room.describe()
+    case ["get", obj]:
+        character.get(obj, current_room)
+    case ["go", direction]:
+        current_room = current_room.neighbor(direction)
+    # The rest of your commands go here
+
+match command.split():
+    case ["drop", *objects]:
+        for obj in objects:
+            character.drop(obj, current_room)
+    # The rest of your commands go here
+
+match command.split():
+    case ["quit"]:
+        pass
+    case ["go", direction]:
+        print("Going:", direction)
+    case ["drop", *objects]:
+        print("Dropping: ", *objects)
+    case _:
+        print(f"Sorry, I couldn't understand {command!r}")
+
+match command.split():
+    case ["north"] | ["go", "north"]:
+        current_room = current_room.neighbor("north")
+    case ["get", obj] | ["pick", "up", obj] | ["pick", obj, "up"]:
+        ...  # Code for picking up the given object
+
+match command.split():
+    case ["go", ("north" | "south" | "east" | "west")]:
+        current_room = current_room.neighbor(...)
+        # how do I know which direction to go?
+
+match command.split():
+    case ["go", ("north" | "south" | "east" | "west") as direction]:
+        current_room = current_room.neighbor(direction)
+
+match command.split():
+    case ["go", direction] if direction in current_room.exits:
+        current_room = current_room.neighbor(direction)
+    case ["go", _]:
+        print("Sorry, you can't go that way")
+
+match event.get():
+    case Click(position=(x, y)):
+        handle_click_at(x, y)
+    case KeyPress(key_name="Q") | Quit():
+        game.quit()
+    case KeyPress(key_name="up arrow"):
+        game.go_north()
+    case KeyPress():
+        pass  # Ignore other keystrokes
+    case other_event:
+        raise ValueError(f"Unrecognized event: {other_event}")
+
+match event.get():
+    case Click((x, y), button=Button.LEFT):  # This is a left click
+        handle_click_at(x, y)
+    case Click():
+        pass  # ignore other clicks
+
+
+def where_is(point):
+    match point:
+        case Point(x=0, y=0):
+            print("Origin")
+        case Point(x=0, y=y):
+            print(f"Y={y}")
+        case Point(x=x, y=0):
+            print(f"X={x}")
+        case Point():
+            print("Somewhere else")
+        case _:
+            print("Not a point")
diff -pruN 22.3.0-1/tests/data/py_310/pattern_matching_style.py 22.6.0-1/tests/data/py_310/pattern_matching_style.py
--- 22.3.0-1/tests/data/py_310/pattern_matching_style.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/pattern_matching_style.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,91 @@
+match something:
+    case b(): print(1+1)
+    case c(
+        very_complex=True,
+        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-   1
+    ): print(1)
+    case c(
+        very_complex=True,
+        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
+    ): print(2)
+    case a: pass
+
+match(
+    arg # comment
+)
+
+match(
+)
+
+match(
+
+
+)
+
+case(
+    arg # comment
+)
+
+case(
+)
+
+case(
+
+
+)
+
+
+re.match(
+    something # fast
+)
+re.match(
+
+
+
+)
+match match(
+
+
+):
+    case case(
+        arg, # comment
+    ):
+        pass
+
+# output
+
+match something:
+    case b():
+        print(1 + 1)
+    case c(
+        very_complex=True, perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1
+    ):
+        print(1)
+    case c(
+        very_complex=True,
+        perhaps_even_loooooooooooooooooooooooooooooooooooooong=-1,
+    ):
+        print(2)
+    case a:
+        pass
+
+match(arg)  # comment
+
+match()
+
+match()
+
+case(arg)  # comment
+
+case()
+
+case()
+
+
+re.match(something)  # fast
+re.match()
+match match():
+    case case(
+        arg,  # comment
+    ):
+        pass
diff -pruN 22.3.0-1/tests/data/py_310/pep_572_py310.py 22.6.0-1/tests/data/py_310/pep_572_py310.py
--- 22.3.0-1/tests/data/py_310/pep_572_py310.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/pep_572_py310.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,4 @@
+# Unparenthesized walruses are now allowed in indices since Python 3.10.
+x[a:=0]
+x[a:=0, b:=1]
+x[5, b:=0]
diff -pruN 22.3.0-1/tests/data/py_310/starred_for_target.py 22.6.0-1/tests/data/py_310/starred_for_target.py
--- 22.3.0-1/tests/data/py_310/starred_for_target.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_310/starred_for_target.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,27 @@
+for x in *a, *b:
+    print(x)
+
+for x in a, b, *c:
+    print(x)
+
+for x in *a, b, c:
+    print(x)
+
+for x in *a, b, *c:
+    print(x)
+
+async for x in *a, *b:
+    print(x)
+
+async for x in *a, b, *c:
+    print(x)
+
+async for x in a, b, *c:
+    print(x)
+
+async for x in (
+    *loooooooooooooooooooooong,
+    very,
+    *loooooooooooooooooooooooooooooooooooooooooooooooong,
+):
+    print(x)
diff -pruN 22.3.0-1/tests/data/py_311/pep_646.py 22.6.0-1/tests/data/py_311/pep_646.py
--- 22.3.0-1/tests/data/py_311/pep_646.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_311/pep_646.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,194 @@
+A[*b]
+A[*b] = 1
+A
+del A[*b]
+A
+A[*b, *b]
+A[*b, *b] = 1
+A
+del A[*b, *b]
+A
+A[b, *b]
+A[b, *b] = 1
+A
+del A[b, *b]
+A
+A[*b, b]
+A[*b, b] = 1
+A
+del A[*b, b]
+A
+A[b, b, *b]
+A[b, b, *b] = 1
+A
+del A[b, b, *b]
+A
+A[*b, b, b]
+A[*b, b, b] = 1
+A
+del A[*b, b, b]
+A
+A[b, *b, b]
+A[b, *b, b] = 1
+A
+del A[b, *b, b]
+A
+A[b, b, *b, b]
+A[b, b, *b, b] = 1
+A
+del A[b, b, *b, b]
+A
+A[b, *b, b, b]
+A[b, *b, b, b] = 1
+A
+del A[b, *b, b, b]
+A
+A[A[b, *b, b]]
+A[A[b, *b, b]] = 1
+A
+del A[A[b, *b, b]]
+A
+A[*A[b, *b, b]]
+A[*A[b, *b, b]] = 1
+A
+del A[*A[b, *b, b]]
+A
+A[b, ...]
+A[b, ...] = 1
+A
+del A[b, ...]
+A
+A[*A[b, ...]]
+A[*A[b, ...]] = 1
+A
+del A[*A[b, ...]]
+A
+l = [1, 2, 3]
+A[*l]
+A[*l] = 1
+A
+del A[*l]
+A
+A[*l, 4]
+A[*l, 4] = 1
+A
+del A[*l, 4]
+A
+A[0, *l]
+A[0, *l] = 1
+A
+del A[0, *l]
+A
+A[1:2, *l]
+A[1:2, *l] = 1
+A
+del A[1:2, *l]
+A
+repr(A[1:2, *l]) == repr(A[1:2, 1, 2, 3])
+t = (1, 2, 3)
+A[*t]
+A[*t] = 1
+A
+del A[*t]
+A
+A[*t, 4]
+A[*t, 4] = 1
+A
+del A[*t, 4]
+A
+A[0, *t]
+A[0, *t] = 1
+A
+del A[0, *t]
+A
+A[1:2, *t]
+A[1:2, *t] = 1
+A
+del A[1:2, *t]
+A
+repr(A[1:2, *t]) == repr(A[1:2, 1, 2, 3])
+
+
+def returns_list():
+    return [1, 2, 3]
+
+
+A[returns_list()]
+A[returns_list()] = 1
+A
+del A[returns_list()]
+A
+A[returns_list(), 4]
+A[returns_list(), 4] = 1
+A
+del A[returns_list(), 4]
+A
+A[*returns_list()]
+A[*returns_list()] = 1
+A
+del A[*returns_list()]
+A
+A[*returns_list(), 4]
+A[*returns_list(), 4] = 1
+A
+del A[*returns_list(), 4]
+A
+A[0, *returns_list()]
+A[0, *returns_list()] = 1
+A
+del A[0, *returns_list()]
+A
+A[*returns_list(), *returns_list()]
+A[*returns_list(), *returns_list()] = 1
+A
+del A[*returns_list(), *returns_list()]
+A
+A[1:2, *b]
+A[*b, 1:2]
+A[1:2, *b, 1:2]
+A[*b, 1:2, *b]
+A[1:, *b]
+A[*b, 1:]
+A[1:, *b, 1:]
+A[*b, 1:, *b]
+A[:1, *b]
+A[*b, :1]
+A[:1, *b, :1]
+A[*b, :1, *b]
+A[:, *b]
+A[*b, :]
+A[:, *b, :]
+A[*b, :, *b]
+A[a * b()]
+A[a * b(), *c, *d(), e * f(g * h)]
+A[a * b(), :]
+A[a * b(), *c, *d(), e * f(g * h) :]
+A[[b] * len(c), :]
+
+
+def f1(*args: *b):
+    pass
+
+
+f1.__annotations__
+
+
+def f2(*args: *b, arg1):
+    pass
+
+
+f2.__annotations__
+
+
+def f3(*args: *b, arg1: int):
+    pass
+
+
+f3.__annotations__
+
+
+def f4(*args: *b, arg1: int = 2):
+    pass
+
+
+f4.__annotations__
diff -pruN 22.3.0-1/tests/data/py_311/pep_654.py 22.6.0-1/tests/data/py_311/pep_654.py
--- 22.3.0-1/tests/data/py_311/pep_654.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_311/pep_654.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,53 @@
+try:
+    raise OSError("blah")
+except* ExceptionGroup as e:
+    pass
+
+
+try:
+    async with trio.open_nursery() as nursery:
+        # Make two concurrent calls to child()
+        nursery.start_soon(child)
+        nursery.start_soon(child)
+except* ValueError:
+    pass
+
+try:
+    try:
+        raise ValueError(42)
+    except:
+        try:
+            raise TypeError(int)
+        except* Exception:
+            pass
+        1 / 0
+except Exception as e:
+    exc = e
+
+try:
+    try:
+        raise FalsyEG("eg", [TypeError(1), ValueError(2)])
+    except* TypeError as e:
+        tes = e
+        raise
+    except* ValueError as e:
+        ves = e
+        pass
+except Exception as e:
+    exc = e
+
+try:
+    try:
+        raise orig
+    except* (TypeError, ValueError) as e:
+        raise SyntaxError(3) from e
+except BaseException as e:
+    exc = e
+
+try:
+    try:
+        raise orig
+    except* OSError as e:
+        raise TypeError(3) from e
+except ExceptionGroup as e:
+    exc = e
diff -pruN 22.3.0-1/tests/data/py_311/pep_654_style.py 22.6.0-1/tests/data/py_311/pep_654_style.py
--- 22.3.0-1/tests/data/py_311/pep_654_style.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_311/pep_654_style.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,111 @@
+try:
+    raise OSError("blah")
+except               * ExceptionGroup as e:
+    pass
+
+
+try:
+    async with trio.open_nursery() as nursery:
+        # Make two concurrent calls to child()
+        nursery.start_soon(child)
+        nursery.start_soon(child)
+except *ValueError:
+    pass
+
+try:
+    try:
+        raise ValueError(42)
+    except:
+        try:
+            raise TypeError(int)
+        except *(Exception):
+            pass
+        1 / 0
+except Exception as e:
+    exc = e
+
+try:
+    try:
+        raise FalsyEG("eg", [TypeError(1), ValueError(2)])
+    except \
+        *TypeError as e:
+        tes = e
+        raise
+    except  *  ValueError as e:
+        ves = e
+        pass
+except Exception as e:
+    exc = e
+
+try:
+    try:
+        raise orig
+    except *(TypeError, ValueError, *OTHER_EXCEPTIONS) as e:
+        raise SyntaxError(3) from e
+except BaseException as e:
+    exc = e
+
+try:
+    try:
+        raise orig
+    except\
+        * OSError as e:
+        raise TypeError(3) from e
+except ExceptionGroup as e:
+    exc = e
+
+# output
+
+try:
+    raise OSError("blah")
+except* ExceptionGroup as e:
+    pass
+
+
+try:
+    async with trio.open_nursery() as nursery:
+        # Make two concurrent calls to child()
+        nursery.start_soon(child)
+        nursery.start_soon(child)
+except* ValueError:
+    pass
+
+try:
+    try:
+        raise ValueError(42)
+    except:
+        try:
+            raise TypeError(int)
+        except* (Exception):
+            pass
+        1 / 0
+except Exception as e:
+    exc = e
+
+try:
+    try:
+        raise FalsyEG("eg", [TypeError(1), ValueError(2)])
+    except* TypeError as e:
+        tes = e
+        raise
+    except* ValueError as e:
+        ves = e
+        pass
+except Exception as e:
+    exc = e
+
+try:
+    try:
+        raise orig
+    except* (TypeError, ValueError, *OTHER_EXCEPTIONS) as e:
+        raise SyntaxError(3) from e
+except BaseException as e:
+    exc = e
+
+try:
+    try:
+        raise orig
+    except* OSError as e:
+        raise TypeError(3) from e
+except ExceptionGroup as e:
+    exc = e
diff -pruN 22.3.0-1/tests/data/py_36/numeric_literals.py 22.6.0-1/tests/data/py_36/numeric_literals.py
--- 22.3.0-1/tests/data/py_36/numeric_literals.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_36/numeric_literals.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3.6
+
+x = 123456789
+x = 123456
+x = .1
+x = 1.
+x = 1E+1
+x = 1E-1
+x = 1.000_000_01
+x = 123456789.123456789
+x = 123456789.123456789E123456789
+x = 123456789E123456789
+x = 123456789J
+x = 123456789.123456789J
+x = 0XB1ACC
+x = 0B1011
+x = 0O777
+x = 0.000000006
+x = 10000
+x = 133333
+
+# output
+
+
+#!/usr/bin/env python3.6
+
+x = 123456789
+x = 123456
+x = 0.1
+x = 1.0
+x = 1e1
+x = 1e-1
+x = 1.000_000_01
+x = 123456789.123456789
+x = 123456789.123456789e123456789
+x = 123456789e123456789
+x = 123456789j
+x = 123456789.123456789j
+x = 0xB1ACC
+x = 0b1011
+x = 0o777
+x = 0.000000006
+x = 10000
+x = 133333
diff -pruN 22.3.0-1/tests/data/py_36/numeric_literals_skip_underscores.py 22.6.0-1/tests/data/py_36/numeric_literals_skip_underscores.py
--- 22.3.0-1/tests/data/py_36/numeric_literals_skip_underscores.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_36/numeric_literals_skip_underscores.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3.6
+
+x = 123456789
+x = 1_2_3_4_5_6_7
+x = 1E+1
+x = 0xb1acc
+x = 0.00_00_006
+x = 12_34_567J
+x = .1_2
+x = 1_2.
+
+# output
+
+#!/usr/bin/env python3.6
+
+x = 123456789
+x = 1_2_3_4_5_6_7
+x = 1e1
+x = 0xB1ACC
+x = 0.00_00_006
+x = 12_34_567j
+x = 0.1_2
+x = 1_2.0
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/py_37/python37.py 22.6.0-1/tests/data/py_37/python37.py
--- 22.3.0-1/tests/data/py_37/python37.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_37/python37.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,65 @@
+#!/usr/bin/env python3.7
+
+
+def f():
+    return (i * 2 async for i in arange(42))
+
+
+def g():
+    return (
+        something_long * something_long
+        async for something_long in async_generator(with_an_argument)
+    )
+
+
+async def func():
+    if test:
+        out_batched = [
+            i
+            async for i in aitertools._async_map(
+                self.async_inc, arange(8), batch_size=3
+            )
+        ]
+
+
+def awaited_generator_value(n):
+    return (await awaitable for awaitable in awaitable_list)
+
+
+def make_arange(n):
+    return (i * 2 for i in range(n) if await wrap(i))
+
+
+# output
+
+
+#!/usr/bin/env python3.7
+
+
+def f():
+    return (i * 2 async for i in arange(42))
+
+
+def g():
+    return (
+        something_long * something_long
+        async for something_long in async_generator(with_an_argument)
+    )
+
+
+async def func():
+    if test:
+        out_batched = [
+            i
+            async for i in aitertools._async_map(
+                self.async_inc, arange(8), batch_size=3
+            )
+        ]
+
+
+def awaited_generator_value(n):
+    return (await awaitable for awaitable in awaitable_list)
+
+
+def make_arange(n):
+    return (i * 2 for i in range(n) if await wrap(i))
diff -pruN 22.3.0-1/tests/data/py_38/pep_570.py 22.6.0-1/tests/data/py_38/pep_570.py
--- 22.3.0-1/tests/data/py_38/pep_570.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_38/pep_570.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,44 @@
+def positional_only_arg(a, /):
+    pass
+
+
+def all_markers(a, b, /, c, d, *, e, f):
+    pass
+
+
+def all_markers_with_args_and_kwargs(
+    a_long_one,
+    b_long_one,
+    /,
+    c_long_one,
+    d_long_one,
+    *args,
+    e_long_one,
+    f_long_one,
+    **kwargs,
+):
+    pass
+
+
+def all_markers_with_defaults(a, b=1, /, c=2, d=3, *, e=4, f=5):
+    pass
+
+
+def long_one_with_long_parameter_names(
+    but_all_of_them,
+    are_positional_only,
+    arguments_mmmmkay,
+    so_this_is_only_valid_after,
+    three_point_eight,
+    /,
+):
+    pass
+
+
+lambda a, /: a
+
+lambda a, b, /, c, d, *, e, f: a
+
+lambda a, b, /, c, d, *args, e, f, **kwargs: args
+
+lambda a, b=1, /, c=2, d=3, *, e=4, f=5: 1
diff -pruN 22.3.0-1/tests/data/py_38/pep_572.py 22.6.0-1/tests/data/py_38/pep_572.py
--- 22.3.0-1/tests/data/py_38/pep_572.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_38/pep_572.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,47 @@
+(a := 1)
+(a := a)
+if (match := pattern.search(data)) is None:
+    pass
+if match := pattern.search(data):
+    pass
+[y := f(x), y**2, y**3]
+filtered_data = [y for x in data if (y := f(x)) is None]
+(y := f(x))
+y0 = (y1 := f(x))
+foo(x=(y := f(x)))
+
+
+def foo(answer=(p := 42)):
+    pass
+
+
+def foo(answer: (p := 42) = 5):
+    pass
+
+
+lambda: (x := 1)
+(x := lambda: 1)
+(x := lambda: (y := 1))
+lambda line: (m := re.match(pattern, line)) and m.group(1)
+x = (y := 0)
+(z := (y := (x := 0)))
+(info := (name, phone, *rest))
+(x := 1, 2)
+(total := total + tax)
+len(lines := f.readlines())
+foo(x := 3, cat="vector")
+foo(cat=(category := "vector"))
+if any(len(longline := l) >= 100 for l in lines):
+    print(longline)
+if env_base := os.environ.get("PYTHONUSERBASE", None):
+    return env_base
+if self._is_special and (ans := self._check_nans(context=context)):
+    return ans
+foo(b := 2, a=1)
+foo((b := 2), a=1)
+foo(c=(b := 2), a=1)
+
+while x := f(x):
+    pass
+while x := f(x):
+    pass
diff -pruN 22.3.0-1/tests/data/py_38/pep_572_remove_parens.py 22.6.0-1/tests/data/py_38/pep_572_remove_parens.py
--- 22.3.0-1/tests/data/py_38/pep_572_remove_parens.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_38/pep_572_remove_parens.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,105 @@
+if (foo := 0):
+    pass
+
+if (foo := 1):
+    pass
+
+if (y := 5 + 5):
+    pass
+
+y = (x := 0)
+
+y += (x := 0)
+
+(y := 5 + 5)
+
+test: int = (test2 := 2)
+
+a, b = (test := (1, 2))
+
+# see also https://github.com/psf/black/issues/2139
+assert (foo := 42 - 12)
+
+foo(x=(y := f(x)))
+
+
+def foo(answer=(p := 42)):
+    ...
+
+
+def foo2(answer: (p := 42) = 5):
+    ...
+
+
+lambda: (x := 1)
+
+a[(x := 12)]
+a[:(x := 13)]
+
+# we don't touch expressions in f-strings but if we do one day, don't break 'em
+f'{(x:=10)}'
+
+
+def a():
+    return (x := 3)
+    await (b := 1)
+    yield (a := 2)
+    raise (c := 3)
+
+def this_is_so_dumb() -> (please := no):
+    pass
+
+
+# output
+if foo := 0:
+    pass
+
+if foo := 1:
+    pass
+
+if y := 5 + 5:
+    pass
+
+y = (x := 0)
+
+y += (x := 0)
+
+(y := 5 + 5)
+
+test: int = (test2 := 2)
+
+a, b = (test := (1, 2))
+
+# see also https://github.com/psf/black/issues/2139
+assert (foo := 42 - 12)
+
+foo(x=(y := f(x)))
+
+
+def foo(answer=(p := 42)):
+    ...
+
+
+def foo2(answer: (p := 42) = 5):
+    ...
+
+
+lambda: (x := 1)
+
+a[(x := 12)]
+a[:(x := 13)]
+
+# we don't touch expressions in f-strings but if we do one day, don't break 'em
+f"{(x:=10)}"
+
+
+def a():
+    return (x := 3)
+    await (b := 1)
+    yield (a := 2)
+    raise (c := 3)
+
+
+def this_is_so_dumb() -> (please := no):
+    pass
+
diff -pruN 22.3.0-1/tests/data/py_38/python38.py 22.6.0-1/tests/data/py_38/python38.py
--- 22.3.0-1/tests/data/py_38/python38.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_38/python38.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3.8
+
+
+def starred_return():
+    my_list = ["value2", "value3"]
+    return "value1", *my_list
+
+
+def starred_yield():
+    my_list = ["value2", "value3"]
+    yield "value1", *my_list
+
+
+# all right hand side expressions allowed in regular assignments are now also allowed in
+# annotated assignments
+a : Tuple[ str, int] = "1", 2
+a: Tuple[int , ... ] = b,  *c, d
+def t():
+    a : str =  yield "a"
+
+
+# output
+
+
+#!/usr/bin/env python3.8
+
+
+def starred_return():
+    my_list = ["value2", "value3"]
+    return "value1", *my_list
+
+
+def starred_yield():
+    my_list = ["value2", "value3"]
+    yield "value1", *my_list
+
+
+# all right hand side expressions allowed in regular assignments are now also allowed in
+# annotated assignments
+a: Tuple[str, int] = "1", 2
+a: Tuple[int, ...] = b, *c, d
+
+
+def t():
+    a: str = yield "a"
diff -pruN 22.3.0-1/tests/data/py_39/pep_572_py39.py 22.6.0-1/tests/data/py_39/pep_572_py39.py
--- 22.3.0-1/tests/data/py_39/pep_572_py39.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_39/pep_572_py39.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,7 @@
+# Unparenthesized walruses are now allowed in set literals & set comprehensions
+# since Python 3.9
+{x := 1, 2, 3}
+{x4 := x**5 for x in range(7)}
+# We better not remove the parentheses here (since it's a 3.10 feature)
+x[(a := 1)]
+x[(a := 1), (b := 3)]
diff -pruN 22.3.0-1/tests/data/py_39/python39.py 22.6.0-1/tests/data/py_39/python39.py
--- 22.3.0-1/tests/data/py_39/python39.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/py_39/python39.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3.9
+
+@relaxed_decorator[0]
+def f():
+    ...
+
+@relaxed_decorator[extremely_long_name_that_definitely_will_not_fit_on_one_line_of_standard_length]
+def f():
+    ...
+
+@extremely_long_variable_name_that_doesnt_fit := complex.expression(with_long="arguments_value_that_wont_fit_at_the_end_of_the_line")
+def f():
+    ...
+
+# output
+
+
+#!/usr/bin/env python3.9
+
+
+@relaxed_decorator[0]
+def f():
+    ...
+
+
+@relaxed_decorator[
+    extremely_long_name_that_definitely_will_not_fit_on_one_line_of_standard_length
+]
+def f():
+    ...
+
+
+@extremely_long_variable_name_that_doesnt_fit := complex.expression(
+    with_long="arguments_value_that_wont_fit_at_the_end_of_the_line"
+)
+def f():
+    ...
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/python2_detection.py 22.6.0-1/tests/data/python2_detection.py
--- 22.3.0-1/tests/data/python2_detection.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/python2_detection.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,90 +0,0 @@
-# This uses a similar construction to the decorators.py test data file FYI.
-
-print "hello, world!"
-
-###
-
-exec "print('hello, world!')"
-
-###
-
-def set_position((x, y), value):
-    pass
-
-###
-
-try:
-    pass
-except Exception, err:
-    pass
-
-###
-
-raise RuntimeError, "I feel like crashing today :p"
-
-###
-
-`wow_these_really_did_exist`
-
-###
-
-10L
-
-###
-
-10l
-
-###
-
-0123
-
-# output
-
-print("hello python three!")
-
-###
-
-exec("I'm not sure if you can use exec like this but that's not important here!")
-
-###
-
-try:
-    pass
-except make_exception(1, 2):
-    pass
-
-###
-
-try:
-    pass
-except Exception as err:
-    pass
-
-###
-
-raise RuntimeError(make_msg(1, 2))
-
-###
-
-raise RuntimeError("boom!",)
-
-###
-
-def set_position(x, y, value):
-    pass
-
-###
-
-10
-
-###
-
-0
-
-###
-
-000
-
-###
-
-0o12
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/python37.py 22.6.0-1/tests/data/python37.py
--- 22.3.0-1/tests/data/python37.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/python37.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,65 +0,0 @@
-#!/usr/bin/env python3.7
-
-
-def f():
-    return (i * 2 async for i in arange(42))
-
-
-def g():
-    return (
-        something_long * something_long
-        async for something_long in async_generator(with_an_argument)
-    )
-
-
-async def func():
-    if test:
-        out_batched = [
-            i
-            async for i in aitertools._async_map(
-                self.async_inc, arange(8), batch_size=3
-            )
-        ]
-
-
-def awaited_generator_value(n):
-    return (await awaitable for awaitable in awaitable_list)
-
-
-def make_arange(n):
-    return (i * 2 for i in range(n) if await wrap(i))
-
-
-# output
-
-
-#!/usr/bin/env python3.7
-
-
-def f():
-    return (i * 2 async for i in arange(42))
-
-
-def g():
-    return (
-        something_long * something_long
-        async for something_long in async_generator(with_an_argument)
-    )
-
-
-async def func():
-    if test:
-        out_batched = [
-            i
-            async for i in aitertools._async_map(
-                self.async_inc, arange(8), batch_size=3
-            )
-        ]
-
-
-def awaited_generator_value(n):
-    return (await awaitable for awaitable in awaitable_list)
-
-
-def make_arange(n):
-    return (i * 2 for i in range(n) if await wrap(i))
diff -pruN 22.3.0-1/tests/data/python38.py 22.6.0-1/tests/data/python38.py
--- 22.3.0-1/tests/data/python38.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/python38.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3.8
-
-
-def starred_return():
-    my_list = ["value2", "value3"]
-    return "value1", *my_list
-
-
-def starred_yield():
-    my_list = ["value2", "value3"]
-    yield "value1", *my_list
-
-
-# all right hand side expressions allowed in regular assignments are now also allowed in
-# annotated assignments
-a : Tuple[ str, int] = "1", 2
-a: Tuple[int , ... ] = b,  *c, d
-def t():
-    a : str =  yield "a"
-
-
-# output
-
-
-#!/usr/bin/env python3.8
-
-
-def starred_return():
-    my_list = ["value2", "value3"]
-    return "value1", *my_list
-
-
-def starred_yield():
-    my_list = ["value2", "value3"]
-    yield "value1", *my_list
-
-
-# all right hand side expressions allowed in regular assignments are now also allowed in
-# annotated assignments
-a: Tuple[str, int] = "1", 2
-a: Tuple[int, ...] = b, *c, d
-
-
-def t():
-    a: str = yield "a"
diff -pruN 22.3.0-1/tests/data/python39.py 22.6.0-1/tests/data/python39.py
--- 22.3.0-1/tests/data/python39.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/python39.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/env python3.9
-
-@relaxed_decorator[0]
-def f():
-    ...
-
-@relaxed_decorator[extremely_long_name_that_definitely_will_not_fit_on_one_line_of_standard_length]
-def f():
-    ...
-
-@extremely_long_variable_name_that_doesnt_fit := complex.expression(with_long="arguments_value_that_wont_fit_at_the_end_of_the_line")
-def f():
-    ...
-
-# output
-
-
-#!/usr/bin/env python3.9
-
-
-@relaxed_decorator[0]
-def f():
-    ...
-
-
-@relaxed_decorator[
-    extremely_long_name_that_definitely_will_not_fit_on_one_line_of_standard_length
-]
-def f():
-    ...
-
-
-@extremely_long_variable_name_that_doesnt_fit := complex.expression(
-    with_long="arguments_value_that_wont_fit_at_the_end_of_the_line"
-)
-def f():
-    ...
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/remove_except_parens.py 22.6.0-1/tests/data/remove_except_parens.py
--- 22.3.0-1/tests/data/remove_except_parens.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/remove_except_parens.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,79 +0,0 @@
-# These brackets are redundant, therefore remove.
-try:
-    a.something
-except (AttributeError) as err:
-    raise err
-
-# This is tuple of exceptions.
-# Although this could be replaced with just the exception,
-# we do not remove brackets to preserve AST.
-try:
-    a.something
-except (AttributeError,) as err:
-    raise err
-
-# This is a tuple of exceptions. Do not remove brackets.
-try:
-    a.something
-except (AttributeError, ValueError) as err:
-    raise err
-
-# Test long variants.
-try:
-    a.something
-except (some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error) as err:
-    raise err
-
-try:
-    a.something
-except (some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,) as err:
-    raise err
-
-try:
-    a.something
-except (some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error, some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error) as err:
-    raise err
-
-# output
-# These brackets are redundant, therefore remove.
-try:
-    a.something
-except AttributeError as err:
-    raise err
-
-# This is tuple of exceptions.
-# Although this could be replaced with just the exception,
-# we do not remove brackets to preserve AST.
-try:
-    a.something
-except (AttributeError,) as err:
-    raise err
-
-# This is a tuple of exceptions. Do not remove brackets.
-try:
-    a.something
-except (AttributeError, ValueError) as err:
-    raise err
-
-# Test long variants.
-try:
-    a.something
-except (
-    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error
-) as err:
-    raise err
-
-try:
-    a.something
-except (
-    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,
-) as err:
-    raise err
-
-try:
-    a.something
-except (
-    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,
-    some.really.really.really.looooooooooooooooooooooooooooooooong.module.over89.chars.Error,
-) as err:
-    raise err
diff -pruN 22.3.0-1/tests/data/remove_for_brackets.py 22.6.0-1/tests/data/remove_for_brackets.py
--- 22.3.0-1/tests/data/remove_for_brackets.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/remove_for_brackets.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,40 +0,0 @@
-# Only remove tuple brackets after `for`
-for (k, v) in d.items():
-    print(k, v)
-
-# Don't touch tuple brackets after `in`
-for module in (core, _unicodefun):
-    if hasattr(module, "_verify_python3_env"):
-        module._verify_python3_env = lambda: None
-
-# Brackets remain for long for loop lines
-for (why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long, i_dont_know_but_we_should_still_check_the_behaviour_if_they_do) in d.items():
-    print(k, v)
-
-for (k, v) in dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items():
-    print(k, v)
-
-# output
-# Only remove tuple brackets after `for`
-for k, v in d.items():
-    print(k, v)
-
-# Don't touch tuple brackets after `in`
-for module in (core, _unicodefun):
-    if hasattr(module, "_verify_python3_env"):
-        module._verify_python3_env = lambda: None
-
-# Brackets remain for long for loop lines
-for (
-    why_would_anyone_choose_to_name_a_loop_variable_with_a_name_this_long,
-    i_dont_know_but_we_should_still_check_the_behaviour_if_they_do,
-) in d.items():
-    print(k, v)
-
-for (
-    k,
-    v,
-) in (
-    dfkasdjfldsjflkdsjflkdsjfdslkfjldsjfgkjdshgkljjdsfldgkhsdofudsfudsofajdslkfjdslkfjldisfjdffjsdlkfjdlkjjkdflskadjldkfjsalkfjdasj.items()
-):
-    print(k, v)
diff -pruN 22.3.0-1/tests/data/remove_parens.py 22.6.0-1/tests/data/remove_parens.py
--- 22.3.0-1/tests/data/remove_parens.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/remove_parens.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,142 +0,0 @@
-x = (1)
-x = (1.2)
-
-data = (
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-).encode()
-
-async def show_status():
-    while True:
-        try:
-            if report_host:
-                data = (
-                   f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-               ).encode()
-        except Exception as e:
-            pass
-
-def example():
-    return (("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
-
-
-def example1():
-    return ((1111111111111111111111111111111111111111111111111111111111111111111111111111111111111))
-
-
-def example1point5():
-    return ((((((1111111111111111111111111111111111111111111111111111111111111111111111111111111111111))))))
-
-
-def example2():
-    return (("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
-
-
-def example3():
-    return ((1111111111111111111111111111111111111111111111111111111111111111111111111111111))
-
-
-def example4():
-    return ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((True))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
-
-
-def example5():
-    return ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
-
-
-def example6():
-    return ((((((((({a:a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]})))))))))
-
-
-def example7():
-    return ((((((((({a:a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20000000000000000000]})))))))))
-
-
-def example8():
-    return (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((None)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
-
-# output
-x = 1
-x = 1.2
-
-data = (
-    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-).encode()
-
-
-async def show_status():
-    while True:
-        try:
-            if report_host:
-                data = (
-                    f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-                ).encode()
-        except Exception as e:
-            pass
-
-
-def example():
-    return "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-
-
-def example1():
-    return 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-
-
-def example1point5():
-    return 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-
-
-def example2():
-    return (
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-    )
-
-
-def example3():
-    return (
-        1111111111111111111111111111111111111111111111111111111111111111111111111111111
-    )
-
-
-def example4():
-    return True
-
-
-def example5():
-    return ()
-
-
-def example6():
-    return {a: a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]}
-
-
-def example7():
-    return {
-        a: a
-        for a in [
-            1,
-            2,
-            3,
-            4,
-            5,
-            6,
-            7,
-            8,
-            9,
-            10,
-            11,
-            12,
-            13,
-            14,
-            15,
-            16,
-            17,
-            18,
-            19,
-            20000000000000000000,
-        ]
-    }
-
-
-def example8():
-    return None
diff -pruN 22.3.0-1/tests/data/simple_cases/attribute_access_on_number_literals.py 22.6.0-1/tests/data/simple_cases/attribute_access_on_number_literals.py
--- 22.3.0-1/tests/data/simple_cases/attribute_access_on_number_literals.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/attribute_access_on_number_literals.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,47 @@
+x = 123456789 .bit_count()
+x = (123456).__abs__()
+x = .1.is_integer()
+x = 1. .imag
+x = 1E+1.imag
+x = 1E-1.real
+x = 123456789.123456789.hex()
+x = 123456789.123456789E123456789 .real
+x = 123456789E123456789 .conjugate()
+x = 123456789J.real
+x = 123456789.123456789J.__add__(0b1011.bit_length())
+x = 0XB1ACC.conjugate()
+x = 0B1011 .conjugate()
+x = 0O777 .real
+x = 0.000000006  .hex()
+x = -100.0000J
+
+if 10 .real:
+    ...
+
+y = 100[no]
+y = 100(no)
+
+# output
+
+x = (123456789).bit_count()
+x = (123456).__abs__()
+x = (0.1).is_integer()
+x = (1.0).imag
+x = (1e1).imag
+x = (1e-1).real
+x = (123456789.123456789).hex()
+x = (123456789.123456789e123456789).real
+x = (123456789e123456789).conjugate()
+x = 123456789j.real
+x = 123456789.123456789j.__add__(0b1011.bit_length())
+x = 0xB1ACC.conjugate()
+x = 0b1011.conjugate()
+x = 0o777.real
+x = (0.000000006).hex()
+x = -100.0000j
+
+if (10).real:
+    ...
+
+y = 100[no]
+y = 100(no)
diff -pruN 22.3.0-1/tests/data/simple_cases/beginning_backslash.py 22.6.0-1/tests/data/simple_cases/beginning_backslash.py
--- 22.3.0-1/tests/data/simple_cases/beginning_backslash.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/beginning_backslash.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,12 @@
+\
+
+
+
+
+
+print("hello, world")
+
+# output
+
+
+print("hello, world")
diff -pruN 22.3.0-1/tests/data/simple_cases/bracketmatch.py 22.6.0-1/tests/data/simple_cases/bracketmatch.py
--- 22.3.0-1/tests/data/simple_cases/bracketmatch.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/bracketmatch.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,15 @@
+for ((x in {}) or {})['a'] in x:
+    pass
+pem_spam = lambda l, spam = {
+    "x": 3
+}: not spam.get(l.strip())
+lambda x=lambda y={1: 3}: y['x':lambda y: {1: 2}]: x
+
+
+# output
+
+
+for ((x in {}) or {})["a"] in x:
+    pass
+pem_spam = lambda l, spam={"x": 3}: not spam.get(l.strip())
+lambda x=lambda y={1: 3}: y["x" : lambda y: {1: 2}]: x
diff -pruN 22.3.0-1/tests/data/simple_cases/class_blank_parentheses.py 22.6.0-1/tests/data/simple_cases/class_blank_parentheses.py
--- 22.3.0-1/tests/data/simple_cases/class_blank_parentheses.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/class_blank_parentheses.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,58 @@
+class SimpleClassWithBlankParentheses():
+    pass
+class ClassWithSpaceParentheses ( ):
+    first_test_data = 90
+    second_test_data = 100
+    def test_func(self):
+        return None
+class ClassWithEmptyFunc(object):
+
+    def func_with_blank_parentheses():
+        return 5
+
+
+def public_func_with_blank_parentheses():
+    return None
+def class_under_the_func_with_blank_parentheses():
+    class InsideFunc():
+        pass
+class NormalClass (
+):
+    def func_for_testing(self, first, second):
+        sum = first + second
+        return sum
+
+
+# output
+
+
+class SimpleClassWithBlankParentheses:
+    pass
+
+
+class ClassWithSpaceParentheses:
+    first_test_data = 90
+    second_test_data = 100
+
+    def test_func(self):
+        return None
+
+
+class ClassWithEmptyFunc(object):
+    def func_with_blank_parentheses():
+        return 5
+
+
+def public_func_with_blank_parentheses():
+    return None
+
+
+def class_under_the_func_with_blank_parentheses():
+    class InsideFunc:
+        pass
+
+
+class NormalClass:
+    def func_for_testing(self, first, second):
+        sum = first + second
+        return sum
diff -pruN 22.3.0-1/tests/data/simple_cases/class_methods_new_line.py 22.6.0-1/tests/data/simple_cases/class_methods_new_line.py
--- 22.3.0-1/tests/data/simple_cases/class_methods_new_line.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/class_methods_new_line.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,270 @@
+class ClassSimplest:
+    pass
+class ClassWithSingleField:
+    a = 1
+class ClassWithJustTheDocstring:
+    """Just a docstring."""
+class ClassWithInit:
+    def __init__(self):
+        pass
+class ClassWithTheDocstringAndInit:
+    """Just a docstring."""
+    def __init__(self):
+        pass
+class ClassWithInitAndVars:
+    cls_var = 100
+    def __init__(self):
+        pass
+class ClassWithInitAndVarsAndDocstring:
+    """Test class"""
+    cls_var = 100
+    def __init__(self):
+        pass
+class ClassWithDecoInit:
+    @deco
+    def __init__(self):
+        pass
+class ClassWithDecoInitAndVars:
+    cls_var = 100
+    @deco
+    def __init__(self):
+        pass
+class ClassWithDecoInitAndVarsAndDocstring:
+    """Test class"""
+    cls_var = 100
+    @deco
+    def __init__(self):
+        pass
+class ClassSimplestWithInner:
+    class Inner:
+        pass
+class ClassSimplestWithInnerWithDocstring:
+    class Inner:
+        """Just a docstring."""
+        def __init__(self):
+            pass
+class ClassWithSingleFieldWithInner:
+    a = 1
+    class Inner:
+        pass
+class ClassWithJustTheDocstringWithInner:
+    """Just a docstring."""
+    class Inner:
+        pass
+class ClassWithInitWithInner:
+    class Inner:
+        pass
+    def __init__(self):
+        pass
+class ClassWithInitAndVarsWithInner:
+    cls_var = 100
+    class Inner:
+        pass
+    def __init__(self):
+        pass
+class ClassWithInitAndVarsAndDocstringWithInner:
+    """Test class"""
+    cls_var = 100
+    class Inner:
+        pass
+    def __init__(self):
+        pass
+class ClassWithDecoInitWithInner:
+    class Inner:
+        pass
+    @deco
+    def __init__(self):
+        pass
+class ClassWithDecoInitAndVarsWithInner:
+    cls_var = 100
+    class Inner:
+        pass
+    @deco
+    def __init__(self):
+        pass
+class ClassWithDecoInitAndVarsAndDocstringWithInner:
+    """Test class"""
+    cls_var = 100
+    class Inner:
+        pass
+    @deco
+    def __init__(self):
+        pass
+class ClassWithDecoInitAndVarsAndDocstringWithInner2:
+    """Test class"""
+    class Inner:
+        pass
+    cls_var = 100
+    @deco
+    def __init__(self):
+        pass
+
+
+# output
+
+
+class ClassSimplest:
+    pass
+
+
+class ClassWithSingleField:
+    a = 1
+
+
+class ClassWithJustTheDocstring:
+    """Just a docstring."""
+
+
+class ClassWithInit:
+    def __init__(self):
+        pass
+
+
+class ClassWithTheDocstringAndInit:
+    """Just a docstring."""
+
+    def __init__(self):
+        pass
+
+
+class ClassWithInitAndVars:
+    cls_var = 100
+
+    def __init__(self):
+        pass
+
+
+class ClassWithInitAndVarsAndDocstring:
+    """Test class"""
+
+    cls_var = 100
+
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInit:
+    @deco
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInitAndVars:
+    cls_var = 100
+
+    @deco
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInitAndVarsAndDocstring:
+    """Test class"""
+
+    cls_var = 100
+
+    @deco
+    def __init__(self):
+        pass
+
+
+class ClassSimplestWithInner:
+    class Inner:
+        pass
+
+
+class ClassSimplestWithInnerWithDocstring:
+    class Inner:
+        """Just a docstring."""
+
+        def __init__(self):
+            pass
+
+
+class ClassWithSingleFieldWithInner:
+    a = 1
+
+    class Inner:
+        pass
+
+
+class ClassWithJustTheDocstringWithInner:
+    """Just a docstring."""
+
+    class Inner:
+        pass
+
+
+class ClassWithInitWithInner:
+    class Inner:
+        pass
+
+    def __init__(self):
+        pass
+
+
+class ClassWithInitAndVarsWithInner:
+    cls_var = 100
+
+    class Inner:
+        pass
+
+    def __init__(self):
+        pass
+
+
+class ClassWithInitAndVarsAndDocstringWithInner:
+    """Test class"""
+
+    cls_var = 100
+
+    class Inner:
+        pass
+
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInitWithInner:
+    class Inner:
+        pass
+
+    @deco
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInitAndVarsWithInner:
+    cls_var = 100
+
+    class Inner:
+        pass
+
+    @deco
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInitAndVarsAndDocstringWithInner:
+    """Test class"""
+
+    cls_var = 100
+
+    class Inner:
+        pass
+
+    @deco
+    def __init__(self):
+        pass
+
+
+class ClassWithDecoInitAndVarsAndDocstringWithInner2:
+    """Test class"""
+
+    class Inner:
+        pass
+
+    cls_var = 100
+
+    @deco
+    def __init__(self):
+        pass
diff -pruN 22.3.0-1/tests/data/simple_cases/collections.py 22.6.0-1/tests/data/simple_cases/collections.py
--- 22.3.0-1/tests/data/simple_cases/collections.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/collections.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,174 @@
+import core, time, a
+
+from . import A, B, C
+
+# keeps existing trailing comma
+from foo import (
+    bar,
+)
+
+# also keeps existing structure
+from foo import (
+    baz,
+    qux,
+)
+
+# `as` works as well
+from foo import (
+    xyzzy as magic,
+)
+
+a = {1,2,3,}
+b = {
+1,2,
+     3}
+c = {
+    1,
+    2,
+    3,
+}
+x = 1,
+y = narf(),
+nested = {(1,2,3),(4,5,6),}
+nested_no_trailing_comma = {(1,2,3),(4,5,6)}
+nested_long_lines = ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "cccccccccccccccccccccccccccccccccccccccc", (1, 2, 3), "dddddddddddddddddddddddddddddddddddddddd"]
+{"oneple": (1,),}
+{"oneple": (1,)}
+['ls', 'lsoneple/%s' % (foo,)]
+x = {"oneple": (1,)}
+y = {"oneple": (1,),}
+assert False, ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wraps %s" % bar)
+
+# looping over a 1-tuple should also not get wrapped
+for x in (1,):
+    pass
+for (x,) in (1,), (2,), (3,):
+    pass
+
+[1, 2, 3,]
+
+division_result_tuple = (6/2,)
+print("foo %r", (foo.bar,))
+
+if True:
+    IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING = (
+        Config.IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING
+        | {pylons.controllers.WSGIController}
+    )
+
+if True:
+    ec2client.get_waiter('instance_stopped').wait(
+        InstanceIds=[instance.id],
+        WaiterConfig={
+            'Delay': 5,
+        })
+    ec2client.get_waiter("instance_stopped").wait(
+        InstanceIds=[instance.id],
+        WaiterConfig={"Delay": 5,},
+    )
+    ec2client.get_waiter("instance_stopped").wait(
+        InstanceIds=[instance.id], WaiterConfig={"Delay": 5,},
+    )
+
+# output
+
+
+import core, time, a
+
+from . import A, B, C
+
+# keeps existing trailing comma
+from foo import (
+    bar,
+)
+
+# also keeps existing structure
+from foo import (
+    baz,
+    qux,
+)
+
+# `as` works as well
+from foo import (
+    xyzzy as magic,
+)
+
+a = {
+    1,
+    2,
+    3,
+}
+b = {1, 2, 3}
+c = {
+    1,
+    2,
+    3,
+}
+x = (1,)
+y = (narf(),)
+nested = {
+    (1, 2, 3),
+    (4, 5, 6),
+}
+nested_no_trailing_comma = {(1, 2, 3), (4, 5, 6)}
+nested_long_lines = [
+    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+    "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
+    "cccccccccccccccccccccccccccccccccccccccc",
+    (1, 2, 3),
+    "dddddddddddddddddddddddddddddddddddddddd",
+]
+{
+    "oneple": (1,),
+}
+{"oneple": (1,)}
+["ls", "lsoneple/%s" % (foo,)]
+x = {"oneple": (1,)}
+y = {
+    "oneple": (1,),
+}
+assert False, (
+    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa wraps %s"
+    % bar
+)
+
+# looping over a 1-tuple should also not get wrapped
+for x in (1,):
+    pass
+for (x,) in (1,), (2,), (3,):
+    pass
+
+[
+    1,
+    2,
+    3,
+]
+
+division_result_tuple = (6 / 2,)
+print("foo %r", (foo.bar,))
+
+if True:
+    IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING = (
+        Config.IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING
+        | {pylons.controllers.WSGIController}
+    )
+
+if True:
+    ec2client.get_waiter("instance_stopped").wait(
+        InstanceIds=[instance.id],
+        WaiterConfig={
+            "Delay": 5,
+        },
+    )
+    ec2client.get_waiter("instance_stopped").wait(
+        InstanceIds=[instance.id],
+        WaiterConfig={
+            "Delay": 5,
+        },
+    )
+    ec2client.get_waiter("instance_stopped").wait(
+        InstanceIds=[instance.id],
+        WaiterConfig={
+            "Delay": 5,
+        },
+    )
diff -pruN 22.3.0-1/tests/data/simple_cases/comment_after_escaped_newline.py 22.6.0-1/tests/data/simple_cases/comment_after_escaped_newline.py
--- 22.3.0-1/tests/data/simple_cases/comment_after_escaped_newline.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comment_after_escaped_newline.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,18 @@
+def bob(): \
+         # pylint: disable=W9016
+    pass
+
+
+def bobtwo(): \
+    \
+  # some comment here
+    pass
+
+# output
+
+def bob():  # pylint: disable=W9016
+    pass
+
+
+def bobtwo():  # some comment here
+    pass
diff -pruN 22.3.0-1/tests/data/simple_cases/comments2.py 22.6.0-1/tests/data/simple_cases/comments2.py
--- 22.3.0-1/tests/data/simple_cases/comments2.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments2.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,342 @@
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent  # NOT DRY
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent as component  # DRY
+)
+
+# Please keep __all__ alphabetized within each category.
+
+__all__ = [
+    # Super-special typing primitives.
+    'Any',
+    'Callable',
+    'ClassVar',
+
+    # ABCs (from collections.abc).
+    'AbstractSet',  # collections.abc.Set.
+    'ByteString',
+    'Container',
+
+    # Concrete collection types.
+    'Counter',
+    'Deque',
+    'Dict',
+    'DefaultDict',
+    'List',
+    'Set',
+    'FrozenSet',
+    'NamedTuple',  # Not really a type.
+    'Generator',
+]
+
+not_shareables = [
+    # singletons
+    True,
+    False,
+    NotImplemented, ...,
+    # builtin types and objects
+    type,
+    object,
+    object(),
+    Exception(),
+    42,
+    100.0,
+    "spam",
+    # user-defined types and objects
+    Cheese,
+    Cheese("Wensleydale"),
+    SubBytes(b"spam"),
+]
+
+if 'PYTHON' in os.environ:
+    add_compiler(compiler_from_env())
+else:
+    # for compiler in compilers.values():
+         # add_compiler(compiler)
+    add_compiler(compilers[(7.0, 32)])
+    # add_compiler(compilers[(7.1, 64)])
+
+# Comment before function.
+def inline_comments_in_brackets_ruin_everything():
+    if typedargslist:
+        parameters.children = [
+            children[0],  # (1
+            body,
+            children[-1]  # )1
+        ]
+        parameters.children = [
+            children[0],
+            body,
+            children[-1],  # type: ignore
+        ]
+    else:
+        parameters.children = [
+            parameters.children[0],  # (2 what if this was actually long
+            body,
+            parameters.children[-1],  # )2
+        ]
+        parameters.children = [parameters.what_if_this_was_actually_long.children[0], body, parameters.children[-1]]  # type: ignore
+    if (self._proc is not None
+            # has the child process finished?
+            and self._returncode is None
+            # the child process has finished, but the
+            # transport hasn't been notified yet?
+            and self._proc.poll() is None):
+        pass
+    # no newline before or after
+    short = [
+     # one
+     1,
+     # two
+     2]
+
+    # no newline after
+    call(arg1, arg2, """
+short
+""", arg3=True)
+
+    ############################################################################
+
+    call2(
+    #short
+    arg1,
+    #but
+    arg2,
+    #multiline
+    """
+short
+""",
+    # yup
+    arg3=True)
+    lcomp = [
+        element  # yup
+        for element in collection  # yup
+        if element is not None  # right
+    ]
+    lcomp2 = [
+        # hello
+        element
+        # yup
+        for element in collection
+        # right
+        if element is not None
+    ]
+    lcomp3 = [
+        # This one is actually too long to fit in a single line.
+        element.split('\n', 1)[0]
+        # yup
+        for element in collection.select_elements()
+        # right
+        if element is not None
+    ]
+    while True:
+        if False:
+            continue
+
+            # and round and round we go
+        # and round and round we go
+
+   # let's return
+    return Node(
+        syms.simple_stmt,
+        [
+            Node(statement, result),
+            Leaf(token.NEWLINE, '\n')  # FIXME: \r\n?
+        ],
+    )
+
+CONFIG_FILES = [CONFIG_FILE, ] + SHARED_CONFIG_FILES + USER_CONFIG_FILES  # type: Final
+
+class Test:
+    def _init_host(self, parsed) -> None:
+        if (parsed.hostname is None or  # type: ignore
+                not parsed.hostname.strip()):
+            pass
+
+#######################
+### SECTION COMMENT ###
+#######################
+
+
+instruction()#comment with bad spacing
+
+# END COMMENTS
+# MORE END COMMENTS
+
+
+# output
+
+
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent,  # NOT DRY
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent as component,  # DRY
+)
+
+# Please keep __all__ alphabetized within each category.
+
+__all__ = [
+    # Super-special typing primitives.
+    "Any",
+    "Callable",
+    "ClassVar",
+    # ABCs (from collections.abc).
+    "AbstractSet",  # collections.abc.Set.
+    "ByteString",
+    "Container",
+    # Concrete collection types.
+    "Counter",
+    "Deque",
+    "Dict",
+    "DefaultDict",
+    "List",
+    "Set",
+    "FrozenSet",
+    "NamedTuple",  # Not really a type.
+    "Generator",
+]
+
+not_shareables = [
+    # singletons
+    True,
+    False,
+    NotImplemented,
+    ...,
+    # builtin types and objects
+    type,
+    object,
+    object(),
+    Exception(),
+    42,
+    100.0,
+    "spam",
+    # user-defined types and objects
+    Cheese,
+    Cheese("Wensleydale"),
+    SubBytes(b"spam"),
+]
+
+if "PYTHON" in os.environ:
+    add_compiler(compiler_from_env())
+else:
+    # for compiler in compilers.values():
+    # add_compiler(compiler)
+    add_compiler(compilers[(7.0, 32)])
+    # add_compiler(compilers[(7.1, 64)])
+
+# Comment before function.
+def inline_comments_in_brackets_ruin_everything():
+    if typedargslist:
+        parameters.children = [children[0], body, children[-1]]  # (1  # )1
+        parameters.children = [
+            children[0],
+            body,
+            children[-1],  # type: ignore
+        ]
+    else:
+        parameters.children = [
+            parameters.children[0],  # (2 what if this was actually long
+            body,
+            parameters.children[-1],  # )2
+        ]
+        parameters.children = [parameters.what_if_this_was_actually_long.children[0], body, parameters.children[-1]]  # type: ignore
+    if (
+        self._proc is not None
+        # has the child process finished?
+        and self._returncode is None
+        # the child process has finished, but the
+        # transport hasn't been notified yet?
+        and self._proc.poll() is None
+    ):
+        pass
+    # no newline before or after
+    short = [
+        # one
+        1,
+        # two
+        2,
+    ]
+
+    # no newline after
+    call(
+        arg1,
+        arg2,
+        """
+short
+""",
+        arg3=True,
+    )
+
+    ############################################################################
+
+    call2(
+        # short
+        arg1,
+        # but
+        arg2,
+        # multiline
+        """
+short
+""",
+        # yup
+        arg3=True,
+    )
+    lcomp = [
+        element for element in collection if element is not None  # yup  # yup  # right
+    ]
+    lcomp2 = [
+        # hello
+        element
+        # yup
+        for element in collection
+        # right
+        if element is not None
+    ]
+    lcomp3 = [
+        # This one is actually too long to fit in a single line.
+        element.split("\n", 1)[0]
+        # yup
+        for element in collection.select_elements()
+        # right
+        if element is not None
+    ]
+    while True:
+        if False:
+            continue
+
+            # and round and round we go
+        # and round and round we go
+
+    # let's return
+    return Node(
+        syms.simple_stmt,
+        [Node(statement, result), Leaf(token.NEWLINE, "\n")],  # FIXME: \r\n?
+    )
+
+
+CONFIG_FILES = (
+    [
+        CONFIG_FILE,
+    ]
+    + SHARED_CONFIG_FILES
+    + USER_CONFIG_FILES
+)  # type: Final
+
+
+class Test:
+    def _init_host(self, parsed) -> None:
+        if parsed.hostname is None or not parsed.hostname.strip():  # type: ignore
+            pass
+
+
+#######################
+### SECTION COMMENT ###
+#######################
+
+
+instruction()  # comment with bad spacing
+
+# END COMMENTS
+# MORE END COMMENTS
diff -pruN 22.3.0-1/tests/data/simple_cases/comments3.py 22.6.0-1/tests/data/simple_cases/comments3.py
--- 22.3.0-1/tests/data/simple_cases/comments3.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments3.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,47 @@
+# The percent-percent comments are Spyder IDE cells.
+
+#%%
+def func():
+    x = """
+    a really long string
+    """
+    lcomp3 = [
+        # This one is actually too long to fit in a single line.
+        element.split("\n", 1)[0]
+        # yup
+        for element in collection.select_elements()
+        # right
+        if element is not None
+    ]
+    # Capture each of the exceptions in the MultiError along with each of their causes and contexts
+    if isinstance(exc_value, MultiError):
+        embedded = []
+        for exc in exc_value.exceptions:
+            if exc not in _seen:
+                embedded.append(
+                    # This should be left alone (before)
+                    traceback.TracebackException.from_exception(
+                        exc,
+                        limit=limit,
+                        lookup_lines=lookup_lines,
+                        capture_locals=capture_locals,
+                        # copy the set of _seen exceptions so that duplicates
+                        # shared between sub-exceptions are not omitted
+                        _seen=set(_seen),
+                    )
+                    # This should be left alone (after)
+                )
+
+    # everything is fine if the expression isn't nested
+    traceback.TracebackException.from_exception(
+        exc,
+        limit=limit,
+        lookup_lines=lookup_lines,
+        capture_locals=capture_locals,
+        # copy the set of _seen exceptions so that duplicates
+        # shared between sub-exceptions are not omitted
+        _seen=set(_seen),
+    )
+
+
+#%%
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/simple_cases/comments4.py 22.6.0-1/tests/data/simple_cases/comments4.py
--- 22.3.0-1/tests/data/simple_cases/comments4.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments4.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,94 @@
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent,  # NOT DRY
+)
+from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
+    MyLovelyCompanyTeamProjectComponent as component,  # DRY
+)
+
+
+class C:
+    @pytest.mark.parametrize(
+        ("post_data", "message"),
+        [
+            # metadata_version errors.
+            (
+                {},
+                "None is an invalid value for Metadata-Version. Error: This field is"
+                " required. see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            (
+                {"metadata_version": "-1"},
+                "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
+                " Version see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            # name errors.
+            (
+                {"metadata_version": "1.2"},
+                "'' is an invalid value for Name. Error: This field is required. see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            (
+                {"metadata_version": "1.2", "name": "foo-"},
+                "'foo-' is an invalid value for Name. Error: Must start and end with a"
+                " letter or numeral and contain only ascii numeric and '.', '_' and"
+                " '-'. see https://packaging.python.org/specifications/core-metadata",
+            ),
+            # version errors.
+            (
+                {"metadata_version": "1.2", "name": "example"},
+                "'' is an invalid value for Version. Error: This field is required. see"
+                " https://packaging.python.org/specifications/core-metadata",
+            ),
+            (
+                {"metadata_version": "1.2", "name": "example", "version": "dog"},
+                "'dog' is an invalid value for Version. Error: Must start and end with"
+                " a letter or numeral and contain only ascii numeric and '.', '_' and"
+                " '-'. see https://packaging.python.org/specifications/core-metadata",
+            ),
+        ],
+    )
+    def test_fails_invalid_post_data(
+        self, pyramid_config, db_request, post_data, message
+    ):
+        pyramid_config.testing_securitypolicy(userid=1)
+        db_request.POST = MultiDict(post_data)
+
+
+def foo(list_a, list_b):
+    results = (
+        User.query.filter(User.foo == "bar")
+        .filter(  # Because foo.
+            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
+        )
+        .filter(User.xyz.is_(None))
+        # Another comment about the filtering on is_quux goes here.
+        .filter(db.not_(User.is_pending.astext.cast(db.Boolean).is_(True)))
+        .order_by(User.created_at.desc())
+        .with_for_update(key_share=True)
+        .all()
+    )
+    return results
+
+
+def foo2(list_a, list_b):
+    # Standalone comment reasonably placed.
+    return (
+        User.query.filter(User.foo == "bar")
+        .filter(
+            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
+        )
+        .filter(User.xyz.is_(None))
+    )
+
+
+def foo3(list_a, list_b):
+    return (
+        # Standlone comment but weirdly placed.
+        User.query.filter(User.foo == "bar")
+        .filter(
+            db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
+        )
+        .filter(User.xyz.is_(None))
+    )
diff -pruN 22.3.0-1/tests/data/simple_cases/comments5.py 22.6.0-1/tests/data/simple_cases/comments5.py
--- 22.3.0-1/tests/data/simple_cases/comments5.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments5.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,71 @@
+while True:
+    if something.changed:
+        do.stuff()  # trailing comment
+        # Comment belongs to the `if` block.
+    # This one belongs to the `while` block.
+
+    # Should this one, too?  I guess so.
+
+# This one is properly standalone now.
+
+for i in range(100):
+    # first we do this
+    if i % 33 == 0:
+        break
+
+    # then we do this
+    print(i)
+    # and finally we loop around
+
+with open(some_temp_file) as f:
+    data = f.read()
+
+try:
+    with open(some_other_file) as w:
+        w.write(data)
+
+except OSError:
+    print("problems")
+
+import sys
+
+
+# leading function comment
+def wat():
+    ...
+    # trailing function comment
+
+
+# SECTION COMMENT
+
+
+# leading 1
+@deco1
+# leading 2
+@deco2(with_args=True)
+# leading 3
+@deco3
+def decorated1():
+    ...
+
+
+# leading 1
+@deco1
+# leading 2
+@deco2(with_args=True)
+# leading function comment
+def decorated1():
+    ...
+
+
+# Note: crappy but inevitable.  The current design of EmptyLineTracker doesn't
+# allow this to work correctly.  The user will have to split those lines by
+# hand.
+some_instruction
+# This comment should be split from `some_instruction` by two lines but isn't.
+def g():
+    ...
+
+
+if __name__ == "__main__":
+    main()
diff -pruN 22.3.0-1/tests/data/simple_cases/comments6.py 22.6.0-1/tests/data/simple_cases/comments6.py
--- 22.3.0-1/tests/data/simple_cases/comments6.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments6.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,118 @@
+from typing import Any, Tuple
+
+
+def f(
+    a,  # type: int
+):
+    pass
+
+
+# test type comments
+def f(a, b, c, d, e, f, g, h, i):
+    # type: (int, int, int, int, int, int, int, int, int) -> None
+    pass
+
+
+def f(
+    a,  # type: int
+    b,  # type: int
+    c,  # type: int
+    d,  # type: int
+    e,  # type: int
+    f,  # type: int
+    g,  # type: int
+    h,  # type: int
+    i,  # type: int
+):
+    # type: (...) -> None
+    pass
+
+
+def f(
+    arg,  # type: int
+    *args,  # type: *Any
+    default=False,  # type: bool
+    **kwargs,  # type: **Any
+):
+    # type: (...) -> None
+    pass
+
+
+def f(
+    a,  # type: int
+    b,  # type: int
+    c,  # type: int
+    d,  # type: int
+):
+    # type: (...) -> None
+
+    element = 0  # type: int
+    another_element = 1  # type: float
+    another_element_with_long_name = 2  # type: int
+    another_really_really_long_element_with_a_unnecessarily_long_name_to_describe_what_it_does_enterprise_style = (
+        3
+    )  # type: int
+    an_element_with_a_long_value = calls() or more_calls() and more()  # type: bool
+
+    tup = (
+        another_element,
+        another_really_really_long_element_with_a_unnecessarily_long_name_to_describe_what_it_does_enterprise_style,
+    )  # type: Tuple[int, int]
+
+    a = (
+        element
+        + another_element
+        + another_element_with_long_name
+        + element
+        + another_element
+        + another_element_with_long_name
+    )  # type: int
+
+
+def f(
+    x,  # not a type comment
+    y,  # type: int
+):
+    # type: (...) -> None
+    pass
+
+
+def f(
+    x,  # not a type comment
+):  # type: (int) -> None
+    pass
+
+
+def func(
+    a=some_list[0],  # type: int
+):  # type: () -> int
+    c = call(
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0456,
+        0.0789,
+        0.0123,
+        0.0456,
+        0.0789,
+        a[-1],  # type: ignore
+    )
+
+    c = call(
+        "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa"  # type: ignore
+    )
+
+
+result = (  # aaa
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+)
+
+AAAAAAAAAAAAA = [AAAAAAAAAAAAA] + SHARED_AAAAAAAAAAAAA + USER_AAAAAAAAAAAAA + AAAAAAAAAAAAA  # type: ignore
+
+call_to_some_function_asdf(
+    foo,
+    [AAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBB],  # type: ignore
+)
+
+aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items)))  # type: ignore[arg-type]
diff -pruN 22.3.0-1/tests/data/simple_cases/comments_non_breaking_space.py 22.6.0-1/tests/data/simple_cases/comments_non_breaking_space.py
--- 22.3.0-1/tests/data/simple_cases/comments_non_breaking_space.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments_non_breaking_space.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,44 @@
+from .config import (  ConfigTypeAttributes,    Int,    Path,    # String,
+    # DEFAULT_TYPE_ATTRIBUTES,
+)
+
+result = 1  # A simple comment
+result = (    1, ) # Another one
+
+result = 1    # type: ignore
+result = 1# This comment is talking about type: ignore
+square = Square(4) # type: Optional[Square]
+
+def function(a:int=42):
+    """ This docstring is already formatted
+       a
+       b
+    """
+    #    There's a NBSP + 3 spaces before
+    #    And 4 spaces on the next line
+    pass
+
+# output
+from .config import (
+    ConfigTypeAttributes,
+    Int,
+    Path,  # String,
+    # DEFAULT_TYPE_ATTRIBUTES,
+)
+
+result = 1  # A simple comment
+result = (1,)  # Another one
+
+result = 1  #  type: ignore
+result = 1  # This comment is talking about type: ignore
+square = Square(4)  #  type: Optional[Square]
+
+
+def function(a: int = 42):
+    """This docstring is already formatted
+    a
+    b
+    """
+    #    There's a NBSP + 3 spaces before
+    #    And 4 spaces on the next line
+    pass
diff -pruN 22.3.0-1/tests/data/simple_cases/comments.py 22.6.0-1/tests/data/simple_cases/comments.py
--- 22.3.0-1/tests/data/simple_cases/comments.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/comments.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,96 @@
+#!/usr/bin/env python3
+# fmt: on
+# Some license here.
+#
+# Has many lines. Many, many lines.
+# Many, many, many lines.
+"""Module docstring.
+
+Possibly also many, many lines.
+"""
+
+import os.path
+import sys
+
+import a
+from b.c import X  # some noqa comment
+
+try:
+    import fast
+except ImportError:
+    import slow as fast
+
+
+# Some comment before a function.
+y = 1
+(
+    # some strings
+    y  # type: ignore
+)
+
+
+def function(default=None):
+    """Docstring comes first.
+
+    Possibly many lines.
+    """
+    # FIXME: Some comment about why this function is crap but still in production.
+    import inner_imports
+
+    if inner_imports.are_evil():
+        # Explains why we have this if.
+        # In great detail indeed.
+        x = X()
+        return x.method1()  # type: ignore
+
+    # This return is also commented for some reason.
+    return default
+
+
+# Explains why we use global state.
+GLOBAL_STATE = {"a": a(1), "b": a(2), "c": a(3)}
+
+
+# Another comment!
+# This time two lines.
+
+
+class Foo:
+    """Docstring for class Foo.  Example from Sphinx docs."""
+
+    #: Doc comment for class attribute Foo.bar.
+    #: It can have multiple lines.
+    bar = 1
+
+    flox = 1.5  #: Doc comment for Foo.flox. One line only.
+
+    baz = 2
+    """Docstring for class attribute Foo.baz."""
+
+    def __init__(self):
+        #: Doc comment for instance attribute qux.
+        self.qux = 3
+
+        self.spam = 4
+        """Docstring for instance attribute spam."""
+
+
+#' <h1>This is pweave!</h1>
+
+
+@fast(really=True)
+async def wat():
+    # This comment, for some reason \
+    # contains a trailing backslash.
+    async with X.open_async() as x:  # Some more comments
+        result = await x.method1()
+    # Comment after ending a block.
+    if result:
+        print("A OK", file=sys.stdout)
+        # Comment between things.
+        print()
+
+
+# Some closing comments.
+# Maybe Vim or Emacs directives for formatting.
+# Who knows.
diff -pruN 22.3.0-1/tests/data/simple_cases/composition_no_trailing_comma.py 22.6.0-1/tests/data/simple_cases/composition_no_trailing_comma.py
--- 22.3.0-1/tests/data/simple_cases/composition_no_trailing_comma.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/composition_no_trailing_comma.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,367 @@
+class C:
+    def test(self) -> None:
+        with patch("black.out", print):
+            self.assertEqual(
+                unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "2 files reformatted, 1 file left unchanged, 1 file failed to"
+                " reformat.",
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "2 files reformatted, 2 files left unchanged, 2 files failed to"
+                " reformat.",
+            )
+            for i in (a,):
+                if (
+                    # Rule 1
+                    i % 2 == 0
+                    # Rule 2
+                    and i % 3 == 0
+                ):
+                    while (
+                        # Just a comment
+                        call()
+                        # Another
+                    ):
+                        print(i)
+        xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
+            push_manager=context.request.resource_manager,
+            max_items_to_push=num_items,
+            batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE
+        ).push(
+            # Only send the first n items.
+            items=items[:num_items]
+        )
+        return (
+            'Utterly failed doctest test for %s\n   File "%s", line %s, in %s\n\n%s'
+            % (test.name, test.filename, lineno, lname, err)
+        )
+
+    def omitting_trailers(self) -> None:
+        get_collection(
+            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
+        )[OneLevelIndex]
+        get_collection(
+            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
+        )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
+        d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
+            22
+        ]
+        assignment = (
+            some.rather.elaborate.rule() and another.rule.ending_with.index[123]
+        )
+
+    def easy_asserts(self) -> None:
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        } == expected, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        }, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        }
+
+    def tricky_asserts(self) -> None:
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        } == expected(
+            value, is_going_to_be="too long to fit in a single line", srsly=True
+        ), "Not what we expected"
+
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        } == expected, (
+            "Not what we expected and the message is too long to fit in one line"
+        )
+
+        assert expected(
+            value, is_going_to_be="too long to fit in a single line", srsly=True
+        ) == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        }, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9
+        }, (
+            "Not what we expected and the message is too long to fit in one line"
+            " because it's too long"
+        )
+
+        dis_c_instance_method = """\
+        %3d           0 LOAD_FAST                1 (x)
+                      2 LOAD_CONST               1 (1)
+                      4 COMPARE_OP               2 (==)
+                      6 LOAD_FAST                0 (self)
+                      8 STORE_ATTR               0 (x)
+                     10 LOAD_CONST               0 (None)
+                     12 RETURN_VALUE
+        """ % (
+            _C.__init__.__code__.co_firstlineno + 1,
+        )
+
+        assert (
+            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
+            == {
+                key1: value1,
+                key2: value2,
+                key3: value3,
+                key4: value4,
+                key5: value5,
+                key6: value6,
+                key7: value7,
+                key8: value8,
+                key9: value9
+            }
+        )
+
+
+
+# output
+
+class C:
+    def test(self) -> None:
+        with patch("black.out", print):
+            self.assertEqual(
+                unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "2 files reformatted, 1 file left unchanged, 1 file failed to"
+                " reformat.",
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "2 files reformatted, 2 files left unchanged, 2 files failed to"
+                " reformat.",
+            )
+            for i in (a,):
+                if (
+                    # Rule 1
+                    i % 2 == 0
+                    # Rule 2
+                    and i % 3 == 0
+                ):
+                    while (
+                        # Just a comment
+                        call()
+                        # Another
+                    ):
+                        print(i)
+        xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
+            push_manager=context.request.resource_manager,
+            max_items_to_push=num_items,
+            batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE,
+        ).push(
+            # Only send the first n items.
+            items=items[:num_items]
+        )
+        return (
+            'Utterly failed doctest test for %s\n   File "%s", line %s, in %s\n\n%s'
+            % (test.name, test.filename, lineno, lname, err)
+        )
+
+    def omitting_trailers(self) -> None:
+        get_collection(
+            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
+        )[OneLevelIndex]
+        get_collection(
+            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
+        )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
+        d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
+            22
+        ]
+        assignment = (
+            some.rather.elaborate.rule() and another.rule.ending_with.index[123]
+        )
+
+    def easy_asserts(self) -> None:
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        } == expected, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }
+
+    def tricky_asserts(self) -> None:
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        } == expected(
+            value, is_going_to_be="too long to fit in a single line", srsly=True
+        ), "Not what we expected"
+
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        } == expected, (
+            "Not what we expected and the message is too long to fit in one line"
+        )
+
+        assert expected(
+            value, is_going_to_be="too long to fit in a single line", srsly=True
+        ) == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }, (
+            "Not what we expected and the message is too long to fit in one line"
+            " because it's too long"
+        )
+
+        dis_c_instance_method = """\
+        %3d           0 LOAD_FAST                1 (x)
+                      2 LOAD_CONST               1 (1)
+                      4 COMPARE_OP               2 (==)
+                      6 LOAD_FAST                0 (self)
+                      8 STORE_ATTR               0 (x)
+                     10 LOAD_CONST               0 (None)
+                     12 RETURN_VALUE
+        """ % (
+            _C.__init__.__code__.co_firstlineno + 1,
+        )
+
+        assert (
+            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
+            == {
+                key1: value1,
+                key2: value2,
+                key3: value3,
+                key4: value4,
+                key5: value5,
+                key6: value6,
+                key7: value7,
+                key8: value8,
+                key9: value9,
+            }
+        )
diff -pruN 22.3.0-1/tests/data/simple_cases/composition.py 22.6.0-1/tests/data/simple_cases/composition.py
--- 22.3.0-1/tests/data/simple_cases/composition.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/composition.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,181 @@
+class C:
+    def test(self) -> None:
+        with patch("black.out", print):
+            self.assertEqual(
+                unstyle(str(report)), "1 file reformatted, 1 file failed to reformat."
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.",
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "2 files reformatted, 1 file left unchanged, 1 file failed to"
+                " reformat.",
+            )
+            self.assertEqual(
+                unstyle(str(report)),
+                "2 files reformatted, 2 files left unchanged, 2 files failed to"
+                " reformat.",
+            )
+            for i in (a,):
+                if (
+                    # Rule 1
+                    i % 2 == 0
+                    # Rule 2
+                    and i % 3 == 0
+                ):
+                    while (
+                        # Just a comment
+                        call()
+                        # Another
+                    ):
+                        print(i)
+        xxxxxxxxxxxxxxxx = Yyyy2YyyyyYyyyyy(
+            push_manager=context.request.resource_manager,
+            max_items_to_push=num_items,
+            batch_size=Yyyy2YyyyYyyyyYyyy.FULL_SIZE,
+        ).push(
+            # Only send the first n items.
+            items=items[:num_items]
+        )
+        return (
+            'Utterly failed doctest test for %s\n   File "%s", line %s, in %s\n\n%s'
+            % (test.name, test.filename, lineno, lname, err)
+        )
+
+    def omitting_trailers(self) -> None:
+        get_collection(
+            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
+        )[OneLevelIndex]
+        get_collection(
+            hey_this_is_a_very_long_call, it_has_funny_attributes, really=True
+        )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex]
+        d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][
+            22
+        ]
+        assignment = (
+            some.rather.elaborate.rule() and another.rule.ending_with.index[123]
+        )
+
+    def easy_asserts(self) -> None:
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        } == expected, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }
+
+    def tricky_asserts(self) -> None:
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        } == expected(
+            value, is_going_to_be="too long to fit in a single line", srsly=True
+        ), "Not what we expected"
+
+        assert {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        } == expected, (
+            "Not what we expected and the message is too long to fit in one line"
+        )
+
+        assert expected(
+            value, is_going_to_be="too long to fit in a single line", srsly=True
+        ) == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }, "Not what we expected"
+
+        assert expected == {
+            key1: value1,
+            key2: value2,
+            key3: value3,
+            key4: value4,
+            key5: value5,
+            key6: value6,
+            key7: value7,
+            key8: value8,
+            key9: value9,
+        }, (
+            "Not what we expected and the message is too long to fit in one line"
+            " because it's too long"
+        )
+
+        dis_c_instance_method = """\
+        %3d           0 LOAD_FAST                1 (x)
+                      2 LOAD_CONST               1 (1)
+                      4 COMPARE_OP               2 (==)
+                      6 LOAD_FAST                0 (self)
+                      8 STORE_ATTR               0 (x)
+                     10 LOAD_CONST               0 (None)
+                     12 RETURN_VALUE
+        """ % (
+            _C.__init__.__code__.co_firstlineno + 1,
+        )
+
+        assert (
+            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
+            == {
+                key1: value1,
+                key2: value2,
+                key3: value3,
+                key4: value4,
+                key5: value5,
+                key6: value6,
+                key7: value7,
+                key8: value8,
+                key9: value9,
+            }
+        )
diff -pruN 22.3.0-1/tests/data/simple_cases/docstring.py 22.6.0-1/tests/data/simple_cases/docstring.py
--- 22.3.0-1/tests/data/simple_cases/docstring.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/docstring.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,419 @@
+class MyClass:
+  """ Multiline
+  class docstring
+  """
+
+  def method(self):
+    """Multiline
+    method docstring
+    """
+    pass
+
+
+def foo():
+  """This is a docstring with             
+  some lines of text here
+  """
+  return
+
+
+def bar():
+  '''This is another docstring
+  with more lines of text
+  '''
+  return
+
+
+def baz():
+  '''"This" is a string with some
+  embedded "quotes"'''
+  return
+
+
+def troz():
+	'''Indentation with tabs
+	is just as OK
+	'''
+	return
+
+
+def zort():
+        """Another
+        multiline
+        docstring
+        """
+        pass
+
+def poit():
+  """
+  Lorem ipsum dolor sit amet.       
+
+  Consectetur adipiscing elit:
+   - sed do eiusmod tempor incididunt ut labore
+   - dolore magna aliqua
+     - enim ad minim veniam
+     - quis nostrud exercitation ullamco laboris nisi
+   - aliquip ex ea commodo consequat
+  """
+  pass
+
+
+def under_indent():
+  """
+  These lines are indented in a way that does not
+make sense.
+  """
+  pass
+
+
+def over_indent():
+  """
+  This has a shallow indent
+    - But some lines are deeper
+    - And the closing quote is too deep
+    """
+  pass
+
+
+def single_line():
+    """But with a newline after it!
+
+    """
+    pass
+
+
+def this():
+    r"""
+    'hey ho'
+    """
+
+
+def that():
+  """ "hey yah" """
+
+
+def and_that():
+  """
+  "hey yah" """
+
+
+def and_this():
+  ''' 
+  "hey yah"'''
+
+
+def multiline_whitespace():
+    '''
+    
+    
+    
+    
+    '''
+
+
+def oneline_whitespace():
+    '''      '''
+
+
+def empty():
+    """"""
+
+
+def single_quotes():
+    'testing'
+
+
+def believe_it_or_not_this_is_in_the_py_stdlib(): ''' 
+"hey yah"'''
+
+
+def ignored_docstring():
+    """a => \
+b"""  
+
+def single_line_docstring_with_whitespace():
+    """   This should be stripped """
+
+def docstring_with_inline_tabs_and_space_indentation():
+    """hey
+
+    tab	separated	value
+    	tab at start of line and then a tab	separated	value
+    				multiple tabs at the beginning	and	inline
+    	 	  	mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
+    			 	  		
+    line ends with some tabs		
+    """
+
+
+def docstring_with_inline_tabs_and_tab_indentation():
+	"""hey
+
+	tab	separated	value
+		tab at start of line and then a tab	separated	value
+					multiple tabs at the beginning	and	inline
+		 	  	mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
+				 	  		
+	line ends with some tabs		
+	"""
+	pass
+
+
+def backslash_space():
+    """\ """
+
+
+def multiline_backslash_1():
+  '''
+  hey\there\
+  \ '''
+
+
+def multiline_backslash_2():
+  '''
+  hey there \ '''
+
+
+def multiline_backslash_3():
+  '''
+  already escaped \\ '''
+
+
+def my_god_its_full_of_stars_1():
+    "I'm sorry Dave\u2001"
+
+
+# the space below is actually a \u2001, removed in output
+def my_god_its_full_of_stars_2():
+    "I'm sorry Dave "
+
+
+def docstring_almost_at_line_limit():
+    """long docstring................................................................."""
+
+
+def docstring_almost_at_line_limit2():
+    """long docstring.................................................................
+
+    ..................................................................................
+    """
+
+
+def docstring_at_line_limit():
+    """long docstring................................................................"""
+
+
+def multiline_docstring_at_line_limit():
+    """first line-----------------------------------------------------------------------
+
+    second line----------------------------------------------------------------------"""
+
+
+# output
+
+class MyClass:
+    """Multiline
+    class docstring
+    """
+
+    def method(self):
+        """Multiline
+        method docstring
+        """
+        pass
+
+
+def foo():
+    """This is a docstring with
+    some lines of text here
+    """
+    return
+
+
+def bar():
+    """This is another docstring
+    with more lines of text
+    """
+    return
+
+
+def baz():
+    '''"This" is a string with some
+    embedded "quotes"'''
+    return
+
+
+def troz():
+    """Indentation with tabs
+    is just as OK
+    """
+    return
+
+
+def zort():
+    """Another
+    multiline
+    docstring
+    """
+    pass
+
+
+def poit():
+    """
+    Lorem ipsum dolor sit amet.
+
+    Consectetur adipiscing elit:
+     - sed do eiusmod tempor incididunt ut labore
+     - dolore magna aliqua
+       - enim ad minim veniam
+       - quis nostrud exercitation ullamco laboris nisi
+     - aliquip ex ea commodo consequat
+    """
+    pass
+
+
+def under_indent():
+    """
+      These lines are indented in a way that does not
+    make sense.
+    """
+    pass
+
+
+def over_indent():
+    """
+    This has a shallow indent
+      - But some lines are deeper
+      - And the closing quote is too deep
+    """
+    pass
+
+
+def single_line():
+    """But with a newline after it!"""
+    pass
+
+
+def this():
+    r"""
+    'hey ho'
+    """
+
+
+def that():
+    """ "hey yah" """
+
+
+def and_that():
+    """
+    "hey yah" """
+
+
+def and_this():
+    '''
+    "hey yah"'''
+
+
+def multiline_whitespace():
+    """ """
+
+
+def oneline_whitespace():
+    """ """
+
+
+def empty():
+    """"""
+
+
+def single_quotes():
+    "testing"
+
+
+def believe_it_or_not_this_is_in_the_py_stdlib():
+    '''
+    "hey yah"'''
+
+
+def ignored_docstring():
+    """a => \
+b"""
+
+
+def single_line_docstring_with_whitespace():
+    """This should be stripped"""
+
+
+def docstring_with_inline_tabs_and_space_indentation():
+    """hey
+
+    tab	separated	value
+        tab at start of line and then a tab	separated	value
+                                multiple tabs at the beginning	and	inline
+                        mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
+
+    line ends with some tabs
+    """
+
+
+def docstring_with_inline_tabs_and_tab_indentation():
+    """hey
+
+    tab	separated	value
+            tab at start of line and then a tab	separated	value
+                                    multiple tabs at the beginning	and	inline
+                            mixed tabs and spaces at beginning. next line has mixed tabs and spaces only.
+
+    line ends with some tabs
+    """
+    pass
+
+
+def backslash_space():
+    """\ """
+
+
+def multiline_backslash_1():
+    """
+  hey\there\
+  \ """
+
+
+def multiline_backslash_2():
+    """
+    hey there \ """
+
+
+def multiline_backslash_3():
+    """
+    already escaped \\"""
+
+
+def my_god_its_full_of_stars_1():
+    "I'm sorry Dave\u2001"
+
+
+# the space below is actually a \u2001, removed in output
+def my_god_its_full_of_stars_2():
+    "I'm sorry Dave"
+
+
+def docstring_almost_at_line_limit():
+    """long docstring................................................................."""
+
+
+def docstring_almost_at_line_limit2():
+    """long docstring.................................................................
+
+    ..................................................................................
+    """
+
+
+def docstring_at_line_limit():
+    """long docstring................................................................"""
+
+
+def multiline_docstring_at_line_limit():
+    """first line-----------------------------------------------------------------------
+
+    second line----------------------------------------------------------------------"""
diff -pruN 22.3.0-1/tests/data/simple_cases/empty_lines.py 22.6.0-1/tests/data/simple_cases/empty_lines.py
--- 22.3.0-1/tests/data/simple_cases/empty_lines.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/empty_lines.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,187 @@
+"""Docstring."""
+
+
+# leading comment
+def f():
+    NO = ''
+    SPACE = ' '
+    DOUBLESPACE = '  '
+
+    t = leaf.type
+    p = leaf.parent  # trailing comment
+    v = leaf.value
+
+    if t in ALWAYS_NO_SPACE:
+        pass
+    if t == token.COMMENT:  # another trailing comment
+        return DOUBLESPACE
+
+
+    assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
+
+
+    prev = leaf.prev_sibling
+    if not prev:
+        prevp = preceding_leaf(p)
+        if not prevp or prevp.type in OPENING_BRACKETS:
+
+
+            return NO
+
+
+        if prevp.type == token.EQUAL:
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.argument,
+            }:
+                return NO
+
+        elif prevp.type == token.DOUBLESTAR:
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.dictsetmaker,
+            }:
+                return NO
+
+###############################################################################
+# SECTION BECAUSE SECTIONS
+###############################################################################
+
+def g():
+    NO = ''
+    SPACE = ' '
+    DOUBLESPACE = '  '
+
+    t = leaf.type
+    p = leaf.parent
+    v = leaf.value
+
+    # Comment because comments
+
+    if t in ALWAYS_NO_SPACE:
+        pass
+    if t == token.COMMENT:
+        return DOUBLESPACE
+
+    # Another comment because more comments
+    assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}'
+
+    prev = leaf.prev_sibling
+    if not prev:
+        prevp = preceding_leaf(p)
+
+        if not prevp or prevp.type in OPENING_BRACKETS:
+            # Start of the line or a bracketed expression.
+            # More than one line for the comment.
+            return NO
+
+        if prevp.type == token.EQUAL:
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.argument,
+            }:
+                return NO
+
+
+# output
+
+
+"""Docstring."""
+
+
+# leading comment
+def f():
+    NO = ""
+    SPACE = " "
+    DOUBLESPACE = "  "
+
+    t = leaf.type
+    p = leaf.parent  # trailing comment
+    v = leaf.value
+
+    if t in ALWAYS_NO_SPACE:
+        pass
+    if t == token.COMMENT:  # another trailing comment
+        return DOUBLESPACE
+
+    assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
+
+    prev = leaf.prev_sibling
+    if not prev:
+        prevp = preceding_leaf(p)
+        if not prevp or prevp.type in OPENING_BRACKETS:
+
+            return NO
+
+        if prevp.type == token.EQUAL:
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.argument,
+            }:
+                return NO
+
+        elif prevp.type == token.DOUBLESTAR:
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.dictsetmaker,
+            }:
+                return NO
+
+
+###############################################################################
+# SECTION BECAUSE SECTIONS
+###############################################################################
+
+
+def g():
+    NO = ""
+    SPACE = " "
+    DOUBLESPACE = "  "
+
+    t = leaf.type
+    p = leaf.parent
+    v = leaf.value
+
+    # Comment because comments
+
+    if t in ALWAYS_NO_SPACE:
+        pass
+    if t == token.COMMENT:
+        return DOUBLESPACE
+
+    # Another comment because more comments
+    assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
+
+    prev = leaf.prev_sibling
+    if not prev:
+        prevp = preceding_leaf(p)
+
+        if not prevp or prevp.type in OPENING_BRACKETS:
+            # Start of the line or a bracketed expression.
+            # More than one line for the comment.
+            return NO
+
+        if prevp.type == token.EQUAL:
+            if prevp.parent and prevp.parent.type in {
+                syms.typedargslist,
+                syms.varargslist,
+                syms.parameters,
+                syms.arglist,
+                syms.argument,
+            }:
+                return NO
diff -pruN 22.3.0-1/tests/data/simple_cases/expression.diff 22.6.0-1/tests/data/simple_cases/expression.diff
--- 22.3.0-1/tests/data/simple_cases/expression.diff	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/expression.diff	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,466 @@
+--- [Deterministic header]
++++ [Deterministic header]
+@@ -1,8 +1,8 @@
+ ...
+-'some_string'
+-b'\\xa3'
++"some_string"
++b"\\xa3"
+ Name
+ None
+ True
+ False
+ 1
+@@ -21,99 +21,135 @@
+ Name1 or (Name2 and Name3) or Name4
+ Name1 or Name2 and Name3 or Name4
+ v1 << 2
+ 1 >> v2
+ 1 % finished
+-1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
+-((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
++1 + v2 - v3 * 4 ^ 5**v6 / 7 // 8
++((1 + v2) - (v3 * 4)) ^ (((5**v6) / 7) // 8)
+ not great
+ ~great
+ +value
+ -1
+ ~int and not v1 ^ 123 + v2 | True
+ (~int) and (not ((v1 ^ (123 + v2)) | True))
+-+really ** -confusing ** ~operator ** -precedence
+-flags & ~ select.EPOLLIN and waiters.write_task is not None
+++(really ** -(confusing ** ~(operator**-precedence)))
++flags & ~select.EPOLLIN and waiters.write_task is not None
+ lambda arg: None
+ lambda a=True: a
+ lambda a, b, c=True: a
+-lambda a, b, c=True, *, d=(1 << v2), e='str': a
+-lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
++lambda a, b, c=True, *, d=(1 << v2), e="str": a
++lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
+ manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
+-foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
++foo = lambda port_id, ignore_missing: {
++    "port1": port1_resource,
++    "port2": port2_resource,
++}[port_id]
+ 1 if True else 2
+ str or None if True else str or bytes or None
+ (str or None) if True else (str or bytes or None)
+ str or None if (1 if True else 2) else str or bytes or None
+ (str or None) if (1 if True else 2) else (str or bytes or None)
+-((super_long_variable_name or None) if (1 if super_long_test_name else 2) else (str or bytes or None))
+-{'2.7': dead, '3.7': (long_live or die_hard)}
+-{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
++(
++    (super_long_variable_name or None)
++    if (1 if super_long_test_name else 2)
++    else (str or bytes or None)
++)
++{"2.7": dead, "3.7": (long_live or die_hard)}
++{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
+ {**a, **b, **c}
+-{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
+-({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
++{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
++({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
+ ()
+ (1,)
+ (1, 2)
+ (1, 2, 3)
+ []
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
+-[1, 2, 3,]
++[
++    1,
++    2,
++    3,
++]
+ [*a]
+ [*range(10)]
+-[*a, 4, 5,]
+-[4, *a, 5,]
+-[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
++[
++    *a,
++    4,
++    5,
++]
++[
++    4,
++    *a,
++    5,
++]
++[
++    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
++    element,
++    another,
++    *more,
++]
+ {i for i in (1, 2, 3)}
+-{(i ** 2) for i in (1, 2, 3)}
+-{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
+-{((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
++{(i**2) for i in (1, 2, 3)}
++{(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
++{((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
+ [i for i in (1, 2, 3)]
+-[(i ** 2) for i in (1, 2, 3)]
+-[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
+-[((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
++[(i**2) for i in (1, 2, 3)]
++[(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
++[((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
+ {i: 0 for i in (1, 2, 3)}
+-{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
++{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
+ {a: b * 2 for a, b in dictionary.items()}
+ {a: b * -2 for a, b in dictionary.items()}
+-{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
++{
++    k: v
++    for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
++}
+ Python3 > Python2 > COBOL
+ Life is Life
+ call()
+ call(arg)
+-call(kwarg='hey')
+-call(arg, kwarg='hey')
+-call(arg, another, kwarg='hey', **kwargs)
+-call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs)  # note: no trailing comma pre-3.6
++call(kwarg="hey")
++call(arg, kwarg="hey")
++call(arg, another, kwarg="hey", **kwargs)
++call(
++    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
++    arg,
++    another,
++    kwarg="hey",
++    **kwargs
++)  # note: no trailing comma pre-3.6
+ call(*gidgets[:2])
+ call(a, *gidgets[:2])
+ call(**self.screen_kwargs)
+ call(b, **self.screen_kwargs)
+ lukasz.langa.pl
+ call.me(maybe)
+-1 .real
+-1.0 .real
++(1).real
++(1.0).real
+ ....__class__
+ list[str]
+ dict[str, int]
+ tuple[str, ...]
++tuple[str, int, float, dict[str, int]]
+ tuple[
+-    str, int, float, dict[str, int]
+-]
+-tuple[str, int, float, dict[str, int],]
++    str,
++    int,
++    float,
++    dict[str, int],
++]
+ very_long_variable_name_filters: t.List[
+     t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
+ ]
+ xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+ )
+ xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+     sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+ )
+-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[
+-    ..., List[SomeClass]
+-] = classmethod(sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__))  # type: ignore
++xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(
++    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
++)  # type: ignore
+ slice[0]
+ slice[0:1]
+ slice[0:1:2]
+ slice[:]
+ slice[:-1]
+@@ -137,118 +173,199 @@
+ numpy[-(c + 1) :, d]
+ numpy[:, l[-2]]
+ numpy[:, ::-1]
+ numpy[np.newaxis, :]
+ (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
+-{'2.7': dead, '3.7': long_live or die_hard}
+-{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
++{"2.7": dead, "3.7": long_live or die_hard}
++{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
+ (SomeName)
+ SomeName
+ (Good, Bad, Ugly)
+ (i for i in (1, 2, 3))
+-((i ** 2) for i in (1, 2, 3))
+-((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
+-(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
++((i**2) for i in (1, 2, 3))
++((i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
++(((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
+ (*starred,)
+-{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
++{
++    "id": "1",
++    "type": "type",
++    "started_at": now(),
++    "ended_at": now() + timedelta(days=10),
++    "priority": 1,
++    "import_session_id": 1,
++    **kwargs,
++}
+ a = (1,)
+-b = 1,
++b = (1,)
+ c = 1
+ d = (1,) + a + (2,)
+ e = (1,).count(1)
+ f = 1, *range(10)
+ g = 1, *"ten"
+-what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
+-what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
+-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc()).all()
+-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
++what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
++    vars_to_remove
++)
++what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
++    vars_to_remove
++)
++result = (
++    session.query(models.Customer.id)
++    .filter(
++        models.Customer.account_id == account_id, models.Customer.email == email_address
++    )
++    .order_by(models.Customer.id.asc())
++    .all()
++)
++result = (
++    session.query(models.Customer.id)
++    .filter(
++        models.Customer.account_id == account_id, models.Customer.email == email_address
++    )
++    .order_by(
++        models.Customer.id.asc(),
++    )
++    .all()
++)
+ Ø = set()
+ authors.łukasz.say_thanks()
+ mapping = {
+     A: 0.25 * (10.0 / 12),
+     B: 0.1 * (10.0 / 12),
+     C: 0.1 * (10.0 / 12),
+     D: 0.1 * (10.0 / 12),
+ }
+ 
++
+ def gen():
+     yield from outside_of_generator
+-    a = (yield)
+-    b = ((yield))
+-    c = (((yield)))
++    a = yield
++    b = yield
++    c = yield
++
+ 
+ async def f():
+     await some.complicated[0].call(with_args=(True or (1 is not 1)))
+-print(* [] or [1])
++
++
++print(*[] or [1])
+ print(**{1: 3} if False else {x: x for x in range(3)})
+-print(* lambda x: x)
+-assert(not Test),("Short message")
+-assert this is ComplexTest and not requirements.fit_in_a_single_line(force=False), "Short message"
+-assert(((parens is TooMany)))
+-for x, in (1,), (2,), (3,): ...
+-for y in (): ...
+-for z in (i for i in (1, 2, 3)): ...
+-for i in (call()): ...
+-for j in (1 + (2 + 3)): ...
+-while(this and that): ...
+-for addr_family, addr_type, addr_proto, addr_canonname, addr_sockaddr in socket.getaddrinfo('google.com', 'http'):
++print(*lambda x: x)
++assert not Test, "Short message"
++assert this is ComplexTest and not requirements.fit_in_a_single_line(
++    force=False
++), "Short message"
++assert parens is TooMany
++for (x,) in (1,), (2,), (3,):
++    ...
++for y in ():
++    ...
++for z in (i for i in (1, 2, 3)):
++    ...
++for i in call():
++    ...
++for j in 1 + (2 + 3):
++    ...
++while this and that:
++    ...
++for (
++    addr_family,
++    addr_type,
++    addr_proto,
++    addr_canonname,
++    addr_sockaddr,
++) in socket.getaddrinfo("google.com", "http"):
+     pass
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+-if (
+-    threading.current_thread() != threading.main_thread() and
+-    threading.current_thread() != threading.main_thread() or
+-    signal.getsignal(signal.SIGINT) != signal.default_int_handler
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
+-    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+-):
+-    return True
+-if (
+-    ~ aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l ** aaaa.m // aaaa.n
+-):
+-    return True
+-if (
+-    ~ aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l ** aaaaaaaa.m // aaaaaaaa.n
+-):
+-    return True
+-if (
+-    ~ aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l ** aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
+-):
+-    return True
+-aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaa * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa) / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++a = (
++    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
++    is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
++)
++if (
++    threading.current_thread() != threading.main_thread()
++    and threading.current_thread() != threading.main_thread()
++    or signal.getsignal(signal.SIGINT) != signal.default_int_handler
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++):
++    return True
++if (
++    ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e
++    | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n
++):
++    return True
++if (
++    ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e
++    | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h
++    ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n
++):
++    return True
++if (
++    ~aaaaaaaaaaaaaaaa.a
++    + aaaaaaaaaaaaaaaa.b
++    - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e
++    | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h
++    ^ aaaaaaaaaaaaaaaa.i
++    << aaaaaaaaaaaaaaaa.k
++    >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
++):
++    return True
++(
++    aaaaaaaaaaaaaaaa
++    + aaaaaaaaaaaaaaaa
++    - aaaaaaaaaaaaaaaa
++    * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
++    / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
++)
+ aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
+-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++(
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++)
+ bbbb >> bbbb * bbbb
+-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ^bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++(
++    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    ^ bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++    ^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
++)
+ last_call()
+ # standalone comment at ENDMARKER
diff -pruN 22.3.0-1/tests/data/simple_cases/expression.py 22.6.0-1/tests/data/simple_cases/expression.py
--- 22.3.0-1/tests/data/simple_cases/expression.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/expression.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,630 @@
+...
+'some_string'
+b'\\xa3'
+Name
+None
+True
+False
+1
+1.0
+1j
+True or False
+True or False or None
+True and False
+True and False and None
+(Name1 and Name2) or Name3
+Name1 and Name2 or Name3
+Name1 or (Name2 and Name3)
+Name1 or Name2 and Name3
+(Name1 and Name2) or (Name3 and Name4)
+Name1 and Name2 or Name3 and Name4
+Name1 or (Name2 and Name3) or Name4
+Name1 or Name2 and Name3 or Name4
+v1 << 2
+1 >> v2
+1 % finished
+1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
+((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
+not great
+~great
++value
+-1
+~int and not v1 ^ 123 + v2 | True
+(~int) and (not ((v1 ^ (123 + v2)) | True))
++really ** -confusing ** ~operator ** -precedence
+flags & ~ select.EPOLLIN and waiters.write_task is not None
+lambda arg: None
+lambda a=True: a
+lambda a, b, c=True: a
+lambda a, b, c=True, *, d=(1 << v2), e='str': a
+lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
+manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
+foo = (lambda port_id, ignore_missing: {"port1": port1_resource, "port2": port2_resource}[port_id])
+1 if True else 2
+str or None if True else str or bytes or None
+(str or None) if True else (str or bytes or None)
+str or None if (1 if True else 2) else str or bytes or None
+(str or None) if (1 if True else 2) else (str or bytes or None)
+((super_long_variable_name or None) if (1 if super_long_test_name else 2) else (str or bytes or None))
+{'2.7': dead, '3.7': (long_live or die_hard)}
+{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
+{**a, **b, **c}
+{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
+({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
+()
+(1,)
+(1, 2)
+(1, 2, 3)
+[]
+[1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
+[1, 2, 3,]
+[*a]
+[*range(10)]
+[*a, 4, 5,]
+[4, *a, 5,]
+[this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
+{i for i in (1, 2, 3)}
+{(i ** 2) for i in (1, 2, 3)}
+{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
+{((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
+[i for i in (1, 2, 3)]
+[(i ** 2) for i in (1, 2, 3)]
+[(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
+[((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
+{i: 0 for i in (1, 2, 3)}
+{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
+{a: b * 2 for a, b in dictionary.items()}
+{a: b * -2 for a, b in dictionary.items()}
+{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
+Python3 > Python2 > COBOL
+Life is Life
+call()
+call(arg)
+call(kwarg='hey')
+call(arg, kwarg='hey')
+call(arg, another, kwarg='hey', **kwargs)
+call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs)  # note: no trailing comma pre-3.6
+call(*gidgets[:2])
+call(a, *gidgets[:2])
+call(**self.screen_kwargs)
+call(b, **self.screen_kwargs)
+lukasz.langa.pl
+call.me(maybe)
+1 .real
+1.0 .real
+....__class__
+list[str]
+dict[str, int]
+tuple[str, ...]
+tuple[
+    str, int, float, dict[str, int]
+]
+tuple[str, int, float, dict[str, int],]
+very_long_variable_name_filters: t.List[
+    t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
+]
+xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+)
+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+)
+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[
+    ..., List[SomeClass]
+] = classmethod(sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__))  # type: ignore
+slice[0]
+slice[0:1]
+slice[0:1:2]
+slice[:]
+slice[:-1]
+slice[1:]
+slice[::-1]
+slice[d :: d + 1]
+slice[:c, c - 1]
+numpy[:, 0:1]
+numpy[:, :-1]
+numpy[0, :]
+numpy[:, i]
+numpy[0, :2]
+numpy[:N, 0]
+numpy[:2, :4]
+numpy[2:4, 1:5]
+numpy[4:, 2:]
+numpy[:, (0, 1, 2, 5)]
+numpy[0, [0]]
+numpy[:, [i]]
+numpy[1 : c + 1, c]
+numpy[-(c + 1) :, d]
+numpy[:, l[-2]]
+numpy[:, ::-1]
+numpy[np.newaxis, :]
+(str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
+{'2.7': dead, '3.7': long_live or die_hard}
+{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
+[1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
+(SomeName)
+SomeName
+(Good, Bad, Ugly)
+(i for i in (1, 2, 3))
+((i ** 2) for i in (1, 2, 3))
+((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
+(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
+(*starred,)
+{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
+a = (1,)
+b = 1,
+c = 1
+d = (1,) + a + (2,)
+e = (1,).count(1)
+f = 1, *range(10)
+g = 1, *"ten"
+what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
+what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
+result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc()).all()
+result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
+Ø = set()
+authors.łukasz.say_thanks()
+mapping = {
+    A: 0.25 * (10.0 / 12),
+    B: 0.1 * (10.0 / 12),
+    C: 0.1 * (10.0 / 12),
+    D: 0.1 * (10.0 / 12),
+}
+
+def gen():
+    yield from outside_of_generator
+    a = (yield)
+    b = ((yield))
+    c = (((yield)))
+
+async def f():
+    await some.complicated[0].call(with_args=(True or (1 is not 1)))
+print(* [] or [1])
+print(**{1: 3} if False else {x: x for x in range(3)})
+print(* lambda x: x)
+assert(not Test),("Short message")
+assert this is ComplexTest and not requirements.fit_in_a_single_line(force=False), "Short message"
+assert(((parens is TooMany)))
+for x, in (1,), (2,), (3,): ...
+for y in (): ...
+for z in (i for i in (1, 2, 3)): ...
+for i in (call()): ...
+for j in (1 + (2 + 3)): ...
+while(this and that): ...
+for addr_family, addr_type, addr_proto, addr_canonname, addr_sockaddr in socket.getaddrinfo('google.com', 'http'):
+    pass
+a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+a = aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+if (
+    threading.current_thread() != threading.main_thread() and
+    threading.current_thread() != threading.main_thread() or
+    signal.getsignal(signal.SIGINT) != signal.default_int_handler
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    ~ aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l ** aaaa.m // aaaa.n
+):
+    return True
+if (
+    ~ aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l ** aaaaaaaa.m // aaaaaaaa.n
+):
+    return True
+if (
+    ~ aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l ** aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
+):
+    return True
+aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaa * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa) / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
+aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbb >> bbbb * bbbb
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ^bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+last_call()
+# standalone comment at ENDMARKER
+
+
+# output
+
+
+...
+"some_string"
+b"\\xa3"
+Name
+None
+True
+False
+1
+1.0
+1j
+True or False
+True or False or None
+True and False
+True and False and None
+(Name1 and Name2) or Name3
+Name1 and Name2 or Name3
+Name1 or (Name2 and Name3)
+Name1 or Name2 and Name3
+(Name1 and Name2) or (Name3 and Name4)
+Name1 and Name2 or Name3 and Name4
+Name1 or (Name2 and Name3) or Name4
+Name1 or Name2 and Name3 or Name4
+v1 << 2
+1 >> v2
+1 % finished
+1 + v2 - v3 * 4 ^ 5**v6 / 7 // 8
+((1 + v2) - (v3 * 4)) ^ (((5**v6) / 7) // 8)
+not great
+~great
++value
+-1
+~int and not v1 ^ 123 + v2 | True
+(~int) and (not ((v1 ^ (123 + v2)) | True))
++(really ** -(confusing ** ~(operator**-precedence)))
+flags & ~select.EPOLLIN and waiters.write_task is not None
+lambda arg: None
+lambda a=True: a
+lambda a, b, c=True: a
+lambda a, b, c=True, *, d=(1 << v2), e="str": a
+lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
+manylambdas = lambda x=lambda y=lambda z=1: z: y(): x()
+foo = lambda port_id, ignore_missing: {
+    "port1": port1_resource,
+    "port2": port2_resource,
+}[port_id]
+1 if True else 2
+str or None if True else str or bytes or None
+(str or None) if True else (str or bytes or None)
+str or None if (1 if True else 2) else str or bytes or None
+(str or None) if (1 if True else 2) else (str or bytes or None)
+(
+    (super_long_variable_name or None)
+    if (1 if super_long_test_name else 2)
+    else (str or bytes or None)
+)
+{"2.7": dead, "3.7": (long_live or die_hard)}
+{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
+{**a, **b, **c}
+{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
+({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
+()
+(1,)
+(1, 2)
+(1, 2, 3)
+[]
+[1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
+[
+    1,
+    2,
+    3,
+]
+[*a]
+[*range(10)]
+[
+    *a,
+    4,
+    5,
+]
+[
+    4,
+    *a,
+    5,
+]
+[
+    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
+    element,
+    another,
+    *more,
+]
+{i for i in (1, 2, 3)}
+{(i**2) for i in (1, 2, 3)}
+{(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
+{((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
+[i for i in (1, 2, 3)]
+[(i**2) for i in (1, 2, 3)]
+[(i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
+[((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
+{i: 0 for i in (1, 2, 3)}
+{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
+{a: b * 2 for a, b in dictionary.items()}
+{a: b * -2 for a, b in dictionary.items()}
+{
+    k: v
+    for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
+}
+Python3 > Python2 > COBOL
+Life is Life
+call()
+call(arg)
+call(kwarg="hey")
+call(arg, kwarg="hey")
+call(arg, another, kwarg="hey", **kwargs)
+call(
+    this_is_a_very_long_variable_which_will_force_a_delimiter_split,
+    arg,
+    another,
+    kwarg="hey",
+    **kwargs
+)  # note: no trailing comma pre-3.6
+call(*gidgets[:2])
+call(a, *gidgets[:2])
+call(**self.screen_kwargs)
+call(b, **self.screen_kwargs)
+lukasz.langa.pl
+call.me(maybe)
+(1).real
+(1.0).real
+....__class__
+list[str]
+dict[str, int]
+tuple[str, ...]
+tuple[str, int, float, dict[str, int]]
+tuple[
+    str,
+    int,
+    float,
+    dict[str, int],
+]
+very_long_variable_name_filters: t.List[
+    t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
+]
+xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+)
+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(  # type: ignore
+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+)
+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod(
+    sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__)
+)  # type: ignore
+slice[0]
+slice[0:1]
+slice[0:1:2]
+slice[:]
+slice[:-1]
+slice[1:]
+slice[::-1]
+slice[d :: d + 1]
+slice[:c, c - 1]
+numpy[:, 0:1]
+numpy[:, :-1]
+numpy[0, :]
+numpy[:, i]
+numpy[0, :2]
+numpy[:N, 0]
+numpy[:2, :4]
+numpy[2:4, 1:5]
+numpy[4:, 2:]
+numpy[:, (0, 1, 2, 5)]
+numpy[0, [0]]
+numpy[:, [i]]
+numpy[1 : c + 1, c]
+numpy[-(c + 1) :, d]
+numpy[:, l[-2]]
+numpy[:, ::-1]
+numpy[np.newaxis, :]
+(str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
+{"2.7": dead, "3.7": long_live or die_hard}
+{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
+[1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
+(SomeName)
+SomeName
+(Good, Bad, Ugly)
+(i for i in (1, 2, 3))
+((i**2) for i in (1, 2, 3))
+((i**2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
+(((i**2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
+(*starred,)
+{
+    "id": "1",
+    "type": "type",
+    "started_at": now(),
+    "ended_at": now() + timedelta(days=10),
+    "priority": 1,
+    "import_session_id": 1,
+    **kwargs,
+}
+a = (1,)
+b = (1,)
+c = 1
+d = (1,) + a + (2,)
+e = (1,).count(1)
+f = 1, *range(10)
+g = 1, *"ten"
+what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
+    vars_to_remove
+)
+what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
+    vars_to_remove
+)
+result = (
+    session.query(models.Customer.id)
+    .filter(
+        models.Customer.account_id == account_id, models.Customer.email == email_address
+    )
+    .order_by(models.Customer.id.asc())
+    .all()
+)
+result = (
+    session.query(models.Customer.id)
+    .filter(
+        models.Customer.account_id == account_id, models.Customer.email == email_address
+    )
+    .order_by(
+        models.Customer.id.asc(),
+    )
+    .all()
+)
+Ø = set()
+authors.łukasz.say_thanks()
+mapping = {
+    A: 0.25 * (10.0 / 12),
+    B: 0.1 * (10.0 / 12),
+    C: 0.1 * (10.0 / 12),
+    D: 0.1 * (10.0 / 12),
+}
+
+
+def gen():
+    yield from outside_of_generator
+    a = yield
+    b = yield
+    c = yield
+
+
+async def f():
+    await some.complicated[0].call(with_args=(True or (1 is not 1)))
+
+
+print(*[] or [1])
+print(**{1: 3} if False else {x: x for x in range(3)})
+print(*lambda x: x)
+assert not Test, "Short message"
+assert this is ComplexTest and not requirements.fit_in_a_single_line(
+    force=False
+), "Short message"
+assert parens is TooMany
+for (x,) in (1,), (2,), (3,):
+    ...
+for y in ():
+    ...
+for z in (i for i in (1, 2, 3)):
+    ...
+for i in call():
+    ...
+for j in 1 + (2 + 3):
+    ...
+while this and that:
+    ...
+for (
+    addr_family,
+    addr_type,
+    addr_proto,
+    addr_canonname,
+    addr_sockaddr,
+) in socket.getaddrinfo("google.com", "http"):
+    pass
+a = (
+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
+    in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+)
+a = (
+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
+    not in qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+)
+a = (
+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
+    is qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+)
+a = (
+    aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii.jjjj.kkkk.llll.mmmm.nnnn.oooo.pppp
+    is not qqqq.rrrr.ssss.tttt.uuuu.vvvv.xxxx.yyyy.zzzz
+)
+if (
+    threading.current_thread() != threading.main_thread()
+    and threading.current_thread() != threading.main_thread()
+    or signal.getsignal(signal.SIGINT) != signal.default_int_handler
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+):
+    return True
+if (
+    ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e
+    | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n
+):
+    return True
+if (
+    ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e
+    | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h
+    ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n
+):
+    return True
+if (
+    ~aaaaaaaaaaaaaaaa.a
+    + aaaaaaaaaaaaaaaa.b
+    - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e
+    | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h
+    ^ aaaaaaaaaaaaaaaa.i
+    << aaaaaaaaaaaaaaaa.k
+    >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n
+):
+    return True
+(
+    aaaaaaaaaaaaaaaa
+    + aaaaaaaaaaaaaaaa
+    - aaaaaaaaaaaaaaaa
+    * (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
+    / (aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa)
+)
+aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa
+(
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+)
+bbbb >> bbbb * bbbb
+(
+    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    ^ bbbb.a & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    ^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+)
+last_call()
+# standalone comment at ENDMARKER
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtonoff2.py 22.6.0-1/tests/data/simple_cases/fmtonoff2.py
--- 22.3.0-1/tests/data/simple_cases/fmtonoff2.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtonoff2.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,40 @@
+import pytest
+
+TmSt = 1
+TmEx = 2
+
+# fmt: off
+
+# Test data:
+#   Position, Volume, State, TmSt/TmEx/None, [call, [arg1...]]
+
+@pytest.mark.parametrize('test', [
+
+    # Test don't manage the volume
+    [
+        ('stuff', 'in')
+    ],
+])
+def test_fader(test):
+    pass
+
+def check_fader(test):
+
+    pass
+
+def verify_fader(test):
+  # misaligned comment
+    pass
+
+def verify_fader(test):
+    """Hey, ho."""
+    assert test.passed()
+
+def test_calculate_fades():
+    calcs = [
+        # one is zero/none
+        (0, 4, 0, 0, 10,        0, 0, 6, 10),
+        (None, 4, 0, 0, 10,     0, 0, 6, 10),
+    ]
+
+# fmt: on
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtonoff3.py 22.6.0-1/tests/data/simple_cases/fmtonoff3.py
--- 22.3.0-1/tests/data/simple_cases/fmtonoff3.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtonoff3.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,35 @@
+# fmt: off
+x = [
+    1, 2,
+    3, 4,
+]
+# fmt: on
+
+# fmt: off
+x = [
+    1, 2,
+    3, 4,
+]
+# fmt: on
+
+x = [
+    1, 2, 3, 4
+]
+
+# output
+
+# fmt: off
+x = [
+    1, 2,
+    3, 4,
+]
+# fmt: on
+
+# fmt: off
+x = [
+    1, 2,
+    3, 4,
+]
+# fmt: on
+
+x = [1, 2, 3, 4]
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtonoff4.py 22.6.0-1/tests/data/simple_cases/fmtonoff4.py
--- 22.3.0-1/tests/data/simple_cases/fmtonoff4.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtonoff4.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,36 @@
+# fmt: off
+@test([
+    1, 2,
+    3, 4,
+])
+# fmt: on
+def f(): pass
+
+@test([
+    1, 2,
+    3, 4,
+])
+def f(): pass
+
+# output
+
+# fmt: off
+@test([
+    1, 2,
+    3, 4,
+])
+# fmt: on
+def f():
+    pass
+
+
+@test(
+    [
+        1,
+        2,
+        3,
+        4,
+    ]
+)
+def f():
+    pass
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtonoff.py 22.6.0-1/tests/data/simple_cases/fmtonoff.py
--- 22.3.0-1/tests/data/simple_cases/fmtonoff.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtonoff.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,413 @@
+#!/usr/bin/env python3
+import asyncio
+import sys
+
+from third_party import X, Y, Z
+
+from library import some_connection, \
+                    some_decorator
+# fmt: off
+from third_party import (X,
+                         Y, Z)
+# fmt: on
+f'trigger 3.6 mode'
+# Comment 1
+
+# Comment 2
+
+# fmt: off
+def func_no_args():
+  a; b; c
+  if True: raise RuntimeError
+  if False: ...
+  for i in range(10):
+    print(i)
+    continue
+  exec('new-style exec', {}, {})
+  return None
+async def coroutine(arg, exec=False):
+ 'Single-line docstring. Multiline is harder to reformat.'
+ async with some_connection() as conn:
+     await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
+ await asyncio.sleep(1)
+@asyncio.coroutine
+@some_decorator(
+with_args=True,
+many_args=[1,2,3]
+)
+def function_signature_stress_test(number:int,no_annotation=None,text:str='default',* ,debug:bool=False,**kwargs) -> str:
+ return text[number:-1]
+# fmt: on
+def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
+ offset = attr.ib(default=attr.Factory( lambda: _r.uniform(1, 2)))
+ assert task._cancel_stack[:len(old_stack)] == old_stack
+def spaces_types(a: int = 1, b: tuple = (), c: list = [], d: dict = {}, e: bool = True, f: int = -1, g: int = 1 if False else 2, h: str = "", i: str = r''): ...
+def spaces2(result= _core.Value(None)):
+ ...
+something = {
+    # fmt: off
+    key: 'value',
+}
+
+def subscriptlist():
+    atom[
+        # fmt: off
+        'some big and',
+        'complex subscript',
+        # fmt: on
+        goes + here, andhere,
+       ]
+
+def import_as_names():
+    # fmt: off
+    from hello import a,        b
+    'unformatted'
+    # fmt: on
+
+def testlist_star_expr():
+    # fmt: off
+    a , b = *hello
+    'unformatted'
+    # fmt: on
+
+def yield_expr():
+    # fmt: off
+    yield hello
+    'unformatted'
+    # fmt: on
+    'formatted'
+    # fmt: off
+    ( yield hello )
+    'unformatted'
+    # fmt: on
+
+def example(session):
+    # fmt: off
+    result = session\
+        .query(models.Customer.id)\
+        .filter(models.Customer.account_id == account_id,
+                models.Customer.email == email_address)\
+        .order_by(models.Customer.id.asc())\
+        .all()
+    # fmt: on
+def off_and_on_without_data():
+    """All comments here are technically on the same prefix.
+
+    The comments between will be formatted. This is a known limitation.
+    """
+    # fmt: off
+
+
+        #hey, that won't work
+
+
+    # fmt: on
+    pass
+def on_and_off_broken():
+    """Another known limitation."""
+    # fmt: on
+    # fmt: off
+    this=should.not_be.formatted()
+    and_=indeed . it  is  not  formatted
+    because . the . handling . inside . generate_ignored_nodes()
+    now . considers . multiple . fmt . directives . within . one . prefix
+    # fmt: on
+    # fmt: off
+        # ...but comments still get reformatted even though they should not be
+    # fmt: on
+def long_lines():
+    if True:
+        typedargslist.extend(
+            gen_annotated_params(ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True)
+        )
+        # fmt: off
+        a = (
+            unnecessary_bracket()
+        )
+        # fmt: on
+    _type_comment_re = re.compile(
+        r"""
+        ^
+        [\t ]*
+        \#[ ]type:[ ]*
+        (?P<type>
+            [^#\t\n]+?
+        )
+        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
+                        # a trailing space which is why we need the silliness below
+        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
+        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
+        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
+        [\t ]*
+        (?P<nl>
+            (?:\#[^\n]*)?
+            \n?
+        )
+        $
+        """,
+        # fmt: off
+        re.MULTILINE|re.VERBOSE
+        # fmt: on
+    )
+def single_literal_yapf_disable():
+    """Black does not support this."""
+    BAZ = {
+        (1, 2, 3, 4),
+        (5, 6, 7, 8),
+        (9, 10, 11, 12)
+    }  # yapf: disable
+cfg.rule(
+    "Default", "address",
+    xxxx_xxxx=["xxx-xxxxxx-xxxxxxxxxx"],
+    xxxxxx="xx_xxxxx", xxxxxxx="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+    xxxxxxxxx_xxxx=True, xxxxxxxx_xxxxxxxxxx=False,
+    xxxxxx_xxxxxx=2, xxxxxx_xxxxx_xxxxxxxx=70, xxxxxx_xxxxxx_xxxxx=True,
+    # fmt: off
+    xxxxxxx_xxxxxxxxxxxx={
+        "xxxxxxxx": {
+            "xxxxxx": False,
+            "xxxxxxx": False,
+            "xxxx_xxxxxx": "xxxxx",
+        },
+        "xxxxxxxx-xxxxx": {
+            "xxxxxx": False,
+            "xxxxxxx": True,
+            "xxxx_xxxxxx": "xxxxxx",
+        },
+    },
+    # fmt: on
+    xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5
+)
+# fmt: off
+yield  'hello'
+# No formatting to the end of the file
+l=[1,2,3]
+d={'a':1,
+   'b':2}
+
+# output
+
+
+#!/usr/bin/env python3
+import asyncio
+import sys
+
+from third_party import X, Y, Z
+
+from library import some_connection, some_decorator
+
+# fmt: off
+from third_party import (X,
+                         Y, Z)
+# fmt: on
+f"trigger 3.6 mode"
+# Comment 1
+
+# Comment 2
+
+# fmt: off
+def func_no_args():
+  a; b; c
+  if True: raise RuntimeError
+  if False: ...
+  for i in range(10):
+    print(i)
+    continue
+  exec('new-style exec', {}, {})
+  return None
+async def coroutine(arg, exec=False):
+ 'Single-line docstring. Multiline is harder to reformat.'
+ async with some_connection() as conn:
+     await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
+ await asyncio.sleep(1)
+@asyncio.coroutine
+@some_decorator(
+with_args=True,
+many_args=[1,2,3]
+)
+def function_signature_stress_test(number:int,no_annotation=None,text:str='default',* ,debug:bool=False,**kwargs) -> str:
+ return text[number:-1]
+# fmt: on
+def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r""):
+    offset = attr.ib(default=attr.Factory(lambda: _r.uniform(1, 2)))
+    assert task._cancel_stack[: len(old_stack)] == old_stack
+
+
+def spaces_types(
+    a: int = 1,
+    b: tuple = (),
+    c: list = [],
+    d: dict = {},
+    e: bool = True,
+    f: int = -1,
+    g: int = 1 if False else 2,
+    h: str = "",
+    i: str = r"",
+):
+    ...
+
+
+def spaces2(result=_core.Value(None)):
+    ...
+
+
+something = {
+    # fmt: off
+    key: 'value',
+}
+
+
+def subscriptlist():
+    atom[
+        # fmt: off
+        'some big and',
+        'complex subscript',
+        # fmt: on
+        goes + here,
+        andhere,
+    ]
+
+
+def import_as_names():
+    # fmt: off
+    from hello import a,        b
+    'unformatted'
+    # fmt: on
+
+
+def testlist_star_expr():
+    # fmt: off
+    a , b = *hello
+    'unformatted'
+    # fmt: on
+
+
+def yield_expr():
+    # fmt: off
+    yield hello
+    'unformatted'
+    # fmt: on
+    "formatted"
+    # fmt: off
+    ( yield hello )
+    'unformatted'
+    # fmt: on
+
+
+def example(session):
+    # fmt: off
+    result = session\
+        .query(models.Customer.id)\
+        .filter(models.Customer.account_id == account_id,
+                models.Customer.email == email_address)\
+        .order_by(models.Customer.id.asc())\
+        .all()
+    # fmt: on
+
+
+def off_and_on_without_data():
+    """All comments here are technically on the same prefix.
+
+    The comments between will be formatted. This is a known limitation.
+    """
+    # fmt: off
+
+    # hey, that won't work
+
+    # fmt: on
+    pass
+
+
+def on_and_off_broken():
+    """Another known limitation."""
+    # fmt: on
+    # fmt: off
+    this=should.not_be.formatted()
+    and_=indeed . it  is  not  formatted
+    because . the . handling . inside . generate_ignored_nodes()
+    now . considers . multiple . fmt . directives . within . one . prefix
+    # fmt: on
+    # fmt: off
+    # ...but comments still get reformatted even though they should not be
+    # fmt: on
+
+
+def long_lines():
+    if True:
+        typedargslist.extend(
+            gen_annotated_params(
+                ast_args.kwonlyargs,
+                ast_args.kw_defaults,
+                parameters,
+                implicit_default=True,
+            )
+        )
+        # fmt: off
+        a = (
+            unnecessary_bracket()
+        )
+        # fmt: on
+    _type_comment_re = re.compile(
+        r"""
+        ^
+        [\t ]*
+        \#[ ]type:[ ]*
+        (?P<type>
+            [^#\t\n]+?
+        )
+        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
+                        # a trailing space which is why we need the silliness below
+        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
+        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
+        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
+        [\t ]*
+        (?P<nl>
+            (?:\#[^\n]*)?
+            \n?
+        )
+        $
+        """,
+        # fmt: off
+        re.MULTILINE|re.VERBOSE
+        # fmt: on
+    )
+
+
+def single_literal_yapf_disable():
+    """Black does not support this."""
+    BAZ = {(1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12)}  # yapf: disable
+
+
+cfg.rule(
+    "Default",
+    "address",
+    xxxx_xxxx=["xxx-xxxxxx-xxxxxxxxxx"],
+    xxxxxx="xx_xxxxx",
+    xxxxxxx="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+    xxxxxxxxx_xxxx=True,
+    xxxxxxxx_xxxxxxxxxx=False,
+    xxxxxx_xxxxxx=2,
+    xxxxxx_xxxxx_xxxxxxxx=70,
+    xxxxxx_xxxxxx_xxxxx=True,
+    # fmt: off
+    xxxxxxx_xxxxxxxxxxxx={
+        "xxxxxxxx": {
+            "xxxxxx": False,
+            "xxxxxxx": False,
+            "xxxx_xxxxxx": "xxxxx",
+        },
+        "xxxxxxxx-xxxxx": {
+            "xxxxxx": False,
+            "xxxxxxx": True,
+            "xxxx_xxxxxx": "xxxxxx",
+        },
+    },
+    # fmt: on
+    xxxxxxxxxx_xxxxxxxxxxx_xxxxxxx_xxxxxxxxx=5,
+)
+# fmt: off
+yield  'hello'
+# No formatting to the end of the file
+l=[1,2,3]
+d={'a':1,
+   'b':2}
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip2.py 22.6.0-1/tests/data/simple_cases/fmtskip2.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip2.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip2.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,17 @@
+l1 = ["This list should be broken up", "into multiple lines", "because it is way too long"]
+l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"]  # fmt: skip
+l3 = ["I have", "trailing comma", "so I should be braked",]
+
+# output
+
+l1 = [
+    "This list should be broken up",
+    "into multiple lines",
+    "because it is way too long",
+]
+l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"]  # fmt: skip
+l3 = [
+    "I have",
+    "trailing comma",
+    "so I should be braked",
+]
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip3.py 22.6.0-1/tests/data/simple_cases/fmtskip3.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip3.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip3.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,20 @@
+a  =    3
+# fmt: off
+b,    c = 1, 2
+d =    6  # fmt: skip
+e = 5
+# fmt: on
+f = ["This is a very long line that should be formatted into a clearer line ", "by rearranging."]
+
+# output
+
+a = 3
+# fmt: off
+b,    c = 1, 2
+d =    6  # fmt: skip
+e = 5
+# fmt: on
+f = [
+    "This is a very long line that should be formatted into a clearer line ",
+    "by rearranging.",
+]
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip4.py 22.6.0-1/tests/data/simple_cases/fmtskip4.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip4.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip4.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,13 @@
+a =   2
+# fmt: skip
+l = [1, 2, 3,]
+
+# output
+
+a = 2
+# fmt: skip
+l = [
+    1,
+    2,
+    3,
+]
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip5.py 22.6.0-1/tests/data/simple_cases/fmtskip5.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip5.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip5.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,22 @@
+a, b, c = 3, 4,       5
+if (
+    a ==    3
+    and b    != 9  # fmt: skip
+    and c is not None
+):
+    print("I'm good!")
+else:
+    print("I'm bad")
+
+
+# output
+
+a, b, c = 3, 4, 5
+if (
+    a == 3
+    and b    != 9  # fmt: skip
+    and c is not None
+):
+    print("I'm good!")
+else:
+    print("I'm bad")
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip6.py 22.6.0-1/tests/data/simple_cases/fmtskip6.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip6.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip6.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,13 @@
+class A:
+    def f(self):
+        for line in range(10):
+            if True:
+                pass  # fmt: skip
+
+# output
+
+class A:
+    def f(self):
+        for line in range(10):
+            if True:
+                pass  # fmt: skip
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip7.py 22.6.0-1/tests/data/simple_cases/fmtskip7.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip7.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip7.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,11 @@
+a =     "this is some code"
+b =     5  #fmt:skip
+c = 9  #fmt: skip
+d = "thisisasuperlongstringthisisasuperlongstringthisisasuperlongstringthisisasuperlongstring"  #fmt:skip
+
+# output
+
+a = "this is some code"
+b =     5  # fmt:skip
+c = 9  # fmt: skip
+d = "thisisasuperlongstringthisisasuperlongstringthisisasuperlongstringthisisasuperlongstring"  # fmt:skip
diff -pruN 22.3.0-1/tests/data/simple_cases/fmtskip.py 22.6.0-1/tests/data/simple_cases/fmtskip.py
--- 22.3.0-1/tests/data/simple_cases/fmtskip.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fmtskip.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,3 @@
+a, b = 1, 2
+c =    6  # fmt: skip
+d = 5
diff -pruN 22.3.0-1/tests/data/simple_cases/fstring.py 22.6.0-1/tests/data/simple_cases/fstring.py
--- 22.3.0-1/tests/data/simple_cases/fstring.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/fstring.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,21 @@
+f"f-string without formatted values is just a string"
+f"{{NOT a formatted value}}"
+f"{{NOT 'a' \"formatted\" \"value\"}}"
+f"some f-string with {a} {few():.2f} {formatted.values!r}"
+f'some f-string with {a} {few(""):.2f} {formatted.values!r}'
+f"{f'''{'nested'} inner'''} outer"
+f"\"{f'{nested} inner'}\" outer"
+f"space between opening braces: { {a for a in (1, 2, 3)}}"
+f'Hello \'{tricky + "example"}\''
+
+# output
+
+f"f-string without formatted values is just a string"
+f"{{NOT a formatted value}}"
+f'{{NOT \'a\' "formatted" "value"}}'
+f"some f-string with {a} {few():.2f} {formatted.values!r}"
+f'some f-string with {a} {few(""):.2f} {formatted.values!r}'
+f"{f'''{'nested'} inner'''} outer"
+f"\"{f'{nested} inner'}\" outer"
+f"space between opening braces: { {a for a in (1, 2, 3)}}"
+f'Hello \'{tricky + "example"}\''
diff -pruN 22.3.0-1/tests/data/simple_cases/function2.py 22.6.0-1/tests/data/simple_cases/function2.py
--- 22.3.0-1/tests/data/simple_cases/function2.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/function2.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,121 @@
+def f(
+  a,
+  **kwargs,
+) -> A:
+    with cache_dir():
+        if something:
+            result = (
+                CliRunner().invoke(black.main, [str(src1), str(src2), "--diff", "--check"])
+            )
+    limited.append(-limited.pop())  # negate top
+    return A(
+        very_long_argument_name1=very_long_value_for_the_argument,
+        very_long_argument_name2=-very.long.value.for_the_argument,
+        **kwargs,
+    )
+def g():
+    "Docstring."
+    def inner():
+        pass
+    print("Inner defs should breathe a little.")
+def h():
+    def inner():
+        pass
+    print("Inner defs should breathe a little.")
+
+
+if os.name == "posix":
+    import termios
+    def i_should_be_followed_by_only_one_newline():
+        pass
+elif os.name == "nt":
+    try:
+        import msvcrt
+        def i_should_be_followed_by_only_one_newline():
+            pass
+
+    except ImportError:
+
+        def i_should_be_followed_by_only_one_newline():
+            pass
+
+elif False:
+
+    class IHopeYouAreHavingALovelyDay:
+        def __call__(self):
+            print("i_should_be_followed_by_only_one_newline")
+else:
+
+    def foo():
+        pass
+
+with hmm_but_this_should_get_two_preceding_newlines():
+    pass
+
+# output
+
+def f(
+    a,
+    **kwargs,
+) -> A:
+    with cache_dir():
+        if something:
+            result = CliRunner().invoke(
+                black.main, [str(src1), str(src2), "--diff", "--check"]
+            )
+    limited.append(-limited.pop())  # negate top
+    return A(
+        very_long_argument_name1=very_long_value_for_the_argument,
+        very_long_argument_name2=-very.long.value.for_the_argument,
+        **kwargs,
+    )
+
+
+def g():
+    "Docstring."
+
+    def inner():
+        pass
+
+    print("Inner defs should breathe a little.")
+
+
+def h():
+    def inner():
+        pass
+
+    print("Inner defs should breathe a little.")
+
+
+if os.name == "posix":
+    import termios
+
+    def i_should_be_followed_by_only_one_newline():
+        pass
+
+elif os.name == "nt":
+    try:
+        import msvcrt
+
+        def i_should_be_followed_by_only_one_newline():
+            pass
+
+    except ImportError:
+
+        def i_should_be_followed_by_only_one_newline():
+            pass
+
+elif False:
+
+    class IHopeYouAreHavingALovelyDay:
+        def __call__(self):
+            print("i_should_be_followed_by_only_one_newline")
+
+else:
+
+    def foo():
+        pass
+
+
+with hmm_but_this_should_get_two_preceding_newlines():
+    pass
diff -pruN 22.3.0-1/tests/data/simple_cases/function.py 22.6.0-1/tests/data/simple_cases/function.py
--- 22.3.0-1/tests/data/simple_cases/function.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/function.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,247 @@
+#!/usr/bin/env python3
+import asyncio
+import sys
+
+from third_party import X, Y, Z
+
+from library import some_connection, \
+                    some_decorator
+f'trigger 3.6 mode'
+def func_no_args():
+  a; b; c
+  if True: raise RuntimeError
+  if False: ...
+  for i in range(10):
+    print(i)
+    continue
+  exec("new-style exec", {}, {})
+  return None
+async def coroutine(arg, exec=False):
+ "Single-line docstring. Multiline is harder to reformat."
+ async with some_connection() as conn:
+     await conn.do_what_i_mean('SELECT bobby, tables FROM xkcd', timeout=2)
+ await asyncio.sleep(1)
+@asyncio.coroutine
+@some_decorator(
+with_args=True,
+many_args=[1,2,3]
+)
+def function_signature_stress_test(number:int,no_annotation=None,text:str="default",* ,debug:bool=False,**kwargs) -> str:
+ return text[number:-1]
+def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r''):
+ offset = attr.ib(default=attr.Factory( lambda: _r.uniform(10000, 200000)))
+ assert task._cancel_stack[:len(old_stack)] == old_stack
+def spaces_types(a: int = 1, b: tuple = (), c: list = [], d: dict = {}, e: bool = True, f: int = -1, g: int = 1 if False else 2, h: str = "", i: str = r''): ...
+def spaces2(result= _core.Value(None)):
+ assert fut is self._read_fut, (fut, self._read_fut)
+    # EMPTY LINE WITH WHITESPACE (this comment will be removed)
+def example(session):
+    result = session.query(models.Customer.id).filter(
+        models.Customer.account_id == account_id,
+        models.Customer.email == email_address,
+    ).order_by(
+        models.Customer.id.asc()
+    ).all()
+def long_lines():
+    if True:
+        typedargslist.extend(
+            gen_annotated_params(ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True)
+        )
+        typedargslist.extend(
+            gen_annotated_params(
+                ast_args.kwonlyargs, ast_args.kw_defaults, parameters, implicit_default=True,
+                # trailing standalone comment
+            )
+        )
+    _type_comment_re = re.compile(
+        r"""
+        ^
+        [\t ]*
+        \#[ ]type:[ ]*
+        (?P<type>
+            [^#\t\n]+?
+        )
+        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
+                        # a trailing space which is why we need the silliness below
+        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
+        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
+        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
+        [\t ]*
+        (?P<nl>
+            (?:\#[^\n]*)?
+            \n?
+        )
+        $
+        """, re.MULTILINE | re.VERBOSE
+    )
+def trailing_comma():
+    mapping = {
+    A: 0.25 * (10.0 / 12),
+    B: 0.1 * (10.0 / 12),
+    C: 0.1 * (10.0 / 12),
+    D: 0.1 * (10.0 / 12),
+}
+def f(
+  a,
+  **kwargs,
+) -> A:
+    return (
+        yield from A(
+            very_long_argument_name1=very_long_value_for_the_argument,
+            very_long_argument_name2=very_long_value_for_the_argument,
+            **kwargs,
+        )
+    )
+def __await__(): return (yield)
+
+# output
+
+
+#!/usr/bin/env python3
+import asyncio
+import sys
+
+from third_party import X, Y, Z
+
+from library import some_connection, some_decorator
+
+f"trigger 3.6 mode"
+
+
+def func_no_args():
+    a
+    b
+    c
+    if True:
+        raise RuntimeError
+    if False:
+        ...
+    for i in range(10):
+        print(i)
+        continue
+    exec("new-style exec", {}, {})
+    return None
+
+
+async def coroutine(arg, exec=False):
+    "Single-line docstring. Multiline is harder to reformat."
+    async with some_connection() as conn:
+        await conn.do_what_i_mean("SELECT bobby, tables FROM xkcd", timeout=2)
+    await asyncio.sleep(1)
+
+
+@asyncio.coroutine
+@some_decorator(with_args=True, many_args=[1, 2, 3])
+def function_signature_stress_test(
+    number: int,
+    no_annotation=None,
+    text: str = "default",
+    *,
+    debug: bool = False,
+    **kwargs,
+) -> str:
+    return text[number:-1]
+
+
+def spaces(a=1, b=(), c=[], d={}, e=True, f=-1, g=1 if False else 2, h="", i=r""):
+    offset = attr.ib(default=attr.Factory(lambda: _r.uniform(10000, 200000)))
+    assert task._cancel_stack[: len(old_stack)] == old_stack
+
+
+def spaces_types(
+    a: int = 1,
+    b: tuple = (),
+    c: list = [],
+    d: dict = {},
+    e: bool = True,
+    f: int = -1,
+    g: int = 1 if False else 2,
+    h: str = "",
+    i: str = r"",
+):
+    ...
+
+
+def spaces2(result=_core.Value(None)):
+    assert fut is self._read_fut, (fut, self._read_fut)
+
+
+def example(session):
+    result = (
+        session.query(models.Customer.id)
+        .filter(
+            models.Customer.account_id == account_id,
+            models.Customer.email == email_address,
+        )
+        .order_by(models.Customer.id.asc())
+        .all()
+    )
+
+
+def long_lines():
+    if True:
+        typedargslist.extend(
+            gen_annotated_params(
+                ast_args.kwonlyargs,
+                ast_args.kw_defaults,
+                parameters,
+                implicit_default=True,
+            )
+        )
+        typedargslist.extend(
+            gen_annotated_params(
+                ast_args.kwonlyargs,
+                ast_args.kw_defaults,
+                parameters,
+                implicit_default=True,
+                # trailing standalone comment
+            )
+        )
+    _type_comment_re = re.compile(
+        r"""
+        ^
+        [\t ]*
+        \#[ ]type:[ ]*
+        (?P<type>
+            [^#\t\n]+?
+        )
+        (?<!ignore)     # note: this will force the non-greedy + in <type> to match
+                        # a trailing space which is why we need the silliness below
+        (?<!ignore[ ]{1})(?<!ignore[ ]{2})(?<!ignore[ ]{3})(?<!ignore[ ]{4})
+        (?<!ignore[ ]{5})(?<!ignore[ ]{6})(?<!ignore[ ]{7})(?<!ignore[ ]{8})
+        (?<!ignore[ ]{9})(?<!ignore[ ]{10})
+        [\t ]*
+        (?P<nl>
+            (?:\#[^\n]*)?
+            \n?
+        )
+        $
+        """,
+        re.MULTILINE | re.VERBOSE,
+    )
+
+
+def trailing_comma():
+    mapping = {
+        A: 0.25 * (10.0 / 12),
+        B: 0.1 * (10.0 / 12),
+        C: 0.1 * (10.0 / 12),
+        D: 0.1 * (10.0 / 12),
+    }
+
+
+def f(
+    a,
+    **kwargs,
+) -> A:
+    return (
+        yield from A(
+            very_long_argument_name1=very_long_value_for_the_argument,
+            very_long_argument_name2=very_long_value_for_the_argument,
+            **kwargs,
+        )
+    )
+
+
+def __await__():
+    return (yield)
diff -pruN 22.3.0-1/tests/data/simple_cases/function_trailing_comma.py 22.6.0-1/tests/data/simple_cases/function_trailing_comma.py
--- 22.3.0-1/tests/data/simple_cases/function_trailing_comma.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/function_trailing_comma.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,153 @@
+def f(a,):
+    d = {'key': 'value',}
+    tup = (1,)
+
+def f2(a,b,):
+    d = {'key': 'value', 'key2': 'value2',}
+    tup = (1,2,)
+
+def f(a:int=1,):
+    call(arg={'explode': 'this',})
+    call2(arg=[1,2,3],)
+    x = {
+        "a": 1,
+        "b": 2,
+    }["a"]
+    if a == {"a": 1,"b": 2,"c": 3,"d": 4,"e": 5,"f": 6,"g": 7,"h": 8,}["a"]:
+        pass
+
+def xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+]:
+    json = {"k": {"k2": {"k3": [1,]}}}
+
+
+
+# The type annotation shouldn't get a trailing comma since that would change its type.
+# Relevant bug report: https://github.com/psf/black/issues/2381.
+def some_function_with_a_really_long_name() -> (
+    returning_a_deeply_nested_import_of_a_type_i_suppose
+):
+    pass
+
+
+def some_method_with_a_really_long_name(very_long_parameter_so_yeah: str, another_long_parameter: int) -> (
+    another_case_of_returning_a_deeply_nested_import_of_a_type_i_suppose_cause_why_not
+):
+    pass
+
+
+def func() -> (
+    also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(this_shouldn_t_get_a_trailing_comma_too)
+):
+    pass
+
+
+def func() -> ((also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
+        this_shouldn_t_get_a_trailing_comma_too
+    ))
+):
+    pass
+
+# output
+
+def f(
+    a,
+):
+    d = {
+        "key": "value",
+    }
+    tup = (1,)
+
+
+def f2(
+    a,
+    b,
+):
+    d = {
+        "key": "value",
+        "key2": "value2",
+    }
+    tup = (
+        1,
+        2,
+    )
+
+
+def f(
+    a: int = 1,
+):
+    call(
+        arg={
+            "explode": "this",
+        }
+    )
+    call2(
+        arg=[1, 2, 3],
+    )
+    x = {
+        "a": 1,
+        "b": 2,
+    }["a"]
+    if (
+        a
+        == {
+            "a": 1,
+            "b": 2,
+            "c": 3,
+            "d": 4,
+            "e": 5,
+            "f": 6,
+            "g": 7,
+            "h": 8,
+        }["a"]
+    ):
+        pass
+
+
+def xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+]:
+    json = {
+        "k": {
+            "k2": {
+                "k3": [
+                    1,
+                ]
+            }
+        }
+    }
+
+
+# The type annotation shouldn't get a trailing comma since that would change its type.
+# Relevant bug report: https://github.com/psf/black/issues/2381.
+def some_function_with_a_really_long_name() -> (
+    returning_a_deeply_nested_import_of_a_type_i_suppose
+):
+    pass
+
+
+def some_method_with_a_really_long_name(
+    very_long_parameter_so_yeah: str, another_long_parameter: int
+) -> (
+    another_case_of_returning_a_deeply_nested_import_of_a_type_i_suppose_cause_why_not
+):
+    pass
+
+
+def func() -> (
+    also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
+        this_shouldn_t_get_a_trailing_comma_too
+    )
+):
+    pass
+
+
+def func() -> (
+    (
+        also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
+            this_shouldn_t_get_a_trailing_comma_too
+        )
+    )
+):
+    pass
diff -pruN 22.3.0-1/tests/data/simple_cases/import_spacing.py 22.6.0-1/tests/data/simple_cases/import_spacing.py
--- 22.3.0-1/tests/data/simple_cases/import_spacing.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/import_spacing.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,118 @@
+"""The asyncio package, tracking PEP 3156."""
+
+# flake8: noqa
+
+from logging import (
+    WARNING
+)
+from logging import (
+    ERROR,
+)
+import sys
+
+# This relies on each of the submodules having an __all__ variable.
+from .base_events import *
+from .coroutines import *
+from .events import *  # comment here
+
+from .futures import *
+from .locks import *  # comment here
+from .protocols import *
+
+from ..runners import *  # comment here
+from ..queues import *
+from ..streams import *
+
+from some_library import (
+    Just, Enough, Libraries, To, Fit, In, This, Nice, Split, Which, We, No, Longer, Use
+)
+from name_of_a_company.extremely_long_project_name.component.ttypes import CuteLittleServiceHandlerFactoryyy
+from name_of_a_company.extremely_long_project_name.extremely_long_component_name.ttypes import *
+
+from .a.b.c.subprocess import *
+from . import (tasks)
+from . import (A, B, C)
+from . import SomeVeryLongNameAndAllOfItsAdditionalLetters1, \
+              SomeVeryLongNameAndAllOfItsAdditionalLetters2
+
+__all__ = (
+    base_events.__all__
+    + coroutines.__all__
+    + events.__all__
+    + futures.__all__
+    + locks.__all__
+    + protocols.__all__
+    + runners.__all__
+    + queues.__all__
+    + streams.__all__
+    + tasks.__all__
+)
+
+
+# output
+
+
+"""The asyncio package, tracking PEP 3156."""
+
+# flake8: noqa
+
+from logging import WARNING
+from logging import (
+    ERROR,
+)
+import sys
+
+# This relies on each of the submodules having an __all__ variable.
+from .base_events import *
+from .coroutines import *
+from .events import *  # comment here
+
+from .futures import *
+from .locks import *  # comment here
+from .protocols import *
+
+from ..runners import *  # comment here
+from ..queues import *
+from ..streams import *
+
+from some_library import (
+    Just,
+    Enough,
+    Libraries,
+    To,
+    Fit,
+    In,
+    This,
+    Nice,
+    Split,
+    Which,
+    We,
+    No,
+    Longer,
+    Use,
+)
+from name_of_a_company.extremely_long_project_name.component.ttypes import (
+    CuteLittleServiceHandlerFactoryyy,
+)
+from name_of_a_company.extremely_long_project_name.extremely_long_component_name.ttypes import *
+
+from .a.b.c.subprocess import *
+from . import tasks
+from . import A, B, C
+from . import (
+    SomeVeryLongNameAndAllOfItsAdditionalLetters1,
+    SomeVeryLongNameAndAllOfItsAdditionalLetters2,
+)
+
+__all__ = (
+    base_events.__all__
+    + coroutines.__all__
+    + events.__all__
+    + futures.__all__
+    + locks.__all__
+    + protocols.__all__
+    + runners.__all__
+    + queues.__all__
+    + streams.__all__
+    + tasks.__all__
+)
diff -pruN 22.3.0-1/tests/data/simple_cases/power_op_spacing.py 22.6.0-1/tests/data/simple_cases/power_op_spacing.py
--- 22.3.0-1/tests/data/simple_cases/power_op_spacing.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/power_op_spacing.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,103 @@
+def function(**kwargs):
+    t = a**2 + b**3
+    return t ** 2
+
+
+def function_replace_spaces(**kwargs):
+    t = a **2 + b** 3 + c ** 4
+
+
+def function_dont_replace_spaces():
+    {**a, **b, **c}
+
+
+a = 5**~4
+b = 5 ** f()
+c = -(5**2)
+d = 5 ** f["hi"]
+e = lazy(lambda **kwargs: 5)
+f = f() ** 5
+g = a.b**c.d
+h = 5 ** funcs.f()
+i = funcs.f() ** 5
+j = super().name ** 5
+k = [(2**idx, value) for idx, value in pairs]
+l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
+m = [([2**63], [1, 2**63])]
+n = count <= 10**5
+o = settings(max_examples=10**6)
+p = {(k, k**2): v**2 for k, v in pairs}
+q = [10**i for i in range(6)]
+r = x**y
+
+a = 5.0**~4.0
+b = 5.0 ** f()
+c = -(5.0**2.0)
+d = 5.0 ** f["hi"]
+e = lazy(lambda **kwargs: 5)
+f = f() ** 5.0
+g = a.b**c.d
+h = 5.0 ** funcs.f()
+i = funcs.f() ** 5.0
+j = super().name ** 5.0
+k = [(2.0**idx, value) for idx, value in pairs]
+l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
+m = [([2.0**63.0], [1.0, 2**63.0])]
+n = count <= 10**5.0
+o = settings(max_examples=10**6.0)
+p = {(k, k**2): v**2.0 for k, v in pairs}
+q = [10.5**i for i in range(6)]
+
+
+# output
+
+
+def function(**kwargs):
+    t = a**2 + b**3
+    return t**2
+
+
+def function_replace_spaces(**kwargs):
+    t = a**2 + b**3 + c**4
+
+
+def function_dont_replace_spaces():
+    {**a, **b, **c}
+
+
+a = 5**~4
+b = 5 ** f()
+c = -(5**2)
+d = 5 ** f["hi"]
+e = lazy(lambda **kwargs: 5)
+f = f() ** 5
+g = a.b**c.d
+h = 5 ** funcs.f()
+i = funcs.f() ** 5
+j = super().name ** 5
+k = [(2**idx, value) for idx, value in pairs]
+l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
+m = [([2**63], [1, 2**63])]
+n = count <= 10**5
+o = settings(max_examples=10**6)
+p = {(k, k**2): v**2 for k, v in pairs}
+q = [10**i for i in range(6)]
+r = x**y
+
+a = 5.0**~4.0
+b = 5.0 ** f()
+c = -(5.0**2.0)
+d = 5.0 ** f["hi"]
+e = lazy(lambda **kwargs: 5)
+f = f() ** 5.0
+g = a.b**c.d
+h = 5.0 ** funcs.f()
+i = funcs.f() ** 5.0
+j = super().name ** 5.0
+k = [(2.0**idx, value) for idx, value in pairs]
+l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001)
+m = [([2.0**63.0], [1.0, 2**63.0])]
+n = count <= 10**5.0
+o = settings(max_examples=10**6.0)
+p = {(k, k**2): v**2.0 for k, v in pairs}
+q = [10.5**i for i in range(6)]
diff -pruN 22.3.0-1/tests/data/simple_cases/remove_parens.py 22.6.0-1/tests/data/simple_cases/remove_parens.py
--- 22.3.0-1/tests/data/simple_cases/remove_parens.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/remove_parens.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,142 @@
+x = (1)
+x = (1.2)
+
+data = (
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+).encode()
+
+async def show_status():
+    while True:
+        try:
+            if report_host:
+                data = (
+                   f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+               ).encode()
+        except Exception as e:
+            pass
+
+def example():
+    return (("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
+
+
+def example1():
+    return ((1111111111111111111111111111111111111111111111111111111111111111111111111111111111111))
+
+
+def example1point5():
+    return ((((((1111111111111111111111111111111111111111111111111111111111111111111111111111111111111))))))
+
+
+def example2():
+    return (("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
+
+
+def example3():
+    return ((1111111111111111111111111111111111111111111111111111111111111111111111111111111))
+
+
+def example4():
+    return ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((True))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+
+def example5():
+    return ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+
+def example6():
+    return ((((((((({a:a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]})))))))))
+
+
+def example7():
+    return ((((((((({a:a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20000000000000000000]})))))))))
+
+
+def example8():
+    return (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((None)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+# output
+x = 1
+x = 1.2
+
+data = (
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+).encode()
+
+
+async def show_status():
+    while True:
+        try:
+            if report_host:
+                data = (
+                    f"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+                ).encode()
+        except Exception as e:
+            pass
+
+
+def example():
+    return "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
+
+def example1():
+    return 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+
+
+def example1point5():
+    return 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+
+
+def example2():
+    return (
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    )
+
+
+def example3():
+    return (
+        1111111111111111111111111111111111111111111111111111111111111111111111111111111
+    )
+
+
+def example4():
+    return True
+
+
+def example5():
+    return ()
+
+
+def example6():
+    return {a: a for a in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]}
+
+
+def example7():
+    return {
+        a: a
+        for a in [
+            1,
+            2,
+            3,
+            4,
+            5,
+            6,
+            7,
+            8,
+            9,
+            10,
+            11,
+            12,
+            13,
+            14,
+            15,
+            16,
+            17,
+            18,
+            19,
+            20000000000000000000,
+        ]
+    }
+
+
+def example8():
+    return None
diff -pruN 22.3.0-1/tests/data/simple_cases/slices.py 22.6.0-1/tests/data/simple_cases/slices.py
--- 22.3.0-1/tests/data/simple_cases/slices.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/slices.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,31 @@
+slice[a.b : c.d]
+slice[d :: d + 1]
+slice[d + 1 :: d]
+slice[d::d]
+slice[0]
+slice[-1]
+slice[:-1]
+slice[::-1]
+slice[:c, c - 1]
+slice[c, c + 1, d::]
+slice[ham[c::d] :: 1]
+slice[ham[cheese**2 : -1] : 1 : 1, ham[1:2]]
+slice[:-1:]
+slice[lambda: None : lambda: None]
+slice[lambda x, y, *args, really=2, **kwargs: None :, None::]
+slice[1 or 2 : True and False]
+slice[not so_simple : 1 < val <= 10]
+slice[(1 for i in range(42)) : x]
+slice[:: [i for i in range(42)]]
+
+
+async def f():
+    slice[await x : [i async for i in arange(42)] : 42]
+
+
+# These are from PEP-8:
+ham[1:9], ham[1:9:3], ham[:9:3], ham[1::3], ham[1:9:]
+ham[lower:upper], ham[lower:upper:], ham[lower::step]
+# ham[lower+offset : upper+offset]
+ham[: upper_fn(x) : step_fn(x)], ham[:: step_fn(x)]
+ham[lower + offset : upper + offset]
diff -pruN 22.3.0-1/tests/data/simple_cases/string_prefixes.py 22.6.0-1/tests/data/simple_cases/string_prefixes.py
--- 22.3.0-1/tests/data/simple_cases/string_prefixes.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/string_prefixes.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+
+name = "Łukasz"
+(f"hello {name}", F"hello {name}")
+(b"", B"")
+(u"", U"")
+(r"", R"")
+
+(rf"", fr"", Rf"", fR"", rF"", Fr"", RF"", FR"")
+(rb"", br"", Rb"", bR"", rB"", Br"", RB"", BR"")
+
+
+def docstring_singleline():
+    R"""2020 was one hell of a year. The good news is that we were able to"""
+
+
+def docstring_multiline():
+    R"""
+    clear out all of the issues opened in that time :p
+    """
+
+
+# output
+
+
+#!/usr/bin/env python3
+
+name = "Łukasz"
+(f"hello {name}", f"hello {name}")
+(b"", b"")
+("", "")
+(r"", R"")
+
+(rf"", rf"", Rf"", Rf"", rf"", rf"", Rf"", Rf"")
+(rb"", rb"", Rb"", Rb"", rb"", rb"", Rb"", Rb"")
+
+
+def docstring_singleline():
+    R"""2020 was one hell of a year. The good news is that we were able to"""
+
+
+def docstring_multiline():
+    R"""
+    clear out all of the issues opened in that time :p
+    """
diff -pruN 22.3.0-1/tests/data/simple_cases/torture.py 22.6.0-1/tests/data/simple_cases/torture.py
--- 22.3.0-1/tests/data/simple_cases/torture.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/torture.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,91 @@
+importA;() << 0 ** 101234234242352525425252352352525234890264906820496920680926538059059209922523523525 #
+
+assert sort_by_dependency(
+    {
+        "1": {"2", "3"}, "2": {"2a", "2b"}, "3": {"3a", "3b"},
+        "2a": set(), "2b": set(), "3a": set(), "3b": set()
+    }
+) == ["2a", "2b", "2", "3a", "3b", "3", "1"]
+
+importA
+0;0^0#
+
+class A:
+    def foo(self):
+        for _ in range(10):
+            aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc(  # pylint: disable=no-member
+                xxxxxxxxxxxx
+            )
+
+def test(self, othr):
+    return (1 == 2 and
+            (name, description, self.default, self.selected, self.auto_generated, self.parameters, self.meta_data, self.schedule) ==
+            (name, description, othr.default, othr.selected, othr.auto_generated, othr.parameters, othr.meta_data, othr.schedule))
+
+
+assert (
+    a_function(very_long_arguments_that_surpass_the_limit, which_is_eighty_eight_in_this_case_plus_a_bit_more)
+    == {"x": "this need to pass the line limit as well", "b": "but only by a little bit"}
+)
+
+# output
+
+importA
+(
+    ()
+    << 0
+    ** 101234234242352525425252352352525234890264906820496920680926538059059209922523523525
+)  #
+
+assert sort_by_dependency(
+    {
+        "1": {"2", "3"},
+        "2": {"2a", "2b"},
+        "3": {"3a", "3b"},
+        "2a": set(),
+        "2b": set(),
+        "3a": set(),
+        "3b": set(),
+    }
+) == ["2a", "2b", "2", "3a", "3b", "3", "1"]
+
+importA
+0
+0 ^ 0  #
+
+
+class A:
+    def foo(self):
+        for _ in range(10):
+            aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc(
+                xxxxxxxxxxxx
+            )  # pylint: disable=no-member
+
+
+def test(self, othr):
+    return 1 == 2 and (
+        name,
+        description,
+        self.default,
+        self.selected,
+        self.auto_generated,
+        self.parameters,
+        self.meta_data,
+        self.schedule,
+    ) == (
+        name,
+        description,
+        othr.default,
+        othr.selected,
+        othr.auto_generated,
+        othr.parameters,
+        othr.meta_data,
+        othr.schedule,
+    )
+
+
+assert a_function(
+    very_long_arguments_that_surpass_the_limit,
+    which_is_eighty_eight_in_this_case_plus_a_bit_more,
+) == {"x": "this need to pass the line limit as well", "b": "but only by a little bit"}
+
diff -pruN 22.3.0-1/tests/data/simple_cases/trailing_comma_optional_parens1.py 22.6.0-1/tests/data/simple_cases/trailing_comma_optional_parens1.py
--- 22.3.0-1/tests/data/simple_cases/trailing_comma_optional_parens1.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/trailing_comma_optional_parens1.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,63 @@
+if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT,
+                        _winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
+    pass
+
+if x:
+    if y:
+        new_id = max(Vegetable.objects.order_by('-id')[0].id,
+                     Mineral.objects.order_by('-id')[0].id) + 1
+
+class X:
+    def get_help_text(self):
+        return ngettext(
+            "Your password must contain at least %(min_length)d character.",
+            "Your password must contain at least %(min_length)d characters.",
+            self.min_length,
+        ) % {'min_length': self.min_length}
+
+class A:
+    def b(self):
+        if self.connection.mysql_is_mariadb and (
+            10,
+            4,
+            3,
+        ) < self.connection.mysql_version < (10, 5, 2):
+            pass
+
+
+# output
+
+if e1234123412341234.winerror not in (
+    _winapi.ERROR_SEM_TIMEOUT,
+    _winapi.ERROR_PIPE_BUSY,
+) or _check_timeout(t):
+    pass
+
+if x:
+    if y:
+        new_id = (
+            max(
+                Vegetable.objects.order_by("-id")[0].id,
+                Mineral.objects.order_by("-id")[0].id,
+            )
+            + 1
+        )
+
+
+class X:
+    def get_help_text(self):
+        return ngettext(
+            "Your password must contain at least %(min_length)d character.",
+            "Your password must contain at least %(min_length)d characters.",
+            self.min_length,
+        ) % {"min_length": self.min_length}
+
+
+class A:
+    def b(self):
+        if self.connection.mysql_is_mariadb and (
+            10,
+            4,
+            3,
+        ) < self.connection.mysql_version < (10, 5, 2):
+            pass
diff -pruN 22.3.0-1/tests/data/simple_cases/trailing_comma_optional_parens2.py 22.6.0-1/tests/data/simple_cases/trailing_comma_optional_parens2.py
--- 22.3.0-1/tests/data/simple_cases/trailing_comma_optional_parens2.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/trailing_comma_optional_parens2.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,12 @@
+if (e123456.get_tk_patchlevel() >= (8, 6, 0, 'final') or
+    (8, 5, 8) <= get_tk_patchlevel() < (8, 6)):
+    pass
+
+# output
+
+if e123456.get_tk_patchlevel() >= (8, 6, 0, "final") or (
+    8,
+    5,
+    8,
+) <= get_tk_patchlevel() < (8, 6):
+    pass
diff -pruN 22.3.0-1/tests/data/simple_cases/trailing_comma_optional_parens3.py 22.6.0-1/tests/data/simple_cases/trailing_comma_optional_parens3.py
--- 22.3.0-1/tests/data/simple_cases/trailing_comma_optional_parens3.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/trailing_comma_optional_parens3.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,21 @@
+if True:
+    if True:
+        if True:
+            return _(
+                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweas "
+                + "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwegqweasdzxcqweasdzxc.",
+                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwe",
+            ) % {"reported_username": reported_username, "report_reason": report_reason}
+
+
+# output
+
+
+if True:
+    if True:
+        if True:
+            return _(
+                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweas "
+                + "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwegqweasdzxcqweasdzxc.",
+                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwe",
+            ) % {"reported_username": reported_username, "report_reason": report_reason}
diff -pruN 22.3.0-1/tests/data/simple_cases/tricky_unicode_symbols.py 22.6.0-1/tests/data/simple_cases/tricky_unicode_symbols.py
--- 22.3.0-1/tests/data/simple_cases/tricky_unicode_symbols.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/tricky_unicode_symbols.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,9 @@
+ä = 1
+µ = 2
+蟒 = 3
+x󠄀 = 4
+មុ = 1
+Q̇_per_meter = 4
+
+A᧚ = 3
+A፩ = 8
diff -pruN 22.3.0-1/tests/data/simple_cases/tupleassign.py 22.6.0-1/tests/data/simple_cases/tupleassign.py
--- 22.3.0-1/tests/data/simple_cases/tupleassign.py	1970-01-01 00:00:00.000000000 +0000
+++ 22.6.0-1/tests/data/simple_cases/tupleassign.py	2022-06-28 00:33:35.000000000 +0000
@@ -0,0 +1,23 @@
+# This is a standalone comment.
+sdfjklsdfsjldkflkjsf, sdfjsdfjlksdljkfsdlkf, sdfsdjfklsdfjlksdljkf, sdsfsdfjskdflsfsdf = 1, 2, 3
+
+# This is as well.
+this_will_be_wrapped_in_parens, = struct.unpack(b"12345678901234567890")
+
+(a,) = call()
+
+# output
+
+
+# This is a standalone comment.
+(
+    sdfjklsdfsjldkflkjsf,
+    sdfjsdfjlksdljkfsdlkf,
+    sdfsdjfklsdfjlksdljkf,
+    sdsfsdfjskdflsfsdf,
+) = (1, 2, 3)
+
+# This is as well.
+(this_will_be_wrapped_in_parens,) = struct.unpack(b"12345678901234567890")
+
+(a,) = call()
\ No newline at end of file
diff -pruN 22.3.0-1/tests/data/slices.py 22.6.0-1/tests/data/slices.py
--- 22.3.0-1/tests/data/slices.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/slices.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,31 +0,0 @@
-slice[a.b : c.d]
-slice[d :: d + 1]
-slice[d + 1 :: d]
-slice[d::d]
-slice[0]
-slice[-1]
-slice[:-1]
-slice[::-1]
-slice[:c, c - 1]
-slice[c, c + 1, d::]
-slice[ham[c::d] :: 1]
-slice[ham[cheese**2 : -1] : 1 : 1, ham[1:2]]
-slice[:-1:]
-slice[lambda: None : lambda: None]
-slice[lambda x, y, *args, really=2, **kwargs: None :, None::]
-slice[1 or 2 : True and False]
-slice[not so_simple : 1 < val <= 10]
-slice[(1 for i in range(42)) : x]
-slice[:: [i for i in range(42)]]
-
-
-async def f():
-    slice[await x : [i async for i in arange(42)] : 42]
-
-
-# These are from PEP-8:
-ham[1:9], ham[1:9:3], ham[:9:3], ham[1::3], ham[1:9:]
-ham[lower:upper], ham[lower:upper:], ham[lower::step]
-# ham[lower+offset : upper+offset]
-ham[: upper_fn(x) : step_fn(x)], ham[:: step_fn(x)]
-ham[lower + offset : upper + offset]
diff -pruN 22.3.0-1/tests/data/starred_for_target.py 22.6.0-1/tests/data/starred_for_target.py
--- 22.3.0-1/tests/data/starred_for_target.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/starred_for_target.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-for x in *a, *b:
-    print(x)
-
-for x in a, b, *c:
-    print(x)
-
-for x in *a, b, c:
-    print(x)
-
-for x in *a, b, *c:
-    print(x)
-
-async for x in *a, *b:
-    print(x)
-
-async for x in *a, b, *c:
-    print(x)
-
-async for x in a, b, *c:
-    print(x)
-
-async for x in (
-    *loooooooooooooooooooooong,
-    very,
-    *loooooooooooooooooooooooooooooooooooooooooooooooong,
-):
-    print(x)
diff -pruN 22.3.0-1/tests/data/string_prefixes.py 22.6.0-1/tests/data/string_prefixes.py
--- 22.3.0-1/tests/data/string_prefixes.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/string_prefixes.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3
-
-name = "Łukasz"
-(f"hello {name}", F"hello {name}")
-(b"", B"")
-(u"", U"")
-(r"", R"")
-
-(rf"", fr"", Rf"", fR"", rF"", Fr"", RF"", FR"")
-(rb"", br"", Rb"", bR"", rB"", Br"", RB"", BR"")
-
-
-def docstring_singleline():
-    R"""2020 was one hell of a year. The good news is that we were able to"""
-
-
-def docstring_multiline():
-    R"""
-    clear out all of the issues opened in that time :p
-    """
-
-
-# output
-
-
-#!/usr/bin/env python3
-
-name = "Łukasz"
-(f"hello {name}", f"hello {name}")
-(b"", b"")
-("", "")
-(r"", R"")
-
-(rf"", rf"", Rf"", Rf"", rf"", rf"", Rf"", Rf"")
-(rb"", rb"", Rb"", Rb"", rb"", rb"", Rb"", Rb"")
-
-
-def docstring_singleline():
-    R"""2020 was one hell of a year. The good news is that we were able to"""
-
-
-def docstring_multiline():
-    R"""
-    clear out all of the issues opened in that time :p
-    """
diff -pruN 22.3.0-1/tests/data/string_quotes.py 22.6.0-1/tests/data/string_quotes.py
--- 22.3.0-1/tests/data/string_quotes.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/string_quotes.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,112 +0,0 @@
-''''''
-'\''
-'"'
-"'"
-"\""
-"Hello"
-"Don't do that"
-'Here is a "'
-'What\'s the deal here?'
-"What's the deal \"here\"?"
-"And \"here\"?"
-"""Strings with "" in them"""
-'''Strings with "" in them'''
-'''Here's a "'''
-'''Here's a " '''
-'''Just a normal triple
-quote'''
-f"just a normal {f} string"
-f'''This is a triple-quoted {f}-string'''
-f'MOAR {" ".join([])}'
-f"MOAR {' '.join([])}"
-r"raw string ftw"
-r'Date d\'expiration:(.*)'
-r'Tricky "quote'
-r'Not-so-tricky \"quote'
-rf'{yay}'
-'\n\
-The \"quick\"\n\
-brown fox\n\
-jumps over\n\
-the \'lazy\' dog.\n\
-'
-re.compile(r'[\\"]')
-"x = ''; y = \"\""
-"x = '''; y = \"\""
-"x = ''''; y = \"\""
-"x = '' ''; y = \"\""
-"x = ''; y = \"\"\""
-"x = '''; y = \"\"\"\""
-"x = ''''; y = \"\"\"\"\""
-"x = '' ''; y = \"\"\"\"\""
-'unnecessary \"\"escaping'
-"unnecessary \'\'escaping"
-'\\""'
-"\\''"
-'Lots of \\\\\\\\\'quotes\''
-f'{y * " "} \'{z}\''
-f'{{y * " "}} \'{z}\''
-f'\'{z}\' {y * " "}'
-f'{y * x} \'{z}\''
-'\'{z}\' {y * " "}'
-'{y * x} \'{z}\''
-
-# We must bail out if changing the quotes would introduce backslashes in f-string
-# expressions. xref: https://github.com/psf/black/issues/2348
-f"\"{b}\"{' ' * (long-len(b)+1)}: \"{sts}\",\n"
-f"\"{a}\"{'hello' * b}\"{c}\""
-
-# output
-
-""""""
-"'"
-'"'
-"'"
-'"'
-"Hello"
-"Don't do that"
-'Here is a "'
-"What's the deal here?"
-'What\'s the deal "here"?'
-'And "here"?'
-"""Strings with "" in them"""
-"""Strings with "" in them"""
-'''Here's a "'''
-"""Here's a " """
-"""Just a normal triple
-quote"""
-f"just a normal {f} string"
-f"""This is a triple-quoted {f}-string"""
-f'MOAR {" ".join([])}'
-f"MOAR {' '.join([])}"
-r"raw string ftw"
-r"Date d\'expiration:(.*)"
-r'Tricky "quote'
-r"Not-so-tricky \"quote"
-rf"{yay}"
-"\nThe \"quick\"\nbrown fox\njumps over\nthe 'lazy' dog.\n"
-re.compile(r'[\\"]')
-"x = ''; y = \"\""
-"x = '''; y = \"\""
-"x = ''''; y = \"\""
-"x = '' ''; y = \"\""
-'x = \'\'; y = """'
-'x = \'\'\'; y = """"'
-'x = \'\'\'\'; y = """""'
-'x = \'\' \'\'; y = """""'
-'unnecessary ""escaping'
-"unnecessary ''escaping"
-'\\""'
-"\\''"
-"Lots of \\\\\\\\'quotes'"
-f'{y * " "} \'{z}\''
-f"{{y * \" \"}} '{z}'"
-f'\'{z}\' {y * " "}'
-f"{y * x} '{z}'"
-"'{z}' {y * \" \"}"
-"{y * x} '{z}'"
-
-# We must bail out if changing the quotes would introduce backslashes in f-string
-# expressions. xref: https://github.com/psf/black/issues/2348
-f"\"{b}\"{' ' * (long-len(b)+1)}: \"{sts}\",\n"
-f"\"{a}\"{'hello' * b}\"{c}\""
diff -pruN 22.3.0-1/tests/data/stub.pyi 22.6.0-1/tests/data/stub.pyi
--- 22.3.0-1/tests/data/stub.pyi	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/stub.pyi	1970-01-01 00:00:00.000000000 +0000
@@ -1,151 +0,0 @@
-X: int
-
-def f(): ...
-
-
-class D: 
-    ...
-
-
-class C:
-    ...
-
-class B:
-    this_lack_of_newline_should_be_kept: int
-    def b(self) -> None: ...
-
-    but_this_newline_should_also_be_kept: int
-
-class A:
-    attr: int
-    attr2: str
-
-    def f(self) -> int:
-        ...
-
-    def g(self) -> str: ...
-
-
-
-def g():
-    ...
-
-def h(): ...
-
-if sys.version_info >= (3, 8):
-    class E:
-        def f(self): ...
-    class F:
-
-        def f(self): ...
-    class G: ...
-    class H: ...
-else:
-    class I: ...
-    class J: ...
-    def f(): ...
-
-    class K:
-        def f(self): ...
-    def f(): ...
-
-class Nested:
-    class dirty: ...
-    class little: ...
-    class secret:
-        def who_has_to_know(self): ...
-    def verse(self): ...
-
-class Conditional:
-    def f(self): ...
-    if sys.version_info >= (3, 8):
-        def g(self): ...
-    else:
-        def g(self): ...
-    def h(self): ...
-    def i(self): ...
-    if sys.version_info >= (3, 8):
-        def j(self): ...
-    def k(self): ...
-    if sys.version_info >= (3, 8):
-        class A: ...
-        class B: ...
-        class C:
-            def l(self): ...
-            def m(self): ...
-
-
-# output
-X: int
-
-def f(): ...
-
-class D: ...
-class C: ...
-
-class B:
-    this_lack_of_newline_should_be_kept: int
-    def b(self) -> None: ...
-
-    but_this_newline_should_also_be_kept: int
-
-class A:
-    attr: int
-    attr2: str
-
-    def f(self) -> int: ...
-    def g(self) -> str: ...
-
-def g(): ...
-def h(): ...
-
-if sys.version_info >= (3, 8):
-    class E:
-        def f(self): ...
-
-    class F:
-        def f(self): ...
-
-    class G: ...
-    class H: ...
-
-else:
-    class I: ...
-    class J: ...
-
-    def f(): ...
-
-    class K:
-        def f(self): ...
-
-    def f(): ...
-
-class Nested:
-    class dirty: ...
-    class little: ...
-
-    class secret:
-        def who_has_to_know(self): ...
-
-    def verse(self): ...
-
-class Conditional:
-    def f(self): ...
-    if sys.version_info >= (3, 8):
-        def g(self): ...
-    else:
-        def g(self): ...
-
-    def h(self): ...
-    def i(self): ...
-    if sys.version_info >= (3, 8):
-        def j(self): ...
-
-    def k(self): ...
-    if sys.version_info >= (3, 8):
-        class A: ...
-        class B: ...
-
-        class C:
-            def l(self): ...
-            def m(self): ...
diff -pruN 22.3.0-1/tests/data/torture.py 22.6.0-1/tests/data/torture.py
--- 22.3.0-1/tests/data/torture.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/torture.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,91 +0,0 @@
-importA;() << 0 ** 101234234242352525425252352352525234890264906820496920680926538059059209922523523525 #
-
-assert sort_by_dependency(
-    {
-        "1": {"2", "3"}, "2": {"2a", "2b"}, "3": {"3a", "3b"},
-        "2a": set(), "2b": set(), "3a": set(), "3b": set()
-    }
-) == ["2a", "2b", "2", "3a", "3b", "3", "1"]
-
-importA
-0;0^0#
-
-class A:
-    def foo(self):
-        for _ in range(10):
-            aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc(  # pylint: disable=no-member
-                xxxxxxxxxxxx
-            )
-
-def test(self, othr):
-    return (1 == 2 and
-            (name, description, self.default, self.selected, self.auto_generated, self.parameters, self.meta_data, self.schedule) ==
-            (name, description, othr.default, othr.selected, othr.auto_generated, othr.parameters, othr.meta_data, othr.schedule))
-
-
-assert (
-    a_function(very_long_arguments_that_surpass_the_limit, which_is_eighty_eight_in_this_case_plus_a_bit_more)
-    == {"x": "this need to pass the line limit as well", "b": "but only by a little bit"}
-)
-
-# output
-
-importA
-(
-    ()
-    << 0
-    ** 101234234242352525425252352352525234890264906820496920680926538059059209922523523525
-)  #
-
-assert sort_by_dependency(
-    {
-        "1": {"2", "3"},
-        "2": {"2a", "2b"},
-        "3": {"3a", "3b"},
-        "2a": set(),
-        "2b": set(),
-        "3a": set(),
-        "3b": set(),
-    }
-) == ["2a", "2b", "2", "3a", "3b", "3", "1"]
-
-importA
-0
-0 ^ 0  #
-
-
-class A:
-    def foo(self):
-        for _ in range(10):
-            aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc(
-                xxxxxxxxxxxx
-            )  # pylint: disable=no-member
-
-
-def test(self, othr):
-    return 1 == 2 and (
-        name,
-        description,
-        self.default,
-        self.selected,
-        self.auto_generated,
-        self.parameters,
-        self.meta_data,
-        self.schedule,
-    ) == (
-        name,
-        description,
-        othr.default,
-        othr.selected,
-        othr.auto_generated,
-        othr.parameters,
-        othr.meta_data,
-        othr.schedule,
-    )
-
-
-assert a_function(
-    very_long_arguments_that_surpass_the_limit,
-    which_is_eighty_eight_in_this_case_plus_a_bit_more,
-) == {"x": "this need to pass the line limit as well", "b": "but only by a little bit"}
-
diff -pruN 22.3.0-1/tests/data/trailing_comma_optional_parens1.py 22.6.0-1/tests/data/trailing_comma_optional_parens1.py
--- 22.3.0-1/tests/data/trailing_comma_optional_parens1.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/trailing_comma_optional_parens1.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,63 +0,0 @@
-if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT,
-                        _winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
-    pass
-
-if x:
-    if y:
-        new_id = max(Vegetable.objects.order_by('-id')[0].id,
-                     Mineral.objects.order_by('-id')[0].id) + 1
-
-class X:
-    def get_help_text(self):
-        return ngettext(
-            "Your password must contain at least %(min_length)d character.",
-            "Your password must contain at least %(min_length)d characters.",
-            self.min_length,
-        ) % {'min_length': self.min_length}
-
-class A:
-    def b(self):
-        if self.connection.mysql_is_mariadb and (
-            10,
-            4,
-            3,
-        ) < self.connection.mysql_version < (10, 5, 2):
-            pass
-
-
-# output
-
-if e1234123412341234.winerror not in (
-    _winapi.ERROR_SEM_TIMEOUT,
-    _winapi.ERROR_PIPE_BUSY,
-) or _check_timeout(t):
-    pass
-
-if x:
-    if y:
-        new_id = (
-            max(
-                Vegetable.objects.order_by("-id")[0].id,
-                Mineral.objects.order_by("-id")[0].id,
-            )
-            + 1
-        )
-
-
-class X:
-    def get_help_text(self):
-        return ngettext(
-            "Your password must contain at least %(min_length)d character.",
-            "Your password must contain at least %(min_length)d characters.",
-            self.min_length,
-        ) % {"min_length": self.min_length}
-
-
-class A:
-    def b(self):
-        if self.connection.mysql_is_mariadb and (
-            10,
-            4,
-            3,
-        ) < self.connection.mysql_version < (10, 5, 2):
-            pass
diff -pruN 22.3.0-1/tests/data/trailing_comma_optional_parens2.py 22.6.0-1/tests/data/trailing_comma_optional_parens2.py
--- 22.3.0-1/tests/data/trailing_comma_optional_parens2.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/trailing_comma_optional_parens2.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-if (e123456.get_tk_patchlevel() >= (8, 6, 0, 'final') or
-    (8, 5, 8) <= get_tk_patchlevel() < (8, 6)):
-    pass
-
-# output
-
-if e123456.get_tk_patchlevel() >= (8, 6, 0, "final") or (
-    8,
-    5,
-    8,
-) <= get_tk_patchlevel() < (8, 6):
-    pass
diff -pruN 22.3.0-1/tests/data/trailing_comma_optional_parens3.py 22.6.0-1/tests/data/trailing_comma_optional_parens3.py
--- 22.3.0-1/tests/data/trailing_comma_optional_parens3.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/trailing_comma_optional_parens3.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-if True:
-    if True:
-        if True:
-            return _(
-                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweas "
-                + "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwegqweasdzxcqweasdzxc.",
-                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwe",
-            ) % {"reported_username": reported_username, "report_reason": report_reason}
-
-
-# output
-
-
-if True:
-    if True:
-        if True:
-            return _(
-                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweas "
-                + "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwegqweasdzxcqweasdzxc.",
-                "qweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqweasdzxcqwe",
-            ) % {"reported_username": reported_username, "report_reason": report_reason}
diff -pruN 22.3.0-1/tests/data/tricky_unicode_symbols.py 22.6.0-1/tests/data/tricky_unicode_symbols.py
--- 22.3.0-1/tests/data/tricky_unicode_symbols.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/tricky_unicode_symbols.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-ä = 1
-µ = 2
-蟒 = 3
-x󠄀 = 4
-មុ = 1
-Q̇_per_meter = 4
-
-A᧚ = 3
-A፩ = 8
diff -pruN 22.3.0-1/tests/data/tupleassign.py 22.6.0-1/tests/data/tupleassign.py
--- 22.3.0-1/tests/data/tupleassign.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/data/tupleassign.py	1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-# This is a standalone comment.
-sdfjklsdfsjldkflkjsf, sdfjsdfjlksdljkfsdlkf, sdfsdjfklsdfjlksdljkf, sdsfsdfjskdflsfsdf = 1, 2, 3
-
-# This is as well.
-this_will_be_wrapped_in_parens, = struct.unpack(b"12345678901234567890")
-
-(a,) = call()
-
-# output
-
-
-# This is a standalone comment.
-(
-    sdfjklsdfsjldkflkjsf,
-    sdfjsdfjlksdljkfsdlkf,
-    sdfsdjfklsdfjlksdljkf,
-    sdsfsdfjskdflsfsdf,
-) = (1, 2, 3)
-
-# This is as well.
-(this_will_be_wrapped_in_parens,) = struct.unpack(b"12345678901234567890")
-
-(a,) = call()
\ No newline at end of file
diff -pruN 22.3.0-1/tests/test_blackd.py 22.6.0-1/tests/test_blackd.py
--- 22.3.0-1/tests/test_blackd.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/test_blackd.py	2022-06-28 00:33:35.000000000 +0000
@@ -1,4 +1,5 @@
 import re
+from typing import Any
 from unittest.mock import patch
 
 from click.testing import CliRunner
@@ -8,12 +9,18 @@ from tests.util import read_data, DETERM
 
 try:
     import blackd
-    from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
+    from aiohttp.test_utils import AioHTTPTestCase
     from aiohttp import web
+except ImportError as e:
+    raise RuntimeError("Please install Black with the 'd' extra") from e
+
+try:
+    from aiohttp.test_utils import unittest_run_loop
 except ImportError:
-    has_blackd_deps = False
-else:
-    has_blackd_deps = True
+    # unittest_run_loop is unnecessary and a no-op since aiohttp 3.8, and aiohttp 4
+    # removed it. To maintain compatibility we can make our own no-op decorator.
+    def unittest_run_loop(func: Any, *args: Any, **kwargs: Any) -> Any:
+        return func
 
 
 @pytest.mark.blackd
@@ -88,7 +95,7 @@ class BlackDTestCase(AioHTTPTestCase):
 
     @unittest_run_loop
     async def test_blackd_pyi(self) -> None:
-        source, expected = read_data("stub.pyi")
+        source, expected = read_data("miscellaneous", "stub.pyi")
         response = await self.client.post(
             "/", data=source, headers={blackd.PYTHON_VARIANT_HEADER: "pyi"}
         )
@@ -101,8 +108,8 @@ class BlackDTestCase(AioHTTPTestCase):
             r"(In|Out)\t\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d\d\d\d \+\d\d\d\d"
         )
 
-        source, _ = read_data("blackd_diff.py")
-        expected, _ = read_data("blackd_diff.diff")
+        source, _ = read_data("miscellaneous", "blackd_diff")
+        expected, _ = read_data("miscellaneous", "blackd_diff.diff")
 
         response = await self.client.post(
             "/", data=source, headers={blackd.DIFF_HEADER: "true"}
diff -pruN 22.3.0-1/tests/test_black.py 22.6.0-1/tests/test_black.py
--- 22.3.0-1/tests/test_black.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/test_black.py	2022-06-28 00:33:35.000000000 +0000
@@ -60,6 +60,8 @@ from tests.util import (
     ff,
     fs,
     read_data,
+    get_case_path,
+    read_data_from_file,
 )
 
 THIS_FILE = Path(__file__)
@@ -157,7 +159,7 @@ class BlackTestCase(BlackBaseTestCase):
         )
 
     def test_piping(self) -> None:
-        source, expected = read_data("src/black/__init__", data=False)
+        source, expected = read_data_from_file(PROJECT_ROOT / "src/black/__init__.py")
         result = BlackRunner().invoke(
             black.main,
             [
@@ -179,8 +181,8 @@ class BlackTestCase(BlackBaseTestCase):
             r"(STDIN|STDOUT)\t\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d\d\d\d "
             r"\+\d\d\d\d"
         )
-        source, _ = read_data("expression.py")
-        expected, _ = read_data("expression.diff")
+        source, _ = read_data("simple_cases", "expression.py")
+        expected, _ = read_data("simple_cases", "expression.diff")
         args = [
             "-",
             "--fast",
@@ -197,7 +199,7 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertEqual(expected, actual)
 
     def test_piping_diff_with_color(self) -> None:
-        source, _ = read_data("expression.py")
+        source, _ = read_data("simple_cases", "expression.py")
         args = [
             "-",
             "--fast",
@@ -219,7 +221,7 @@ class BlackTestCase(BlackBaseTestCase):
 
     @patch("black.dump_to_file", dump_to_stderr)
     def _test_wip(self) -> None:
-        source, expected = read_data("wip")
+        source, expected = read_data("miscellaneous", "wip")
         sys.settrace(tracefunc)
         mode = replace(
             DEFAULT_MODE,
@@ -233,7 +235,7 @@ class BlackTestCase(BlackBaseTestCase):
         black.assert_stable(source, actual, black.FileMode())
 
     def test_pep_572_version_detection(self) -> None:
-        source, _ = read_data("pep_572")
+        source, _ = read_data("py_38", "pep_572")
         root = black.lib2to3_parse(source)
         features = black.get_features_used(root)
         self.assertIn(black.Feature.ASSIGNMENT_EXPRESSIONS, features)
@@ -241,7 +243,7 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertIn(black.TargetVersion.PY38, versions)
 
     def test_expression_ff(self) -> None:
-        source, expected = read_data("expression")
+        source, expected = read_data("simple_cases", "expression.py")
         tmp_file = Path(black.dump_to_file(source))
         try:
             self.assertTrue(ff(tmp_file, write_back=black.WriteBack.YES))
@@ -255,8 +257,8 @@ class BlackTestCase(BlackBaseTestCase):
             black.assert_stable(source, actual, DEFAULT_MODE)
 
     def test_expression_diff(self) -> None:
-        source, _ = read_data("expression.py")
-        expected, _ = read_data("expression.diff")
+        source, _ = read_data("simple_cases", "expression.py")
+        expected, _ = read_data("simple_cases", "expression.diff")
         tmp_file = Path(black.dump_to_file(source))
         diff_header = re.compile(
             rf"{re.escape(str(tmp_file))}\t\d\d\d\d-\d\d-\d\d "
@@ -281,8 +283,8 @@ class BlackTestCase(BlackBaseTestCase):
             self.assertEqual(expected, actual, msg)
 
     def test_expression_diff_with_color(self) -> None:
-        source, _ = read_data("expression.py")
-        expected, _ = read_data("expression.diff")
+        source, _ = read_data("simple_cases", "expression.py")
+        expected, _ = read_data("simple_cases", "expression.diff")
         tmp_file = Path(black.dump_to_file(source))
         try:
             result = BlackRunner().invoke(
@@ -301,7 +303,7 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertIn("\033[0m", actual)
 
     def test_detect_pos_only_arguments(self) -> None:
-        source, _ = read_data("pep_570")
+        source, _ = read_data("py_38", "pep_570")
         root = black.lib2to3_parse(source)
         features = black.get_features_used(root)
         self.assertIn(black.Feature.POS_ONLY_ARGUMENTS, features)
@@ -310,7 +312,7 @@ class BlackTestCase(BlackBaseTestCase):
 
     @patch("black.dump_to_file", dump_to_stderr)
     def test_string_quotes(self) -> None:
-        source, expected = read_data("string_quotes")
+        source, expected = read_data("miscellaneous", "string_quotes")
         mode = black.Mode(preview=True)
         assert_format(source, expected, mode)
         mode = replace(mode, string_normalization=False)
@@ -320,8 +322,10 @@ class BlackTestCase(BlackBaseTestCase):
         black.assert_stable(source, not_normalized, mode=mode)
 
     def test_skip_magic_trailing_comma(self) -> None:
-        source, _ = read_data("expression.py")
-        expected, _ = read_data("expression_skip_magic_trailing_comma.diff")
+        source, _ = read_data("simple_cases", "expression")
+        expected, _ = read_data(
+            "miscellaneous", "expression_skip_magic_trailing_comma.diff"
+        )
         tmp_file = Path(black.dump_to_file(source))
         diff_header = re.compile(
             rf"{re.escape(str(tmp_file))}\t\d\d\d\d-\d\d-\d\d "
@@ -348,8 +352,8 @@ class BlackTestCase(BlackBaseTestCase):
 
     @patch("black.dump_to_file", dump_to_stderr)
     def test_async_as_identifier(self) -> None:
-        source_path = (THIS_DIR / "data" / "async_as_identifier.py").resolve()
-        source, expected = read_data("async_as_identifier")
+        source_path = get_case_path("miscellaneous", "async_as_identifier")
+        source, expected = read_data_from_file(source_path)
         actual = fs(source)
         self.assertFormatEqual(expected, actual)
         major, minor = sys.version_info[:2]
@@ -363,8 +367,8 @@ class BlackTestCase(BlackBaseTestCase):
 
     @patch("black.dump_to_file", dump_to_stderr)
     def test_python37(self) -> None:
-        source_path = (THIS_DIR / "data" / "python37.py").resolve()
-        source, expected = read_data("python37")
+        source_path = get_case_path("py_37", "python37")
+        source, expected = read_data_from_file(source_path)
         actual = fs(source)
         self.assertFormatEqual(expected, actual)
         major, minor = sys.version_info[:2]
@@ -712,7 +716,7 @@ class BlackTestCase(BlackBaseTestCase):
         # since this makes some test cases of test_get_features_used()
         # fails if it fails, this is tested first so that a useful case
         # is identified
-        simples, relaxed = read_data("decorators")
+        simples, relaxed = read_data("miscellaneous", "decorators")
         # skip explanation comments at the top of the file
         for simple_test in simples.split("##")[1:]:
             node = black.lib2to3_parse(simple_test)
@@ -755,7 +759,7 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertEqual(black.get_features_used(node), {Feature.NUMERIC_UNDERSCORES})
         node = black.lib2to3_parse("123456\n")
         self.assertEqual(black.get_features_used(node), set())
-        source, expected = read_data("function")
+        source, expected = read_data("simple_cases", "function")
         node = black.lib2to3_parse(source)
         expected_features = {
             Feature.TRAILING_COMMA_IN_CALL,
@@ -765,7 +769,7 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertEqual(black.get_features_used(node), expected_features)
         node = black.lib2to3_parse(expected)
         self.assertEqual(black.get_features_used(node), expected_features)
-        source, expected = read_data("expression")
+        source, expected = read_data("simple_cases", "expression")
         node = black.lib2to3_parse(source)
         self.assertEqual(black.get_features_used(node), set())
         node = black.lib2to3_parse(expected)
@@ -794,6 +798,18 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertEqual(
             black.get_features_used(node), {Feature.ANN_ASSIGN_EXTENDED_RHS}
         )
+        node = black.lib2to3_parse("try: pass\nexcept Something: pass")
+        self.assertEqual(black.get_features_used(node), set())
+        node = black.lib2to3_parse("try: pass\nexcept (*Something,): pass")
+        self.assertEqual(black.get_features_used(node), set())
+        node = black.lib2to3_parse("try: pass\nexcept *Group: pass")
+        self.assertEqual(black.get_features_used(node), {Feature.EXCEPT_STAR})
+        node = black.lib2to3_parse("a[*b]")
+        self.assertEqual(black.get_features_used(node), {Feature.VARIADIC_GENERICS})
+        node = black.lib2to3_parse("a[x, *y(), z] = t")
+        self.assertEqual(black.get_features_used(node), {Feature.VARIADIC_GENERICS})
+        node = black.lib2to3_parse("def fn(*args: *T): pass")
+        self.assertEqual(black.get_features_used(node), {Feature.VARIADIC_GENERICS})
 
     def test_get_features_used_for_future_flags(self) -> None:
         for src, features in [
@@ -845,8 +861,8 @@ class BlackTestCase(BlackBaseTestCase):
 
     @pytest.mark.incompatible_with_mypyc
     def test_debug_visitor(self) -> None:
-        source, _ = read_data("debug_visitor.py")
-        expected, _ = read_data("debug_visitor.out")
+        source, _ = read_data("miscellaneous", "debug_visitor")
+        expected, _ = read_data("miscellaneous", "debug_visitor.out")
         out_lines = []
         err_lines = []
 
@@ -916,7 +932,7 @@ class BlackTestCase(BlackBaseTestCase):
         self.assertEqual("".join(err_lines), "")
 
     @event_loop()
-    @patch("black.ProcessPoolExecutor", MagicMock(side_effect=OSError))
+    @patch("concurrent.futures.ProcessPoolExecutor", MagicMock(side_effect=OSError))
     def test_works_in_mono_process_only_environment(self) -> None:
         with cache_dir() as workspace:
             for f in [
@@ -930,10 +946,10 @@ class BlackTestCase(BlackBaseTestCase):
     def test_check_diff_use_together(self) -> None:
         with cache_dir():
             # Files which will be reformatted.
-            src1 = (THIS_DIR / "data" / "string_quotes.py").resolve()
+            src1 = get_case_path("miscellaneous", "string_quotes")
             self.invokeBlack([str(src1), "--diff", "--check"], exit_code=1)
             # Files which will not be reformatted.
-            src2 = (THIS_DIR / "data" / "composition.py").resolve()
+            src2 = get_case_path("simple_cases", "composition")
             self.invokeBlack([str(src2), "--diff", "--check"])
             # Multi file command.
             self.invokeBlack([str(src1), str(src2), "--diff", "--check"], exit_code=1)
@@ -957,7 +973,7 @@ class BlackTestCase(BlackBaseTestCase):
 
     def test_single_file_force_pyi(self) -> None:
         pyi_mode = replace(DEFAULT_MODE, is_pyi=True)
-        contents, expected = read_data("force_pyi")
+        contents, expected = read_data("miscellaneous", "force_pyi")
         with cache_dir() as workspace:
             path = (workspace / "file.py").resolve()
             with open(path, "w") as fh:
@@ -978,7 +994,7 @@ class BlackTestCase(BlackBaseTestCase):
     def test_multi_file_force_pyi(self) -> None:
         reg_mode = DEFAULT_MODE
         pyi_mode = replace(DEFAULT_MODE, is_pyi=True)
-        contents, expected = read_data("force_pyi")
+        contents, expected = read_data("miscellaneous", "force_pyi")
         with cache_dir() as workspace:
             paths = [
                 (workspace / "file1.py").resolve(),
@@ -1000,7 +1016,7 @@ class BlackTestCase(BlackBaseTestCase):
                 self.assertNotIn(str(path), normal_cache)
 
     def test_pipe_force_pyi(self) -> None:
-        source, expected = read_data("force_pyi")
+        source, expected = read_data("miscellaneous", "force_pyi")
         result = CliRunner().invoke(
             black.main, ["-", "-q", "--pyi"], input=BytesIO(source.encode("utf8"))
         )
@@ -1011,7 +1027,7 @@ class BlackTestCase(BlackBaseTestCase):
     def test_single_file_force_py36(self) -> None:
         reg_mode = DEFAULT_MODE
         py36_mode = replace(DEFAULT_MODE, target_versions=PY36_VERSIONS)
-        source, expected = read_data("force_py36")
+        source, expected = read_data("miscellaneous", "force_py36")
         with cache_dir() as workspace:
             path = (workspace / "file.py").resolve()
             with open(path, "w") as fh:
@@ -1030,7 +1046,7 @@ class BlackTestCase(BlackBaseTestCase):
     def test_multi_file_force_py36(self) -> None:
         reg_mode = DEFAULT_MODE
         py36_mode = replace(DEFAULT_MODE, target_versions=PY36_VERSIONS)
-        source, expected = read_data("force_py36")
+        source, expected = read_data("miscellaneous", "force_py36")
         with cache_dir() as workspace:
             paths = [
                 (workspace / "file1.py").resolve(),
@@ -1052,7 +1068,7 @@ class BlackTestCase(BlackBaseTestCase):
                 self.assertNotIn(str(path), normal_cache)
 
     def test_pipe_force_py36(self) -> None:
-        source, expected = read_data("force_py36")
+        source, expected = read_data("miscellaneous", "force_py36")
         result = CliRunner().invoke(
             black.main,
             ["-", "-q", "--target-version=py36"],
@@ -1162,7 +1178,7 @@ class BlackTestCase(BlackBaseTestCase):
             report = MagicMock()
             # Even with an existing file, since we are forcing stdin, black
             # should output to stdout and not modify the file inplace
-            p = Path(str(THIS_DIR / "data/collections.py"))
+            p = THIS_DIR / "data" / "simple_cases" / "collections.py"
             # Make sure is_file actually returns True
             self.assertTrue(p.is_file())
             path = Path(f"__BLACK_STDIN_FILENAME__{p}")
@@ -1256,23 +1272,25 @@ class BlackTestCase(BlackBaseTestCase):
 
     def test_shhh_click(self) -> None:
         try:
-            from click import _unicodefun
+            from click import _unicodefun  # type: ignore
         except ImportError:
             self.skipTest("Incompatible Click version")
-        if not hasattr(_unicodefun, "_verify_python3_env"):
+
+        if not hasattr(_unicodefun, "_verify_python_env"):
             self.skipTest("Incompatible Click version")
+
         # First, let's see if Click is crashing with a preferred ASCII charset.
         with patch("locale.getpreferredencoding") as gpe:
             gpe.return_value = "ASCII"
             with self.assertRaises(RuntimeError):
-                _unicodefun._verify_python3_env()  # type: ignore
+                _unicodefun._verify_python_env()
         # Now, let's silence Click...
         black.patch_click()
         # ...and confirm it's silent.
         with patch("locale.getpreferredencoding") as gpe:
             gpe.return_value = "ASCII"
             try:
-                _unicodefun._verify_python3_env()  # type: ignore
+                _unicodefun._verify_python_env()
             except RuntimeError as re:
                 self.fail(f"`patch_click()` failed, exception still raised: {re}")
 
@@ -1443,13 +1461,12 @@ class BlackTestCase(BlackBaseTestCase):
         black.assert_stable(source, output, mode=DEFAULT_MODE)
 
     def test_bpo_2142_workaround(self) -> None:
-
         # https://bugs.python.org/issue2142
 
-        source, _ = read_data("missing_final_newline.py")
+        source, _ = read_data("miscellaneous", "missing_final_newline")
         # read_data adds a trailing newline
         source = source.rstrip()
-        expected, _ = read_data("missing_final_newline.diff")
+        expected, _ = read_data("miscellaneous", "missing_final_newline.diff")
         tmp_file = Path(black.dump_to_file(source, ensure_final_newline=False))
         diff_header = re.compile(
             rf"{re.escape(str(tmp_file))}\t\d\d\d\d-\d\d-\d\d "
@@ -1675,7 +1692,7 @@ class TestCaching:
     def test_cache_multiple_files(self) -> None:
         mode = DEFAULT_MODE
         with cache_dir() as workspace, patch(
-            "black.ProcessPoolExecutor", new=ThreadPoolExecutor
+            "concurrent.futures.ProcessPoolExecutor", new=ThreadPoolExecutor
         ):
             one = (workspace / "one.py").resolve()
             with one.open("w") as fobj:
@@ -1784,7 +1801,7 @@ class TestCaching:
     def test_failed_formatting_does_not_get_cached(self) -> None:
         mode = DEFAULT_MODE
         with cache_dir() as workspace, patch(
-            "black.ProcessPoolExecutor", new=ThreadPoolExecutor
+            "concurrent.futures.ProcessPoolExecutor", new=ThreadPoolExecutor
         ):
             failing = (workspace / "failing.py").resolve()
             with failing.open("w") as fobj:
diff -pruN 22.3.0-1/tests/test_format.py 22.6.0-1/tests/test_format.py
--- 22.3.0-1/tests/test_format.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/test_format.py	2022-06-28 00:33:35.000000000 +0000
@@ -1,5 +1,5 @@
 from dataclasses import replace
-from typing import Any, Iterator, List
+from typing import Any, Iterator
 from unittest.mock import patch
 
 import pytest
@@ -8,124 +8,12 @@ import black
 from tests.util import (
     DEFAULT_MODE,
     PY36_VERSIONS,
-    THIS_DIR,
     assert_format,
     dump_to_stderr,
     read_data,
+    all_data_cases,
 )
 
-SIMPLE_CASES: List[str] = [
-    "attribute_access_on_number_literals",
-    "beginning_backslash",
-    "bracketmatch",
-    "class_blank_parentheses",
-    "class_methods_new_line",
-    "collections",
-    "comments",
-    "comments2",
-    "comments3",
-    "comments4",
-    "comments5",
-    "comments6",
-    "comments_non_breaking_space",
-    "comment_after_escaped_newline",
-    "composition",
-    "composition_no_trailing_comma",
-    "docstring",
-    "empty_lines",
-    "expression",
-    "fmtonoff",
-    "fmtonoff2",
-    "fmtonoff3",
-    "fmtonoff4",
-    "fmtskip",
-    "fmtskip2",
-    "fmtskip3",
-    "fmtskip4",
-    "fmtskip5",
-    "fmtskip6",
-    "fstring",
-    "function",
-    "function2",
-    "function_trailing_comma",
-    "import_spacing",
-    "power_op_spacing",
-    "remove_parens",
-    "slices",
-    "string_prefixes",
-    "torture",
-    "trailing_comma_optional_parens1",
-    "trailing_comma_optional_parens2",
-    "trailing_comma_optional_parens3",
-    "tricky_unicode_symbols",
-    "tupleassign",
-]
-
-PY310_CASES: List[str] = [
-    "starred_for_target",
-    "pattern_matching_simple",
-    "pattern_matching_complex",
-    "pattern_matching_extras",
-    "pattern_matching_style",
-    "pattern_matching_generic",
-    "parenthesized_context_managers",
-]
-
-PREVIEW_CASES: List[str] = [
-    # string processing
-    "cantfit",
-    "comments7",
-    "comments8",
-    "long_strings",
-    "long_strings__edge_case",
-    "long_strings__regression",
-    "percent_precedence",
-    "remove_except_parens",
-    "remove_for_brackets",
-    "one_element_subscript",
-]
-
-SOURCES: List[str] = [
-    "src/black/__init__.py",
-    "src/black/__main__.py",
-    "src/black/brackets.py",
-    "src/black/cache.py",
-    "src/black/comments.py",
-    "src/black/concurrency.py",
-    "src/black/const.py",
-    "src/black/debug.py",
-    "src/black/files.py",
-    "src/black/linegen.py",
-    "src/black/lines.py",
-    "src/black/mode.py",
-    "src/black/nodes.py",
-    "src/black/numerics.py",
-    "src/black/output.py",
-    "src/black/parsing.py",
-    "src/black/report.py",
-    "src/black/rusty.py",
-    "src/black/strings.py",
-    "src/black/trans.py",
-    "src/blackd/__init__.py",
-    "src/blib2to3/pygram.py",
-    "src/blib2to3/pytree.py",
-    "src/blib2to3/pgen2/conv.py",
-    "src/blib2to3/pgen2/driver.py",
-    "src/blib2to3/pgen2/grammar.py",
-    "src/blib2to3/pgen2/literals.py",
-    "src/blib2to3/pgen2/parse.py",
-    "src/blib2to3/pgen2/pgen.py",
-    "src/blib2to3/pgen2/tokenize.py",
-    "src/blib2to3/pgen2/token.py",
-    "setup.py",
-    "tests/test_black.py",
-    "tests/test_blackd.py",
-    "tests/test_format.py",
-    "tests/optional.py",
-    "tests/util.py",
-    "tests/conftest.py",
-]
-
 
 @pytest.fixture(autouse=True)
 def patch_dump_to_file(request: Any) -> Iterator[None]:
@@ -133,25 +21,35 @@ def patch_dump_to_file(request: Any) ->
         yield
 
 
-def check_file(filename: str, mode: black.Mode, *, data: bool = True) -> None:
-    source, expected = read_data(filename, data=data)
+def check_file(
+    subdir: str, filename: str, mode: black.Mode, *, data: bool = True
+) -> None:
+    source, expected = read_data(subdir, filename, data=data)
     assert_format(source, expected, mode, fast=False)
 
 
-@pytest.mark.parametrize("filename", SIMPLE_CASES)
+@pytest.mark.parametrize("filename", all_data_cases("simple_cases"))
 def test_simple_format(filename: str) -> None:
-    check_file(filename, DEFAULT_MODE)
+    check_file("simple_cases", filename, DEFAULT_MODE)
 
 
-@pytest.mark.parametrize("filename", PREVIEW_CASES)
+@pytest.mark.parametrize("filename", all_data_cases("preview"))
 def test_preview_format(filename: str) -> None:
-    check_file(filename, black.Mode(preview=True))
+    check_file("preview", filename, black.Mode(preview=True))
+
+
+@pytest.mark.parametrize("filename", all_data_cases("preview_39"))
+def test_preview_minimum_python_39_format(filename: str) -> None:
+    source, expected = read_data("preview_39", filename)
+    mode = black.Mode(preview=True)
+    assert_format(source, expected, mode, minimum_version=(3, 9))
 
 
-@pytest.mark.parametrize("filename", SOURCES)
-def test_source_is_formatted(filename: str) -> None:
-    path = THIS_DIR.parent / filename
-    check_file(str(path), DEFAULT_MODE, data=False)
+@pytest.mark.parametrize("filename", all_data_cases("preview_310"))
+def test_preview_minimum_python_310_format(filename: str) -> None:
+    source, expected = read_data("preview_310", filename)
+    mode = black.Mode(preview=True)
+    assert_format(source, expected, mode, minimum_version=(3, 10))
 
 
 # =============== #
@@ -164,49 +62,50 @@ def test_empty() -> None:
     assert_format(source, expected)
 
 
-def test_pep_572() -> None:
-    source, expected = read_data("pep_572")
-    assert_format(source, expected, minimum_version=(3, 8))
-
+@pytest.mark.parametrize("filename", all_data_cases("py_36"))
+def test_python_36(filename: str) -> None:
+    source, expected = read_data("py_36", filename)
+    mode = black.Mode(target_versions=PY36_VERSIONS)
+    assert_format(source, expected, mode, minimum_version=(3, 6))
 
-def test_pep_572_remove_parens() -> None:
-    source, expected = read_data("pep_572_remove_parens")
-    assert_format(source, expected, minimum_version=(3, 8))
 
+@pytest.mark.parametrize("filename", all_data_cases("py_37"))
+def test_python_37(filename: str) -> None:
+    source, expected = read_data("py_37", filename)
+    mode = black.Mode(target_versions={black.TargetVersion.PY37})
+    assert_format(source, expected, mode, minimum_version=(3, 7))
 
-def test_pep_572_do_not_remove_parens() -> None:
-    source, expected = read_data("pep_572_do_not_remove_parens")
-    # the AST safety checks will fail, but that's expected, just make sure no
-    # parentheses are touched
-    assert_format(source, expected, fast=True)
 
+@pytest.mark.parametrize("filename", all_data_cases("py_38"))
+def test_python_38(filename: str) -> None:
+    source, expected = read_data("py_38", filename)
+    mode = black.Mode(target_versions={black.TargetVersion.PY38})
+    assert_format(source, expected, mode, minimum_version=(3, 8))
 
-@pytest.mark.parametrize("major, minor", [(3, 9), (3, 10)])
-def test_pep_572_newer_syntax(major: int, minor: int) -> None:
-    source, expected = read_data(f"pep_572_py{major}{minor}")
-    assert_format(source, expected, minimum_version=(major, minor))
 
+@pytest.mark.parametrize("filename", all_data_cases("py_39"))
+def test_python_39(filename: str) -> None:
+    source, expected = read_data("py_39", filename)
+    mode = black.Mode(target_versions={black.TargetVersion.PY39})
+    assert_format(source, expected, mode, minimum_version=(3, 9))
 
-def test_pep_570() -> None:
-    source, expected = read_data("pep_570")
-    assert_format(source, expected, minimum_version=(3, 8))
 
-
-@pytest.mark.parametrize("filename", PY310_CASES)
+@pytest.mark.parametrize("filename", all_data_cases("py_310"))
 def test_python_310(filename: str) -> None:
-    source, expected = read_data(filename)
+    source, expected = read_data("py_310", filename)
     mode = black.Mode(target_versions={black.TargetVersion.PY310})
     assert_format(source, expected, mode, minimum_version=(3, 10))
 
 
-def test_python_310_without_target_version() -> None:
-    source, expected = read_data("pattern_matching_simple")
+@pytest.mark.parametrize("filename", all_data_cases("py_310"))
+def test_python_310_without_target_version(filename: str) -> None:
+    source, expected = read_data("py_310", filename)
     mode = black.Mode()
     assert_format(source, expected, mode, minimum_version=(3, 10))
 
 
 def test_patma_invalid() -> None:
-    source, expected = read_data("pattern_matching_invalid")
+    source, expected = read_data("miscellaneous", "pattern_matching_invalid")
     mode = black.Mode(target_versions={black.TargetVersion.PY310})
     with pytest.raises(black.parsing.InvalidInput) as exc_info:
         assert_format(source, expected, mode, minimum_version=(3, 10))
@@ -214,6 +113,19 @@ def test_patma_invalid() -> None:
     exc_info.match("Cannot parse: 10:11")
 
 
+@pytest.mark.parametrize("filename", all_data_cases("py_311"))
+def test_python_311(filename: str) -> None:
+    source, expected = read_data("py_311", filename)
+    mode = black.Mode(target_versions={black.TargetVersion.PY311})
+    assert_format(source, expected, mode, minimum_version=(3, 11))
+
+
+@pytest.mark.parametrize("filename", all_data_cases("fast"))
+def test_fast_cases(filename: str) -> None:
+    source, expected = read_data("fast", filename)
+    assert_format(source, expected, fast=True)
+
+
 def test_python_2_hint() -> None:
     with pytest.raises(black.parsing.InvalidInput) as exc_info:
         assert_format("print 'daylily'", "print 'daylily'")
@@ -222,47 +134,25 @@ def test_python_2_hint() -> None:
 
 def test_docstring_no_string_normalization() -> None:
     """Like test_docstring but with string normalization off."""
-    source, expected = read_data("docstring_no_string_normalization")
+    source, expected = read_data("miscellaneous", "docstring_no_string_normalization")
     mode = replace(DEFAULT_MODE, string_normalization=False)
     assert_format(source, expected, mode)
 
 
 def test_long_strings_flag_disabled() -> None:
     """Tests for turning off the string processing logic."""
-    source, expected = read_data("long_strings_flag_disabled")
+    source, expected = read_data("miscellaneous", "long_strings_flag_disabled")
     mode = replace(DEFAULT_MODE, experimental_string_processing=False)
     assert_format(source, expected, mode)
 
 
-def test_numeric_literals() -> None:
-    source, expected = read_data("numeric_literals")
-    mode = replace(DEFAULT_MODE, target_versions=PY36_VERSIONS)
-    assert_format(source, expected, mode)
-
-
-def test_numeric_literals_ignoring_underscores() -> None:
-    source, expected = read_data("numeric_literals_skip_underscores")
-    mode = replace(DEFAULT_MODE, target_versions=PY36_VERSIONS)
-    assert_format(source, expected, mode)
-
-
 def test_stub() -> None:
     mode = replace(DEFAULT_MODE, is_pyi=True)
-    source, expected = read_data("stub.pyi")
+    source, expected = read_data("miscellaneous", "stub.pyi")
     assert_format(source, expected, mode)
 
 
-def test_python38() -> None:
-    source, expected = read_data("python38")
-    assert_format(source, expected, minimum_version=(3, 8))
-
-
-def test_python39() -> None:
-    source, expected = read_data("python39")
-    assert_format(source, expected, minimum_version=(3, 9))
-
-
 def test_power_op_newline() -> None:
     # requires line_length=0
-    source, expected = read_data("power_op_newline")
+    source, expected = read_data("miscellaneous", "power_op_newline")
     assert_format(source, expected, mode=black.Mode(line_length=0))
diff -pruN 22.3.0-1/tests/test_ipynb.py 22.6.0-1/tests/test_ipynb.py
--- 22.3.0-1/tests/test_ipynb.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/test_ipynb.py	2022-06-28 00:33:35.000000000 +0000
@@ -1,3 +1,4 @@
+import contextlib
 from dataclasses import replace
 import pathlib
 import re
@@ -16,8 +17,10 @@ from black import (
 import pytest
 from black import Mode
 from _pytest.monkeypatch import MonkeyPatch
-from tests.util import DATA_DIR
+from tests.util import DATA_DIR, read_jupyter_notebook, get_case_path
 
+with contextlib.suppress(ModuleNotFoundError):
+    import IPython
 pytestmark = pytest.mark.jupyter
 pytest.importorskip("IPython", reason="IPython is an optional dependency")
 pytest.importorskip("tokenize_rt", reason="tokenize-rt is an optional dependency")
@@ -139,10 +142,15 @@ def test_non_python_magics(src: str) ->
         format_cell(src, fast=True, mode=JUPYTER_MODE)
 
 
+@pytest.mark.skipif(
+    IPython.version_info < (8, 3),
+    reason="Change in how TransformerManager transforms this input",
+)
 def test_set_input() -> None:
     src = "a = b??"
-    with pytest.raises(NothingChanged):
-        format_cell(src, fast=True, mode=JUPYTER_MODE)
+    expected = "??b"
+    result = format_cell(src, fast=True, mode=JUPYTER_MODE)
+    assert result == expected
 
 
 def test_input_already_contains_transformed_magic() -> None:
@@ -244,9 +252,7 @@ def test_empty_cell() -> None:
 
 
 def test_entire_notebook_empty_metadata() -> None:
-    with open(DATA_DIR / "notebook_empty_metadata.ipynb", "rb") as fd:
-        content_bytes = fd.read()
-    content = content_bytes.decode()
+    content = read_jupyter_notebook("jupyter", "notebook_empty_metadata")
     result = format_file_contents(content, fast=True, mode=JUPYTER_MODE)
     expected = (
         "{\n"
@@ -281,9 +287,7 @@ def test_entire_notebook_empty_metadata(
 
 
 def test_entire_notebook_trailing_newline() -> None:
-    with open(DATA_DIR / "notebook_trailing_newline.ipynb", "rb") as fd:
-        content_bytes = fd.read()
-    content = content_bytes.decode()
+    content = read_jupyter_notebook("jupyter", "notebook_trailing_newline")
     result = format_file_contents(content, fast=True, mode=JUPYTER_MODE)
     expected = (
         "{\n"
@@ -330,9 +334,7 @@ def test_entire_notebook_trailing_newlin
 
 
 def test_entire_notebook_no_trailing_newline() -> None:
-    with open(DATA_DIR / "notebook_no_trailing_newline.ipynb", "rb") as fd:
-        content_bytes = fd.read()
-    content = content_bytes.decode()
+    content = read_jupyter_notebook("jupyter", "notebook_no_trailing_newline")
     result = format_file_contents(content, fast=True, mode=JUPYTER_MODE)
     expected = (
         "{\n"
@@ -379,17 +381,14 @@ def test_entire_notebook_no_trailing_new
 
 
 def test_entire_notebook_without_changes() -> None:
-    with open(DATA_DIR / "notebook_without_changes.ipynb", "rb") as fd:
-        content_bytes = fd.read()
-    content = content_bytes.decode()
+    content = read_jupyter_notebook("jupyter", "notebook_without_changes")
     with pytest.raises(NothingChanged):
         format_file_contents(content, fast=True, mode=JUPYTER_MODE)
 
 
 def test_non_python_notebook() -> None:
-    with open(DATA_DIR / "non_python_notebook.ipynb", "rb") as fd:
-        content_bytes = fd.read()
-    content = content_bytes.decode()
+    content = read_jupyter_notebook("jupyter", "non_python_notebook")
+
     with pytest.raises(NothingChanged):
         format_file_contents(content, fast=True, mode=JUPYTER_MODE)
 
@@ -400,7 +399,7 @@ def test_empty_string() -> None:
 
 
 def test_unparseable_notebook() -> None:
-    path = DATA_DIR / "notebook_which_cant_be_parsed.ipynb"
+    path = get_case_path("jupyter", "notebook_which_cant_be_parsed.ipynb")
     msg = rf"File '{re.escape(str(path))}' cannot be parsed as valid Jupyter notebook\."
     with pytest.raises(ValueError, match=msg):
         format_file_in_place(path, fast=True, mode=JUPYTER_MODE)
@@ -410,7 +409,7 @@ def test_ipynb_diff_with_change() -> Non
     result = runner.invoke(
         main,
         [
-            str(DATA_DIR / "notebook_trailing_newline.ipynb"),
+            str(get_case_path("jupyter", "notebook_trailing_newline.ipynb")),
             "--diff",
             f"--config={EMPTY_CONFIG}",
         ],
@@ -423,7 +422,7 @@ def test_ipynb_diff_with_no_change() ->
     result = runner.invoke(
         main,
         [
-            str(DATA_DIR / "notebook_without_changes.ipynb"),
+            str(get_case_path("jupyter", "notebook_without_changes.ipynb")),
             "--diff",
             f"--config={EMPTY_CONFIG}",
         ],
@@ -437,7 +436,7 @@ def test_cache_isnt_written_if_no_jupyte
 ) -> None:
     # Check that the cache isn't written to if Jupyter dependencies aren't installed.
     jupyter_dependencies_are_installed.cache_clear()
-    nb = DATA_DIR / "notebook_trailing_newline.ipynb"
+    nb = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
     tmp_nb = tmp_path / "notebook.ipynb"
     with open(nb) as src, open(tmp_nb, "w") as dst:
         dst.write(src.read())
@@ -463,7 +462,7 @@ def test_cache_isnt_written_if_no_jupyte
 ) -> None:
     # Check that the cache isn't written to if Jupyter dependencies aren't installed.
     jupyter_dependencies_are_installed.cache_clear()
-    nb = DATA_DIR / "notebook_trailing_newline.ipynb"
+    nb = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
     tmp_nb = tmp_path / "notebook.ipynb"
     with open(nb) as src, open(tmp_nb, "w") as dst:
         dst.write(src.read())
@@ -481,7 +480,7 @@ def test_cache_isnt_written_if_no_jupyte
 
 
 def test_ipynb_flag(tmp_path: pathlib.Path) -> None:
-    nb = DATA_DIR / "notebook_trailing_newline.ipynb"
+    nb = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
     tmp_nb = tmp_path / "notebook.a_file_extension_which_is_definitely_not_ipynb"
     with open(nb) as src, open(tmp_nb, "w") as dst:
         dst.write(src.read())
@@ -499,7 +498,7 @@ def test_ipynb_flag(tmp_path: pathlib.Pa
 
 
 def test_ipynb_and_pyi_flags() -> None:
-    nb = DATA_DIR / "notebook_trailing_newline.ipynb"
+    nb = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
     result = runner.invoke(
         main,
         [
diff -pruN 22.3.0-1/tests/test_no_ipynb.py 22.6.0-1/tests/test_no_ipynb.py
--- 22.3.0-1/tests/test_no_ipynb.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/test_no_ipynb.py	2022-06-28 00:33:35.000000000 +0000
@@ -1,8 +1,7 @@
 import pytest
-import os
 import pathlib
 
-from tests.util import THIS_DIR
+from tests.util import get_case_path
 from black import main, jupyter_dependencies_are_installed
 from click.testing import CliRunner
 
@@ -13,7 +12,7 @@ runner = CliRunner()
 
 def test_ipynb_diff_with_no_change_single() -> None:
     jupyter_dependencies_are_installed.cache_clear()
-    path = THIS_DIR / "data/notebook_trailing_newline.ipynb"
+    path = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
     result = runner.invoke(main, [str(path)])
     expected_output = (
         "Skipping .ipynb files as Jupyter dependencies are not installed.\n"
@@ -25,7 +24,7 @@ def test_ipynb_diff_with_no_change_singl
 def test_ipynb_diff_with_no_change_dir(tmp_path: pathlib.Path) -> None:
     jupyter_dependencies_are_installed.cache_clear()
     runner = CliRunner()
-    nb = os.path.join("tests", "data", "notebook_trailing_newline.ipynb")
+    nb = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
     tmp_nb = tmp_path / "notebook.ipynb"
     with open(nb) as src, open(tmp_nb, "w") as dst:
         dst.write(src.read())
diff -pruN 22.3.0-1/tests/util.py 22.6.0-1/tests/util.py
--- 22.3.0-1/tests/util.py	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tests/util.py	2022-06-28 00:33:35.000000000 +0000
@@ -11,6 +11,9 @@ from black.debug import DebugVisitor
 from black.mode import TargetVersion
 from black.output import diff, err, out
 
+PYTHON_SUFFIX = ".py"
+ALLOWED_SUFFIXES = (PYTHON_SUFFIX, ".pyi", ".out", ".diff", ".ipynb")
+
 THIS_DIR = Path(__file__).parent
 DATA_DIR = THIS_DIR / "data"
 PROJECT_ROOT = THIS_DIR.parent
@@ -90,12 +93,30 @@ class BlackBaseTestCase(unittest.TestCas
         _assert_format_equal(expected, actual)
 
 
-def read_data(name: str, data: bool = True) -> Tuple[str, str]:
+def get_base_dir(data: bool) -> Path:
+    return DATA_DIR if data else PROJECT_ROOT
+
+
+def all_data_cases(subdir_name: str, data: bool = True) -> List[str]:
+    cases_dir = get_base_dir(data) / subdir_name
+    assert cases_dir.is_dir()
+    return [case_path.stem for case_path in cases_dir.iterdir()]
+
+
+def get_case_path(
+    subdir_name: str, name: str, data: bool = True, suffix: str = PYTHON_SUFFIX
+) -> Path:
+    """Get case path from name"""
+    case_path = get_base_dir(data) / subdir_name / name
+    if not name.endswith(ALLOWED_SUFFIXES):
+        case_path = case_path.with_suffix(suffix)
+    assert case_path.is_file(), f"{case_path} is not a file."
+    return case_path
+
+
+def read_data(subdir_name: str, name: str, data: bool = True) -> Tuple[str, str]:
     """read_data('test_name') -> 'input', 'output'"""
-    if not name.endswith((".py", ".pyi", ".out", ".diff")):
-        name += ".py"
-    base_dir = DATA_DIR if data else PROJECT_ROOT
-    return read_data_from_file(base_dir / name)
+    return read_data_from_file(get_case_path(subdir_name, name, data))
 
 
 def read_data_from_file(file_name: Path) -> Tuple[str, str]:
@@ -117,6 +138,18 @@ def read_data_from_file(file_name: Path)
     return "".join(_input).strip() + "\n", "".join(_output).strip() + "\n"
 
 
+def read_jupyter_notebook(subdir_name: str, name: str, data: bool = True) -> str:
+    return read_jupyter_notebook_from_file(
+        get_case_path(subdir_name, name, data, suffix=".ipynb")
+    )
+
+
+def read_jupyter_notebook_from_file(file_name: Path) -> str:
+    with open(file_name, mode="rb") as fd:
+        content_bytes = fd.read()
+    return content_bytes.decode()
+
+
 @contextmanager
 def change_directory(path: Path) -> Iterator[None]:
     """Context manager to temporarily chdir to a different directory."""
diff -pruN 22.3.0-1/tox.ini 22.6.0-1/tox.ini
--- 22.3.0-1/tox.ini	2022-03-28 19:08:29.000000000 +0000
+++ 22.6.0-1/tox.ini	2022-06-28 00:33:35.000000000 +0000
@@ -1,5 +1,5 @@
 [tox]
-envlist = {,ci-}py{36,37,38,39,310,py3},fuzz
+envlist = {,ci-}py{36,37,38,39,310,py3},fuzz,run_self
 
 [testenv]
 setenv = PYTHONPATH = {toxinidir}/src
@@ -55,10 +55,16 @@ skip_install = True
 deps =
     -r{toxinidir}/test_requirements.txt
     hypothesmith
-    lark-parser < 0.10.0
-; lark-parser's version is set due to a bug in hypothesis. Once it solved, that would be fixed.
+    lark-parser
 commands =
     pip install -e .[d]
     coverage erase
     coverage run fuzz.py
     coverage report
+
+[testenv:run_self]
+setenv = PYTHONPATH = {toxinidir}/src
+skip_install = True
+commands =
+    pip install -e .[d]
+    black --check {toxinidir}/src {toxinidir}/tests {toxinidir}/setup.py
