-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathruff.toml
More file actions
60 lines (53 loc) · 1.65 KB
/
ruff.toml
File metadata and controls
60 lines (53 loc) · 1.65 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
target-version = "py310"
line-length = 120
[lint]
preview = true
# https://docs.astral.sh/ruff/rules/
select = ["ALL"]
ignore = [
"COM812", # Missing trailing comma (interferes with the formatter)
]
[lint.per-file-ignores]
"test/**" = [
"E501", # Line too long
"PLR0913", # Too many arguments in function definition
#"D", # Docstrings
"S101", # Use of assert detected
"PLR0915", # Too many statements
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"PLR0904", # Too many public methods
]
"test/**/*test*.py" = [
"D", # ignore docstrings in test files
"DTZ005", # `datetime.datetime.now()` called without a `tz` argument
"DTZ011", # `datetime.date.today()` used
"DTZ001", # `datetime.datetime()` called without a `tzinfo` argument
"PLR6301" # method does not use `self`
]
"noxfile.py" = [
"D"
]
"scripts/**" = [
"T201", # Print found
"INP001", # File is part of an implicit namespace package. Add an `__init__.py`.
]
# Purely generated code
"**/{classes,functions}/*.py" = [
"CPY001", # Missing copyright notice at top of file
"I001", # Import block is un-sorted or un-formatted
"FBT001", # Boolean-typed positional argument in function definition
]
"**/{msgspec}/{classes,functions}/*.py" = [
"DOC501", # Raised exception `StopIteration` missing from docstring
# Ruff doesn't understand that we actually documented the exceptions raised when using pep257
]
[lint.isort]
required-imports = ["from __future__ import annotations"]
force-single-line = true
[lint.pydocstyle]
convention = "numpy"
[format]
exclude = [
"models.py",
"queries.py",
]