diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-04-17 10:31:48 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-04-17 11:09:03 -0400 |
commit | a8b2fbb55c6de302b053b4309c6e53cd7f748448 (patch) | |
tree | 51d6deaa1f3b950bab42240385f3ad4bae341f28 /lib/sqlalchemy/sql/base.py | |
parent | c538f810bce57472c8960a0a6c4c61024b00f3ed (diff) | |
download | sqlalchemy-a8b2fbb55c6de302b053b4309c6e53cd7f748448.tar.gz |
mypy .950 updates
Fixes: #7942
Change-Id: Ice1243e1704e88bb8fa13fb0d1f8e24dcd94bfd4
Diffstat (limited to 'lib/sqlalchemy/sql/base.py')
-rw-r--r-- | lib/sqlalchemy/sql/base.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index 629e88a32..f7692dbc2 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -229,9 +229,9 @@ def _generative(fn: _Fn) -> _Fn: assert x is self, "generative methods must return self" return self - decorated = _generative(fn) # type: ignore + decorated = _generative(fn) decorated.non_generative = fn # type: ignore - return decorated # type: ignore + return decorated def _exclusive_against(*names: str, **kw: Any) -> Callable[[_Fn], _Fn]: @@ -1749,8 +1749,10 @@ class DedupeColumnCollection(ColumnCollection[str, _NAMEDCOL]): self._index[k] = col self._collection.append((k, col)) self._colset.update(c for (k, c) in self._collection) + + # https://github.com/python/mypy/issues/12610 self._index.update( - (idx, c) for idx, (k, c) in enumerate(self._collection) + (idx, c) for idx, (k, c) in enumerate(self._collection) # type: ignore # noqa: E501 ) for col in replace_col: self.replace(col) @@ -1769,8 +1771,10 @@ class DedupeColumnCollection(ColumnCollection[str, _NAMEDCOL]): self._collection[:] = [ (k, c) for (k, c) in self._collection if c is not column ] + + # https://github.com/python/mypy/issues/12610 self._index.update( - {idx: col for idx, (k, col) in enumerate(self._collection)} + {idx: col for idx, (k, col) in enumerate(self._collection)} # type: ignore # noqa: E501 ) # delete higher index del self._index[len(self._collection)] @@ -1822,8 +1826,10 @@ class DedupeColumnCollection(ColumnCollection[str, _NAMEDCOL]): self._collection[:] = new_cols self._index.clear() + + # https://github.com/python/mypy/issues/12610 self._index.update( - {idx: col for idx, (k, col) in enumerate(self._collection)} + {idx: col for idx, (k, col) in enumerate(self._collection)} # type: ignore # noqa: E501 ) self._index.update(self._collection) |