forked from dynaconf/dynaconf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
46 lines (43 loc) · 1.51 KB
/
ruff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Always generate Python 3.9-compatible code.
target-version = "py39"
line-length = 79
exclude = ["dynaconf/vendor*"]
[lint]
extend-select =[
"T100", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"T2", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
"TD", # https://docs.astral.sh/ruff/rules/#flake8-todos-td
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
]
ignore = [
# These W rules don't seem to work with ruff.
# Requested in this closed issue - seems open for discussion:
# https://github.com/astral-sh/ruff/issues/4125
# "W504", # (line break after binary operator, I prefer to put `and|or` at the end)
# "W503", # (line break before binary operator, black prefer to put `and|or` at the end)
]
[lint.per-file-ignores]
"*/__init__.py" = [
"F401", # (not used import)
"F403", # (star import `from foo import *`)
]
"tests/*" = [
"N806", # Lowercase variables
"N802", # Lowercase function names
]
"tests_functional/*" = [
"T2", # flake8-print
"TD", # flake8-todos
"N806", # flake8-todos
"E402", # (Imports not on top)
"F401", # (not used import)
]
[lint.isort]
force-single-line = true
order-by-type = false
# Cant require the future annotations because it breaks typed settings.
# typed settings are supposed to work only with Python 3.10+
# required-imports = ["from __future__ import annotations"]
known-first-party = ["dynaconf"]