diff options
| author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-01-05 12:41:32 -0500 |
|---|---|---|
| committer | sqla-tester <sqla-tester@sqlalchemy.org> | 2022-01-05 12:41:32 -0500 |
| commit | 146a349d81023805264f81643db50a5281da90da (patch) | |
| tree | 8c0b6e56e3f29b8187de1b8a9af21af4cebbd6a2 /lib/sqlalchemy/engine | |
| parent | 028f9b5cacc1b70aa0f4f53799f6e7c14a182776 (diff) | |
| download | sqlalchemy-146a349d81023805264f81643db50a5281da90da.tar.gz | |
Update Black's target-version to py37
<!-- Provide a general summary of your proposed changes in the Title field above -->
### Description
<!-- Describe your changes in detail -->
Black's `target-version` was still set to `['py27', 'py36']`. Set it to `[py37]` instead.
Also update Black and other pre-commit hooks and re-format with Black.
### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)
-->
This pull request is:
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.
**Have a nice day!**
Closes: #7536
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7536
Pull-request-sha: b3aedf5570d7e0ba6c354e5989835260d0591b08
Change-Id: I8be85636fd2c9449b07a8626050c8bd35bd119d5
Diffstat (limited to 'lib/sqlalchemy/engine')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/interfaces.py | 22 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/processors.py | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/reflection.py | 8 |
5 files changed, 17 insertions, 18 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 4f8535447..4a7ad9a18 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1455,7 +1455,7 @@ class Connection(ConnectionEventsTarget): parameters, execution_options, *args, - **kw + **kw, ): """Create an :class:`.ExecutionContext` and execute, returning a :class:`_engine.CursorResult`.""" diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 779939be8..1560b3a8e 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -258,7 +258,7 @@ class DefaultDialect(interfaces.Dialect): # the direct reference to the "NO_LINTING" object compiler_linting=int(compiler.NO_LINTING), server_side_cursors=False, - **kwargs + **kwargs, ): if server_side_cursors: diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index 90e0ea5d2..37512fc7e 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -729,7 +729,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw + **kw, ) -> List[ReflectedColumn]: """Return information about columns in ``table_name``. @@ -747,7 +747,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> ReflectedPrimaryKeyConstraint: """Return information about the primary key constraint on table_name`. @@ -766,7 +766,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> List[ReflectedForeignKeyConstraint]: """Return information about foreign_keys in ``table_name``. @@ -833,7 +833,7 @@ class Dialect: connection: "Connection", view_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> str: """Return view definition. @@ -849,7 +849,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> List[ReflectedIndex]: """Return information about indexes in ``table_name``. @@ -867,7 +867,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> List[ReflectedUniqueConstraint]: r"""Return information about unique constraints in ``table_name``. @@ -884,7 +884,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> List[ReflectedCheckConstraint]: r"""Return information about check constraints in ``table_name``. @@ -901,7 +901,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> Dict[str, Any]: r"""Return the "options" for the table identified by ``table_name`` as a dictionary. @@ -913,7 +913,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> ReflectedTableComment: r"""Return the "comment" for the table identified by ``table_name``. @@ -956,7 +956,7 @@ class Dialect: connection: "Connection", table_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> bool: """For internal dialect use, check the existence of a particular table or view in the database. @@ -1017,7 +1017,7 @@ class Dialect: connection: "Connection", sequence_name: str, schema: Optional[str] = None, - **kw: Any + **kw: Any, ) -> bool: """Check the existence of a particular sequence in the database. diff --git a/lib/sqlalchemy/engine/processors.py b/lib/sqlalchemy/engine/processors.py index 023444d10..e05d1b0a4 100644 --- a/lib/sqlalchemy/engine/processors.py +++ b/lib/sqlalchemy/engine/processors.py @@ -33,7 +33,6 @@ try: # return Decimal('5'). These are equivalent of course. return DecimalResultProcessor(target_class, "%%.%df" % scale).process - except ImportError: from ._py_processors import int_to_boolean # noqa from ._py_processors import str_to_date # noqa diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 562130f77..e1b06a314 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -960,7 +960,7 @@ class Inspector: schema=referred_schema, autoload_with=self.bind, _extend_on=_extend_on, - **reflection_options + **reflection_options, ) for column in referred_columns: refspec.append( @@ -974,7 +974,7 @@ class Inspector: autoload_with=self.bind, schema=sa_schema.BLANK_SCHEMA, _extend_on=_extend_on, - **reflection_options + **reflection_options, ) for column in referred_columns: refspec.append(".".join([referred_table, column])) @@ -988,7 +988,7 @@ class Inspector: refspec, conname, link_to_name=True, - **options + **options, ) ) @@ -1054,7 +1054,7 @@ class Inspector: name, *idx_cols, _table=table, - **dict(list(dialect_options.items()) + [("unique", unique)]) + **dict(list(dialect_options.items()) + [("unique", unique)]), ) def _reflect_unique_constraints( |
