2023-11-28 13:24:06 +08:00
|
|
|
indent-width = 2
|
2024-05-15 12:16:14 +08:00
|
|
|
preview = true
|
|
|
|
target-version = "py38"
|
2023-09-07 03:20:25 +08:00
|
|
|
|
2024-02-02 09:50:20 +08:00
|
|
|
lint.select = [
|
2024-05-15 12:16:14 +08:00
|
|
|
"F", # Pyflakes
|
2023-09-07 03:20:25 +08:00
|
|
|
"W6",
|
|
|
|
"E71",
|
|
|
|
"E72",
|
2024-02-02 09:50:20 +08:00
|
|
|
"E112", # no-indented-block
|
|
|
|
"E113", # unexpected-indentation
|
2023-09-07 03:20:25 +08:00
|
|
|
# "E124",
|
2024-02-02 09:50:20 +08:00
|
|
|
"E203", # whitespace-before-punctuation
|
|
|
|
"E272", # multiple-spaces-before-keyword
|
2024-08-18 04:44:34 +08:00
|
|
|
"E275", # missing-whitespace-after-keyword
|
2024-06-27 19:54:59 +08:00
|
|
|
"E303", # too-many-blank-lines
|
|
|
|
"E304", # blank-line-after-decorator
|
2024-02-02 09:50:20 +08:00
|
|
|
"E501", # line-too-long
|
2023-09-07 03:20:25 +08:00
|
|
|
# "E502",
|
2024-02-02 09:50:20 +08:00
|
|
|
"E702", # multiple-statements-on-one-line-semicolon
|
|
|
|
"E703", # useless-semicolon
|
|
|
|
"E731", # lambda-assignment
|
|
|
|
"W191", # tab-indentation
|
|
|
|
"W291", # trailing-whitespace
|
|
|
|
"W293", # blank-line-with-whitespace
|
2023-09-07 03:20:25 +08:00
|
|
|
"UP039", # unnecessary-class-parentheses
|
2024-06-27 19:45:29 +08:00
|
|
|
"C416", # unnecessary-comprehension
|
2024-06-27 19:54:59 +08:00
|
|
|
"RET506", # superfluous-else-raise
|
|
|
|
"RET507", # superfluous-else-continue
|
2024-06-27 20:15:01 +08:00
|
|
|
"A", # builtin-variable-shadowing, builtin-argument-shadowing, builtin-attribute-shadowing
|
2024-06-27 23:23:44 +08:00
|
|
|
"SIM105", # suppressible-exception
|
2024-06-27 23:22:19 +08:00
|
|
|
"FURB110",# if-exp-instead-of-or-operator
|
2024-08-19 12:34:52 +08:00
|
|
|
"RUF018", # assignment-in-assert
|
2023-09-07 03:20:25 +08:00
|
|
|
]
|
|
|
|
|
2023-12-13 09:34:47 +08:00
|
|
|
line-length = 150
|
|
|
|
|
2023-09-07 03:20:25 +08:00
|
|
|
exclude = [
|
|
|
|
"docs/",
|
|
|
|
"examples/",
|
|
|
|
"extra/",
|
2024-01-27 04:44:19 +08:00
|
|
|
"tinygrad/runtime/autogen",
|
2024-03-07 07:11:01 +08:00
|
|
|
"test/external/mlperf_resnet",
|
2024-04-18 08:09:33 +08:00
|
|
|
"test/external/mlperf_unet3d",
|
2023-09-07 03:20:25 +08:00
|
|
|
]
|