-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.ruff.toml
More file actions
115 lines (112 loc) · 3.71 KB
/
.ruff.toml
File metadata and controls
115 lines (112 loc) · 3.71 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
111
112
113
114
115
exclude = [
'.hg',
]
line-length = 78
indent-width = 2
target-version = "py38"
[lint]
extend-select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # flake8-comprehensions
"C", # mccabe
"COM", # flake8-commas
"D", # pydocstyle
"DJ", # flake8-django
# warns in concise mode "DOC", # pydoclint
"DTZ", # flake8-datetimez
"E", # pycodestyle
"F", # pyflakes
"FIX", # flake8-fixme
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # numpy specific rules
"PD", # pandas-vet
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PLC", # pylint convention
"PLE", # pylint error
"PLR", # pylint refactor
"PLW", # pylint warning
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff specific rules
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T", # flake8-debugger
"TC", # flake8-type-checking
# unknown? "TDO", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # warning
# unknown? "YYT", # flake8-2020
# "ANN", # flake8-annotations
# "CPY", # flake8-copyright
# "EM", # flake8-errmsg
# "FA", # flake8-future-annotations
# "FBT", # flake8-boolean-trap
# "INP", # flake8-no-pep420
# "INT", # flake8-gettext
# "PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib
# "S", # flake8-bandit
# "T", # flake8-print
]
ignore = [
"B904",
"C408", # Unnecessary `dict()` call (rewrite as a literal)
"COM812", # Trailing comma missing
"COM818", # Trailing comma on bare tuple prohibited
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D200", # One-line docstring should fit on one line
"D203", # incorrect-blank-line-before-class
"D204", # 1 blank line required after class docstring
"D205", # blank line required between summary line and description
"D208", # Docstring is over-indented
"D210", # No whitespaces allowed surrounding docstring text
"D212", # multi-line-summary-first-line
"D213", # Multi-line docstring summary should start at the second line
"D214", # Section is over-indented
"D300", # Use triple double quotes
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood
"D405", # Section name should be properly capitalized
"D406", # Section name should end with a newline
"D407", # Missing dashed underline after section
"D411", # Missing blank line before section
"D412", # No blank lines allowed between a section header and its content
"D413", # Missing blank line after last section
"D415", # First line should end with a period, question mark, or exclamation point
"D416", # Section name should end with a colon
"E731",
"I001", # Import block is un-sorted or un-formatted
"Q000",
"Q002",
"SIM108", # Use ternary operator
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"T201", # `print` found
"TRY003", # Avoid specifying long messages outside the exception class
"UP035", # Import from `collections.abc` instead
]
flake8-quotes.docstring-quotes = "single"
flake8-quotes.inline-quotes = "double"
flake8-quotes.multiline-quotes = "single"
[format]
indent-style = "space"
quote-style = "preserve"