mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
Configure sorting imports in CI and formatting (#11410)
* Add reformat commit to .git-blame-ignore-revs. * Make ruff also check the import order. * Add ruff check --fix for imports to the nox formatting session.
This commit is contained in:
parent
236b9c0e04
commit
91efa27cb9
3 changed files with 16 additions and 1 deletions
10
ruff.toml
10
ruff.toml
|
|
@ -7,7 +7,7 @@ line-length = 120
|
|||
[lint]
|
||||
# https://docs.astral.sh/ruff/rules/
|
||||
|
||||
select = ["A", "B", "E", "F", "FA", "FLY", "UP", "SIM"]
|
||||
select = ["A", "B", "E", "F", "FA", "FLY", "UP", "SIM", "I", "RUF022"]
|
||||
ignore = [
|
||||
# Better keep ignored (for now)
|
||||
"F811", # Redefinition of unused `xxx` (happens a lot for fixtures in unit tests)
|
||||
|
|
@ -62,3 +62,11 @@ line-ending = "lf"
|
|||
# Disable auto-formatting of code examples in docstrings. Markdown,
|
||||
# reStructuredText code/literal blocks and doctests are all supported.
|
||||
docstring-code-format = false
|
||||
|
||||
[lint.isort]
|
||||
known-first-party = [
|
||||
"ansible_collections.community.general",
|
||||
]
|
||||
known-third-party = [
|
||||
"ansible_collections.community.internal_test_tools",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue