forked from modular/modular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (89 loc) · 2.79 KB
/
pyproject.toml
File metadata and controls
95 lines (89 loc) · 2.79 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
[project]
name = "modular"
version = "0"
requires-python = ">= 3.9"
[tool.black]
include = '\.mojo$'
line-length = 80
preview = true
fast = true
force-exclude = '''
(
/(
third-party/llvm-project
| third-party/vllm-benchmarks
| \.derived
| venv
| utils/mblack
| KGEN/test/mojo-parser
| KGEN/test/mojo-isolated
| SDK/lib/API/python/max/serve/schemas
)/
)
'''
[tool.ruff]
line-length = 80 # Must match above
src = ["something-that-doesnt-exist"] # Stop ruff from assuming any root directory is a python module
extend-exclude = [
"**/lit.cfg.py", # Globals that aren't imported
"*.ipynb",
"*max/serve/schemas/openai.py", # Generated file
"Support/python/modular/utils/debuglib/lldbtypes.py",
"third-party",
"utils/build/llvm-lit/lit.common.cfg.py", # Globals that aren't imported
"utils/mblack",
]
[tool.ruff.lint]
ignore = [
"E401", # multiple imports on one line
"E402", # TODO: import top of file
"E711", # TODO: comparison to None
"E712", # TODO: Unnecessary comparison to bool
"E721", # TODO: Use isinstance
"E722", # bare except
"E731", # TODO: Don't assign lambda
"E741", # TODO: Ambiguous variable name
"F403", # glob imports
"F405", # TODO: glob imports undefined
"F821", # TODO: Undefined names, means script is invalid
"F841", # TODO: unused variables
"D105", # undocumented-magic-method
"D106", # undocumented-public-nested-class
"D205", # missing-blank-line-after-summary
"D209", # new-line-after-last-paragraph
"D212", # multi-line-summary-first-line (to allow init with args only)
"UP007", # TODO: Enable when we drop 3.9
"ANN001", # TODO: Missing type annotation for function argument
"ANN002", # TODO: Missing type annotation for *args
"ANN003", # TODO: Missing type annotation for **kwargs
"ANN201", # TODO: Missing return type annotation for public function
"ANN202", # TODO: Missing return type annotation for private function
"ANN204", # TODO: Missing return type annotation for special method
"ANN205", # TODO: Missing return type annotation for staticmethod
"ANN206", # TODO: Missing return type annotation for classmethod
"ANN401", # TODO: Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
]
extend-select = [
"I",
"D",
"UP",
"ANN",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports being re-exported
# Slow rollout of pydocstyle lint:
"!SDK/lib/API/python/max/{engine/api.py,driver/driver.py}" = ["D"]
[tool.pyright]
# TODO: Upgrade to strict mode
typeCheckingMode = "basic"
include = ["GenericML/tools/model/"]
exclude = [
"**/node_modules",
"**/__pycache__",
"GenericML/tools/model/tests",
"utils/mblack",
]
force-exclude = ["GenericML/tools/model/tests", "utils/mblack"]
reportMissingImports = false