160 lines
4.1 KiB
TOML
160 lines
4.1 KiB
TOML
[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
|