-
Notifications
You must be signed in to change notification settings - Fork 35
/
pyproject.toml
81 lines (72 loc) · 1.77 KB
/
pyproject.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
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
[tool.black]
target-version = ['py39']
include = '\.pyi?$'
skip-magic-trailing-comma = true
preview = true
exclude = '''
/(
\.git
| \.ipython
| \.ipython64
| \.mypy_cache
| \.tox
| \.venv
)/
'''
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.pyanalyze]
paths = ["pyanalyze"]
import_paths = ["."]
enforce_no_unused = true
possibly_undefined_name = true
use_fstrings = true
missing_return_annotation = true
missing_parameter_annotation = true
unused_variable = true
value_always_true = true
suggested_parameter_type = true
suggested_return_type = true
incompatible_override = true
missing_generic_parameters = true
[[tool.pyanalyze.overrides]]
module = "pyanalyze.typevar"
implicit_any = true
[[tool.pyanalyze.overrides]]
module = "pyanalyze.yield_checker"
implicit_any = true
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
select = [
"F",
"E",
"I", # import sorting
"UP",
]
ignore = [
"B008", # do not perform function calls in argument defaults
"F811", # redefinition of unused '...'
"F821", # undefined name
"F505", # .format() stuff
"F507", # .format() stuff
"F522", # .format() stuff
"F523", # .format() stuff
"F524", # .format() stuff
"F823", # local variable referenced before assignment
"F601", # dictionary key name repeated with different values
"E721", # do not compare types, use 'isinstance()'
"F841", # local variable is assigned to but never used
"E742", # Ambiguous class name
"E731", # do not assign a lambda expression, use a def
"E741", # ambiguous variable name
]
[tool.ruff.lint.per-file-ignores]
"pyanalyze/test_*.py" = [
"UP", # Want to test old-style code
]
"pyanalyze/annotations.py" = [
"UP006", # Need to refer to typing.Type
]