From: Mike Bayer Date: Mon, 28 Mar 2022 19:50:29 +0000 (-0400) Subject: bump black to 22.3.0 X-Git-Tag: rel_1_8_0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d741367c388ec1b7083a2c242911745647ec9a28;p=thirdparty%2Fsqlalchemy%2Falembic.git bump black to 22.3.0 both black and click were released in the past few hours, and black 21.5b1 seems to suddenly be failing on a missing symbol from click. just update to the latest Change-Id: Icb9d98d6473aa603aa29ad1c2d1e43ff3b371db5 --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84abf5bc..304db477 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/python/black - rev: 21.5b1 + rev: 22.3.0 hooks: - id: black diff --git a/alembic/util/sqla_compat.py b/alembic/util/sqla_compat.py index 9e989fd4..787b77c2 100644 --- a/alembic/util/sqla_compat.py +++ b/alembic/util/sqla_compat.py @@ -266,7 +266,6 @@ if hasattr(sqltypes.TypeEngine, "_variant_mapping"): def _get_variant_mapping(type_): return type_, type_._variant_mapping - else: def _type_has_variants(type_): diff --git a/docs/build/conf.py b/docs/build/conf.py index d9449d49..db75d72f 100644 --- a/docs/build/conf.py +++ b/docs/build/conf.py @@ -82,8 +82,8 @@ nitpicky = True master_doc = "index" # General information about the project. -project = u"Alembic" -copyright = u"2010-2022, Mike Bayer" # noqa +project = "Alembic" +copyright = "2010-2022, Mike Bayer" # noqa # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -230,7 +230,7 @@ htmlhelp_basename = "Alembicdoc" # Grouping the document tree into LaTeX files. List of tuples (source start # file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ("index", "Alembic.tex", u"Alembic Documentation", u"Mike Bayer", "manual") + ("index", "Alembic.tex", "Alembic Documentation", "Mike Bayer", "manual") ] # The name of an image file (relative to this directory) to place at the top of diff --git a/tests/test_bulk_insert.py b/tests/test_bulk_insert.py index 09c641a2..1ad5b967 100644 --- a/tests/test_bulk_insert.py +++ b/tests/test_bulk_insert.py @@ -322,5 +322,5 @@ class RoundTripTest(TestBase): self.conn.execute( text("select id, v1, v2 from ins_table order by id") ).fetchall(), - [(1, u"row v1", u"row v5"), (2, u"row v2", u"row v6")], + [(1, "row v1", "row v5"), (2, "row v2", "row v6")], ) diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index 6e76fd61..92465754 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -768,7 +768,7 @@ class PostgresqlDefaultCompareTest(TestBase): ) def test_compare_unicode_literal(self): - self._compare_default_roundtrip(String(), u"im a default") + self._compare_default_roundtrip(String(), "im a default") # TOOD: will need to actually eval() the repr() and # spend more effort figuring out exactly the kind of expression diff --git a/tox.ini b/tox.ini index 58a7df76..892ce871 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ deps=pytest>4.6 mako python-dateutil zimports - black + black==22.3.0 @@ -89,7 +89,7 @@ deps= pydocstyle<4.0.0 # used by flake8-rst-docstrings pygments - black==21.5b1 + black==22.3.0 commands = flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py {posargs} black --check setup.py tests alembic