diff options
author | Federico Caselli <cfederico87@gmail.com> | 2022-11-27 18:11:34 +0100 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-11-29 14:15:16 -0500 |
commit | 78833af4e650d37e6257cfbb541e4db56e2a285f (patch) | |
tree | 0b7f243111b6b072da6230c11f3618758e86ebfa /lib/sqlalchemy/sql/compiler.py | |
parent | 07d40578b1bb77456b7a7af425a905b146fdaef1 (diff) | |
download | sqlalchemy-78833af4e650d37e6257cfbb541e4db56e2a285f.tar.gz |
update for mypy 1.0 dev
As I need dmypy to work without facing [1], I am
running the latest build of mypy which seems so far
to finally not have that issue.
update constructs that latest mypy is being more picky
about, including better typing for the _NONE_NAME
symbol used in constraints (porting those elements
from the Enum patch at
I15ac3daee770408b5795746f47c1bbd931b7d26d)
[1] https://github.com/python/mypy/issues/12744
Change-Id: Ib3f56787fa65ea9bb2e6a0bccc4d99f54c516dad
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 9e4422fbd..50cf9b477 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -67,6 +67,7 @@ from . import util as sql_util from ._typing import is_column_element from ._typing import is_dml from .base import _from_objects +from .base import _NONE_NAME from .base import Executable from .base import NO_ARG from .elements import ClauseElement @@ -6440,7 +6441,7 @@ class IdentifierPreparer: def format_constraint(self, constraint, _alembic_quote=True): naming = util.preloaded.sql_naming - if constraint.name is elements._NONE_NAME: + if constraint.name is _NONE_NAME: name = naming._constraint_name_for_table( constraint, constraint.table ) |