This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
177 lines (154 loc) · 7.23 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[project]
name = "contribute_to_open_source"
dynamic = ["version"]
description = "Tool to help one to contribute to Open Source projects. Goal is to search Github for open issues that might be interesting."
authors = [
{name = "Mike Weltevrede", email = "[email protected]"},
]
readme = "README.md"
packages = [
{include = "contribute_to_open_source"}
]
requires-python = ">=3.9,<4.0"
dependencies = [
"requests>=2.32.3",
"python-dotenv>=1.0.1",
]
license = {text = "MIT license"}
keywords = ['python']
[project.urls]
Homepage = "https://github.com/mikeweltevrede/contribute-to-open-source/"
Repository = "https://github.com/mikeweltevrede/contribute-to-open-source"
Documentation = "https://mikeweltevrede.github.io/contribute-to-open-source/"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.mypy]
files = ["contribute_to_open_source"]
disable_error_code = ["no-redef"]
disallow_untyped_defs = "True"
disallow_any_unimported = "True"
no_implicit_optional = "True"
check_untyped_defs = "True"
warn_unused_ignores = "True"
show_error_codes = "True"
[tool.ruff]
src = ["contribute_to_open_source", "tests"]
extend-exclude = ["__init__.py"]
line-length = 120
fix = true
show-fixes = true
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = [
"F", # pyflakes | Check for errors
"E", "W", # pycodestyle | Some of the style conventions in PEP 8
"C90", # mccabe | Cyclomatic complexity
"I", # isort | Sort imports
"N", # pep8-naming | PEP 8 naming conventions
"D", "D204", "D400", "D401", # pydocstyle | Docstring conventions
"UP", # pyupgrade | Upgrade syntax for newer versions of the language
"YTT", # flake8-2020 | Misuse of sys.version or sys.version_info
"ANN", # flake8-annotations | PEP 3107-style function annotations
"S", # flake8-bandit | Security testing
"BLE", # flake8-blind-except | Do not catch all exceptions
"FBT", # flake8-boolean-trap | "Boolean Trap" antipattern
"B", # flake8-bugbear | Check likely bugs and design problems
"A", # flake8-builtins | Python builtins being used as variables or parameters
"C4", # flake8-comprehensions | Better list/set/dict comprehensions
"T10", # flake8-debugger | Presence of debugger calls and imports
"FA", # flake8-future-annotations | Verify code can use from `__future__ import annotations`
"ISC", # flake8-implicit-str-concat | Correct string literal concatenation
"ICN", # flake8-import-conventions | Import conventions, e.g. `pandas as pd`
"LOG", # flake8-logging | Issues using the standard library logging module
"G", # flake8-logging-format | Validate (lack of) logging format strings
"INP", # flake8-no-pep420 | Ban PEP-420 implicit namespace packages
"PIE", # flake8-pie | Miscellaneous linting
"PT", # flake8-pytest-style | Enforce Pytest standards
"RSE", # flake8-raise | Improvements for raise statements
"RET", # flake8-return | Check return values
"SIM", # flake8-simplify | Simplify code, e.g. checking superfluous code
"TID", # flake8-tidy-imports | Tidier imports
"TCH", # flake8-type-checking | Check imports to move in or out of type-checking blocks
"ARG", # flake8-unused-arguments | Unused function arguments
"PTH", # flake8-use-pathlib | Prefer pathlib over os, where possible
"TD", # flake8-todos | Check valid TODO structure
"ERA", # eradicate | Remove commented out code
"PGH", # pygrep-hooks | Regex based pre-commit hooks
"PL", # pylint | Enforces a coding standard, looks for code smells, and suggestions about possible refactors
"TRY", # tryceratops | Exception handling antipatterns
"FLY", # flynt | `str.join` calls that can be replaced with f-strings
"PERF", # perflint | Performance antipatterns
"FURB", # refurb | Refurbish and modernize Python codebases
"RUF", # ruff | Miscellaneous linting
]
extend-ignore = [
"ANN101", "ANN102", # Deprecated: type annotation for self and cls
"D100",
"ISC001", # May cause conflicts when used with the formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "D", "ANN"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
mypy-init-return = true
suppress-dummy-args = true
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "csv"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-type-checking]
exempt-modules = ["typing", "typing_extensions", "types"]
quote-annotations = true
strict = true
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.lint.isort]
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
split-on-trailing-comma = false
[tool.ruff.lint.pep8-naming]
extend-ignore-names = ["test_*"]
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
max-doc-length = 120
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 8
[tool.coverage.report]
skip_empty = true
exclude_also = [
'if self.debug:',
'raise AssertionError',
'raise NotImplementedError',
'if __name__ == "__main__":',
'if TYPE_CHECKING:',
'class .*\\bProtocol\\:',
'@(abc\\.)?abstractmethod'
]
[tool.coverage.run]
branch = true
source = ["contribute_to_open_source"]
[tool.pdm.version]
source = "scm"
[tool.pdm.dev-dependencies]
test = [
"pytest>=7.2.0",
"pytest-cov>=4.0.0",
]
dev = [
"deptry>=0.6.4",
"mypy>=0.981",
"pre-commit>=2.20.0",
"tox>=3.25.1",
"types-requests>=2.32.0",
]
[tool.pdm.build]
excludes = ["./**/.git"]
package-dir = "."
includes = ["contribute_to_open_source"]