-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (140 loc) · 4.1 KB
/
pyproject.toml
File metadata and controls
153 lines (140 loc) · 4.1 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "solc-select"
version = "1.2.0"
dependencies = [
"pycryptodome>=3.4.6",
"packaging",
"requests>=2.32.4",
]
requires-python = ">= 3.10"
authors = [
{name = "Trail of Bits", email = "opensource@trailofbits.com"},
]
maintainers = [
{name = "Trail of Bits", email = "opensource@trailofbits.com"},
]
description = "Manage multiple Solidity compiler versions."
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["solc", "solidity", "ethereum", "compiler", "version manager"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Compilers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Programming Language :: Python :: 3",
"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",
]
[project.urls]
Homepage = "https://github.com/crytic/solc-select"
Repository = "https://github.com/crytic/solc-select.git"
Issues = "https://github.com/crytic/solc-select/issues"
[project.optional-dependencies]
dev = [
# Testing
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=3.0.0",
# Linting and type checking
"ruff>=0.1.0",
"mypy>=1.0.0",
"types-setuptools",
"types-requests",
"types-urllib3",
# Development tools
"pre-commit>=3.5.0",
]
[project.scripts]
solc-select = "solc_select.__main__:solc_select"
solc = "solc_select.__main__:solc"
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"W", # pycodestyle warnings
"UP", # pyupgrade
"B", # flake8-bugbear (catches common bugs)
"C4", # flake8-comprehensions (better comprehensions)
"SIM", # flake8-simplify (simpler code)
"TCH", # flake8-type-checking (type checking imports)
"RUF", # Ruff-specific rules
"PLR", # Pylint refactor checks
"PLE", # Pylint error checks
"PLW", # Pylint warning checks
]
ignore = [
"E501", # line-too-long (handled by formatter)
"PLR0912", # too-many-branches (existing code has complex logic)
"PLR0913", # too-many-arguments (sometimes needed)
"PLR2004", # magic-value-comparison (too strict)
"SIM102", # collapsible-if (sometimes clearer as nested)
"SIM108", # if-else-block-instead-of-if-exp (sometimes clearer)
"RUF005", # collection-literal-concatenation (existing pattern)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # unused imports in __init__ files
[tool.ruff.format]
# Match black's formatting style
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
markers = [
"linux: marks tests to run only on Linux",
"macos: marks tests to run only on macOS",
"windows: marks tests to run only on Windows",
"slow: marks tests as slow running",
]
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
# Additional strict checks for maximum safety
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
extra_checks = true
# Error on missing imports (don't allow implicit Any)
disallow_any_unimported = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_decorators = false
[tool.coverage.run]
omit = [
"solc_select/__main__.py",
"solc_select/solc_select.py",
"solc_select/utils.py"
]
[tool.uv]
python-preference = "only-managed"