forked from zulip/python-zulip-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
160 lines (150 loc) · 4.1 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[tool.black]
line-length = 100
target-version = ["py38"]
[tool.isort]
src_paths = [
"tools",
"zulip",
"zulip/integrations/zephyr",
"zulip_bots",
"zulip_botserver",
]
profile = "black"
line_length = 100
[tool.mypy]
mypy_path = [
"$MYPY_CONFIG_FILE_DIR/stubs",
"$MYPY_CONFIG_FILE_DIR/tools",
"$MYPY_CONFIG_FILE_DIR/zulip",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/bridge_between_zulips",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/bridge_with_irc",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/bridge_with_slack",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/codebase",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/git",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/openshift",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/perforce",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/svn",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/trac",
"$MYPY_CONFIG_FILE_DIR/zulip/integrations/zephyr",
"$MYPY_CONFIG_FILE_DIR/zulip_bots",
"$MYPY_CONFIG_FILE_DIR/zulip_botserver",
]
explicit_package_bases = true
scripts_are_modules = true
show_traceback = true
# Enable strict mode, with some exceptions.
strict = true
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_decorators = false
warn_return_any = false
# Enable optional errors.
enable_error_code = [
"redundant-self",
"redundant-expr",
"truthy-bool",
"truthy-iterable",
"ignore-without-code",
"unused-awaitable",
"explicit-override",
]
# Other options.
warn_unreachable = true
[[tool.mypy.overrides]]
module = [
"apiai.*",
"feedparser.*",
"gitlint.*",
"googleapiclient.*",
"irc.*",
"mercurial.*",
"nio.*",
"oauth2client.*",
"pysvn.*",
"scripts.*",
"setuptools.*",
"simple_salesforce.*",
"slack_sdk.*",
"sleekxmpp.*",
"trac.*",
"twitter.*",
"wit.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"git_p4",
]
ignore_errors = true
[tool.pytest.ini_options]
pythonpath = [
"zulip",
"zulip_bots",
"zulip_botserver",
]
[tool.ruff]
select = [
"B", # bugbear
"C4", # comprehensions
"COM", # trailing comma
"DTZ", # naive datetime
"E", # style errors
"EXE", # shebang
"F", # flakes
"FLY", # string formatting
"G", # logging format
"I", # import sorting
"ICN", # import conventions
"INT", # gettext
"ISC", # string concatenation
"N", # naming
"PERF", # performance
"PGH", # pygrep-hooks
"PIE", # miscellaneous
"PL", # pylint
"PYI", # typing stubs
"Q", # quotes
"RSE", # raise
"RUF", # Ruff
"S", # security
"SLF", # self
"SLOT", # slots
"SIM", # simplify
"T10", # debugger
"TID", # tidy imports
"TRY", # try
"UP", # upgrade
"W", # style warnings
"YTT", # sys.version
]
ignore = [
"C408", # Unnecessary `dict` call (rewrite as a literal)
"COM812", # Trailing comma missing
"E402", # Module level import not at top of file
"E501", # Line too long
"E731", # Do not assign a `lambda` expression, use a `def`
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"RUF001", # String contains ambiguous character
"S101", # Use of `assert` detected
"S113", # Probable use of requests call without timeout
"S603", # `subprocess` call: check for execution of untrusted input
"S606", # Starting a process without a shell
"S607", # Starting a process with a partial executable path
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"TRY003", # Avoid specifying long messages outside the exception class
"TRY400", # Use `logging.exception` instead of `logging.error`
]
src = [
"tools",
"zulip",
"zulip/integrations/zephyr",
"zulip_bots",
"zulip_botserver",
]
target-version = "py38"
line-length = 100