fengmiguoji commited on
Commit
d2e9aaa
·
verified ·
1 Parent(s): 83b1de0

Upload api\.ruff.toml with huggingface_hub

Browse files
Files changed (1) hide show
  1. api//.ruff.toml +97 -0
api//.ruff.toml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ exclude = [
2
+ "migrations/*",
3
+ ]
4
+ line-length = 120
5
+
6
+ [format]
7
+ quote-style = "double"
8
+
9
+ [lint]
10
+ preview = true
11
+ select = [
12
+ "B", # flake8-bugbear rules
13
+ "C4", # flake8-comprehensions
14
+ "E", # pycodestyle E rules
15
+ "F", # pyflakes rules
16
+ "FURB", # refurb rules
17
+ "I", # isort rules
18
+ "N", # pep8-naming
19
+ "PT", # flake8-pytest-style rules
20
+ "PLC0208", # iteration-over-set
21
+ "PLC2801", # unnecessary-dunder-call
22
+ "PLC0414", # useless-import-alias
23
+ "PLE0604", # invalid-all-object
24
+ "PLE0605", # invalid-all-format
25
+ "PLR0402", # manual-from-import
26
+ "PLR1711", # useless-return
27
+ "PLR1714", # repeated-equality-comparison
28
+ "RUF013", # implicit-optional
29
+ "RUF019", # unnecessary-key-check
30
+ "RUF100", # unused-noqa
31
+ "RUF101", # redirected-noqa
32
+ "RUF200", # invalid-pyproject-toml
33
+ "RUF022", # unsorted-dunder-all
34
+ "S506", # unsafe-yaml-load
35
+ "SIM", # flake8-simplify rules
36
+ "TRY400", # error-instead-of-exception
37
+ "TRY401", # verbose-log-message
38
+ "UP", # pyupgrade rules
39
+ "W191", # tab-indentation
40
+ "W605", # invalid-escape-sequence
41
+ ]
42
+
43
+ ignore = [
44
+ "E402", # module-import-not-at-top-of-file
45
+ "E711", # none-comparison
46
+ "E712", # true-false-comparison
47
+ "E721", # type-comparison
48
+ "E722", # bare-except
49
+ "E731", # lambda-assignment
50
+ "F821", # undefined-name
51
+ "F841", # unused-variable
52
+ "FURB113", # repeated-append
53
+ "FURB152", # math-constant
54
+ "UP007", # non-pep604-annotation
55
+ "UP032", # f-string
56
+ "UP045", # non-pep604-annotation-optional
57
+ "B005", # strip-with-multi-characters
58
+ "B006", # mutable-argument-default
59
+ "B007", # unused-loop-control-variable
60
+ "B026", # star-arg-unpacking-after-keyword-arg
61
+ "B903", # class-as-data-structure
62
+ "B904", # raise-without-from-inside-except
63
+ "B905", # zip-without-explicit-strict
64
+ "N806", # non-lowercase-variable-in-function
65
+ "N815", # mixed-case-variable-in-class-scope
66
+ "PT011", # pytest-raises-too-broad
67
+ "SIM102", # collapsible-if
68
+ "SIM103", # needless-bool
69
+ "SIM105", # suppressible-exception
70
+ "SIM107", # return-in-try-except-finally
71
+ "SIM108", # if-else-block-instead-of-if-exp
72
+ "SIM113", # enumerate-for-loop
73
+ "SIM117", # multiple-with-statements
74
+ "SIM210", # if-expr-with-true-false
75
+ ]
76
+
77
+ [lint.per-file-ignores]
78
+ "__init__.py" = [
79
+ "F401", # unused-import
80
+ "F811", # redefined-while-unused
81
+ ]
82
+ "configs/*" = [
83
+ "N802", # invalid-function-name
84
+ ]
85
+ "libs/gmpy2_pkcs10aep_cipher.py" = [
86
+ "N803", # invalid-argument-name
87
+ ]
88
+ "tests/*" = [
89
+ "F811", # redefined-while-unused
90
+ ]
91
+
92
+ [lint.pyflakes]
93
+ allowed-unused-imports = [
94
+ "_pytest.monkeypatch",
95
+ "tests.integration_tests",
96
+ "tests.unit_tests",
97
+ ]