-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
157 lines (134 loc) · 3.59 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
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Benjamin Thomas Schwertfeger
# GitHub: https://github.com/btschwertfeger
#
# ========= T Y P I N G ========================================================
#
[tool.mypy]
python_version = "3.11"
# junit_xml = "mypy.xml"
files = ["krakengridbot/*.py"]
exclude = ["tests/*"]
cache_dir = ".cache/mypy"
sqlite_cache = true
cache_fine_grained = true
# Disallow dynamic typing
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_subclassing_any = false
# Untyped definitions and calls
check_untyped_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = false
# None and Optional handling
implicit_optional = true
strict_optional = false
# Configuring warnings
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
warn_no_return = true
warn_return_any = true
warn_unreachable = true
# Suppressing errors
ignore_errors = false
# Configuring error messages
show_error_context = true
show_column_numbers = true
hide_error_codes = false
pretty = true
color_output = true
show_absolute_path = true
ignore_missing_imports = true
# Miscellaneous strictness flags
allow_untyped_globals = false
allow_redefinition = false
local_partial_types = false
# disable_error_code = xxx,xxx
implicit_reexport = true
strict_concatenate = false
strict_equality = true
strict = true
# ========= L I N T I N G ======================================================
#
[tool.ruff]
cache-dir = ".cache/ruff"
respect-gitignore = true
exclude = []
line-length = 130
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"AIR", # Airflow
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"ASYNC1", # flake8-trio
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # pylint convention
"C4", # flake8-comprehensions
"COM", # flake8-commas
"CPY", # flake8-copyright
"E", # pylint error
"F", # pyflakes
"FA", # flake8-future-annotations
# "FBT", # flake8-boolean-trap
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC", # flake8-implicit-string-concat
"LOG", # flake8-logging
"N", # PEP8 naming
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # PyLint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"R", # pylint refactor
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
]
fixable = ["ALL"]
task-tags = ["todo", "TODO", "fixme", "FIXME"]
[tool.ruff.lint.flake8-copyright]
author = "Benjamin Thomas Schwertfeger"
notice-rgx = "(?i)Copyright \\(C\\) \\d{4}"
min-file-size = 1024
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-bandit]
check-typed-exception = true
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.lint.pep8-naming]
ignore-names = ["i", "j", "k", "_"]
[tool.ruff.lint.pylint]
max-args = 8
max-branches = 15
max-returns = 6
max-statements = 50
allow-magic-value-types = ["int"]