Move the autoflake config
This commit is contained in:
parent
c4eae82e4d
commit
1dd2810ac7
2 changed files with 16 additions and 11 deletions
14
noxfile.py
14
noxfile.py
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -107,6 +107,19 @@ docs = [
|
|||
|
||||
|
||||
|
||||
[tool.autoflake]
|
||||
# Source: https://github.com/PyCQA/autoflake#configuration
|
||||
|
||||
in-place = true
|
||||
recursive = true
|
||||
expand-star-imports = true
|
||||
remove-all-unused-imports = true
|
||||
ignore-init-module-imports = true # modifies "remove-all-unused-imports"
|
||||
remove-duplicate-keys = true
|
||||
remove-unused-variables = true
|
||||
|
||||
|
||||
|
||||
[tool.black]
|
||||
|
||||
target-version = ["py313"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue