Move the autoflake config

This commit is contained in:
Alexander Hess 2026-11-25 16:03:14 +01:00
commit 5293781835
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -98,18 +98,10 @@ def format_(session):
# Interpret extra arguments as locations of source files.
locations = session.posargs or SRC_LOCATIONS
# `autoflake` only changes files because of "in-place = true"
# in the "[tool.autoflake]" section in pyproject.toml
session.run('autoflake', '--version')
session.run(
'autoflake',
'--in-place',
'--recursive',
'--expand-star-imports',
'--remove-all-unused-imports',
'--ignore-init-module-imports', # modifies --remove-all-unused-imports
'--remove-duplicate-keys',
'--remove-unused-variables',
*locations,
)
session.run('autoflake', *locations)
session.run('black', '--version')
session.run('black', *locations)