-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathruff.toml
More file actions
110 lines (105 loc) · 2.46 KB
/
ruff.toml
File metadata and controls
110 lines (105 loc) · 2.46 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
target-version = "py311"
line-length = 88
preview = true
[lint]
select = [
"ANN", # annotations
"B", # bugbear
"C4", # comprehensions
# pydocstyle
"D",
"FBT",
"E", # pyflakes errors
"ERA001", # erradicate
"F", # pyflakes warnings
"FA102", # require `from __future__ import annotations`
"I", # isort
# pie (PIE)
"PIE",
"RUF",
"RUF002", # ambiguous-unicode-character-docstring
"RUF015",
"RUF022",
"RUF100", # no unused 'noqa' comments
"RUF036",
# flake8-simplify (SIM)
"SIM",
"T201", # print
"TC",
# pyupgrade
"UP",
"W",
]
ignore = [
"ANN401", # use of Any
"C417", # super annoying
"C901", # too complex
"RUF052", # used-dummy-variable
# PYDOCSTYLE
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D107", # undocumented-public-init
"D403", # first-line-capitalized
"D415", # first line should end with a period/exclamation point
"E501", # line too long,
"FA",
# PIE
"PIE804", # unnecessary-dict-kwargs -- TODO: revisit?
"SIM105", # suppressible-exception
"SIM115", # open-file-with-context-handler
# PYUPGRADE
"UP009", # utf-8 encoding declaration (not needed but I am nostalgic)
"UP022", # must test shellfish first...
]
[lint.per-file-ignores]
"**/conftest.py" = ["D"]
"**/noxfile.py" = ["D"]
"**/tests/*.py" = [
"ANN401", # use of Any
"D1",
"D100", # missing docstring in public module
"D102",
"D103", # missing docstring
]
"*.ipynb" = ["ANN", "E741", "F401", "F811", "F821", "RUF031", "T201"]
"libs/jsonbourne/src/jsonbourne/trydantic.py" = [
"I001", # isort something wrong with in try block import
]
"libs/requires/tests/test_requires.py" = [
"F821", # undefined name; not valid for this test file
]
"libs/requires/tests/test_requires_w_json_libs.py" = [
"F821", # undefined name; not valid for this test file
]
"libs/shellfish/tests/*" = [
"D100", # missing docstring
]
[lint.isort]
combine-as-imports = true
known-first-party = [
"aiopen",
"asyncify",
"dgpylibs",
"dgpytest",
"fmts",
"funkify",
"h5",
"jsonbourne",
"lager",
"listless",
"requires",
"shellfish",
"xtyping",
]
lines-after-imports = -1
lines-between-types = 1
[lint.flake8-boolean-trap]
extend-allowed-calls = ["pydantic.Field"]
[lint.mccabe]
max-complexity = 20
[lint.pydocstyle]
convention = "google"