forked from shreyasmene06/pyvm-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
194 lines (172 loc) · 4.32 KB
/
pyproject.toml
File metadata and controls
194 lines (172 loc) · 4.32 KB
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# ============================================
# pyproject.toml - Project Configuration
# ============================================
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "pyvm-updater"
version = "2.2.0"
description = "Cross-platform Python version checker and installer (does NOT modify system defaults)"
readme = "README.md"
license = "MIT"
authors = [
{ name="Shreyas Mene", email="shreyasmene06@gmail.com"}
]
requires-python = ">=3.9"
dependencies = [
"requests>=2.25.0",
"beautifulsoup4>=4.9.0",
"packaging>=20.0",
"click>=8.0.0",
"textual>=0.40.0",
"rich>=13.0.0", # Used for enhanced CLI progress bars
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-dir]
"" = "src"
[project.urls]
Repository = "https://github.com/shreyasmene06/pyvm-updater"
[project.optional-dependencies]
dev = [
"pytest>=6.0",
"pytest-cov>=2.0",
"black>=21.0",
"flake8>=3.9",
"mypy>=0.900",
"textual-dev>=1.0.0",
]
[project.scripts]
pyvm = "pyvm_updater.cli:main"
[tool.black]
line-length = 120
target-version = ['py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| __pycache__
)/
'''
[tool.ruff]
# Same as Black
line-length = 120
target-version = "py39"
# Exclude common directories
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[tool.ruff.lint]
# Enable pycodestyle (E), Pyflakes (F), isort (I), bugbear (B), comprehensions (C4)
select = ["E", "F", "I", "B", "C4", "UP", "SIM"]
ignore = [
"E501", # Line too long (handled by formatter)
"B008", # Do not perform function calls in argument defaults
"B905", # zip() without explicit strict=
"SIM102", # Use a single if statement instead of nested if statements
"SIM105", # Use contextlib.suppress instead of try-except-pass
"SIM108", # Use ternary operator instead of if-else block
"SIM117", # Use a single with statement with multiple contexts
]
# Allow autofix for all enabled rules
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.isort]
known-first-party = ["pyvm_updater"]
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Respect magic trailing commas
skip-magic-trailing-comma = false
# Format docstrings
docstring-code-format = true
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false # Start lenient, make stricter over time
disallow_incomplete_defs = true
check_untyped_defs = true
ignore_missing_imports = true
show_error_codes = true
pretty = true
# Per-module options
[[tool.mypy.overrides]]
module = "textual.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "bs4.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["src/pyvm_updater"]
omit = [
"tests/*",
"setup.py",
".venv/*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
fail_under = 0 # Set to higher value once you have tests
[tool.bandit]
exclude_dirs = [".venv", "dist", ".git", "pyvm_updater.egg-info", "tests"]
skips = ["B101"] # Skip assert warnings in tests