- flake8-builtins
- flake8-future-annotations>=0.0.5
- flake8-docstrings>=1.6.0
+ - flake8-unused-arguments
- flake8-rst-docstrings
# flake8-rst-docstrings dependency, leaving it here
# in case it requires a version pin
def _target_gced(
cls,
ref: weakref.ref[_PT],
- proxy_ref: Optional[weakref.ref[Self]] = None,
+ proxy_ref: Optional[weakref.ref[Self]] = None, # noqa: U100
) -> None:
cls._proxy_objects.pop(ref, None)
AsyncEngine._retrieve_proxy_for_target(target.engine), target
)
- async def start(self, is_ctxmanager: bool = False) -> AsyncConnection:
+ async def start(
+ self, is_ctxmanager: bool = False # noqa: U100
+ ) -> AsyncConnection:
"""Start this :class:`_asyncio.AsyncConnection` object's context
outside of using a Python ``with:`` block.
@inspection._inspects(AsyncConnection)
-def _no_insp_for_async_conn_yet(subject: AsyncConnection) -> NoReturn:
+def _no_insp_for_async_conn_yet(
+ subject: AsyncConnection, # noqa: U100
+) -> NoReturn:
raise exc.NoInspectionAvailable(
"Inspection on an AsyncConnection is currently not supported. "
"Please use ``run_sync`` to pass a callable where it's possible "
@inspection._inspects(AsyncEngine)
-def _no_insp_for_async_engine_xyet(subject: AsyncEngine) -> NoReturn:
+def _no_insp_for_async_engine_xyet(
+ subject: AsyncEngine, # noqa: U100
+) -> NoReturn:
raise exc.NoInspectionAvailable(
"Inspection on an AsyncEngine is currently not supported. "
"Please obtain a connection then use ``conn.run_sync`` to pass a "
populate_existing=populate_existing,
with_for_update=with_for_update,
identity_token=identity_token,
+ execution_options=execution_options,
)
return result_obj
N801,N802,N806,
RST304,RST303,RST299,RST399,
W503,W504,W601
+extend-ignore =
+ # keep in extend ignore so that they can be enabled in a subset of files in the tox run
+ U100,U101
exclude = .venv,.git,.tox,dist,doc,*egg,build
import-order-style = google
application-import-names = sqlalchemy,test
lib/sqlalchemy/sql/expression.py:F401
lib/sqlalchemy/util/typing.py:F401
+unused-arguments-ignore-stub-functions=true
+unused-arguments-ignore-dunder=true
+
[sqla_testing]
requirement_cls = test.requirements:DefaultRequirements
profile_file = test/profiles.txt
flake8-builtins
flake8-future-annotations>=0.0.5
flake8-docstrings>=1.6.0
- flake8-rst-docstrings
flake8-import-single==0.1.5
+ flake8-unused-arguments
+ flake8-rst-docstrings
# flake8-rst-docstrings dependency, leaving it here
# in case it requires a version pin
pydocstyle
sh
commands =
flake8 ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py {posargs}
+ # run flake8-unused-arguments only on some files / modules
+ flake8 --extend-ignore='' ./lib/sqlalchemy/ext/asyncio ./lib/sqlalchemy/orm/scoping.py
black --check ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py
# test with cython and without cython exts running
slotscheck -m sqlalchemy