-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (146 loc) · 3.89 KB
/
pyproject.toml
File metadata and controls
162 lines (146 loc) · 3.89 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
[build-system]
requires = ["hatchling>=1.20.0"]
build-backend = "hatchling.build"
[project]
name = "electron-angle-patcher"
dynamic = ["version"]
description = "Patch Electron and Chrome applications to use OpenGL rendering on macOS"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
authors = [
{name = "Martin Juul", email = "code@juul.xyz"},
]
keywords = ["electron", "brave", "chrome", "opengl", "macos", "patcher"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Utilities",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-mock>=3.12",
"pytest-xdist>=3.5",
"ruff>=0.6.0",
"mypy>=1.8",
"coverage[toml]>=7.4",
]
build = [
"build>=1.0",
"twine>=6.0",
"pyinstaller>=6.0",
]
[project.scripts]
electron-angle-patcher = "electron_angle_patcher.cli:main"
[tool.hatch.version]
path = "src/electron_angle_patcher/__init__.py"
pattern = '__version__ = "(?P<version>.+)"'
[tool.hatch.build.targets.wheel]
packages = ["src/electron_angle_patcher"]
[project.urls]
Homepage = "https://github.com/martin-juul/electron-angle-patcher"
Repository = "https://github.com/martin-juul/electron-angle-patcher"
Issues = "https://github.com/martin-juul/electron-angle-patcher/issues"
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-mock>=3.12",
"pytest-xdist>=3.5",
"coverage[toml]>=7.4",
"ruff>=0.6.0",
"mypy>=1.8",
]
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
"--cov=electron_angle_patcher",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["src"]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/test_*.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"if sys.platform != \"darwin\":",
]
[tool.ruff]
target-version = "py310"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B904", # raise without from inside except
"UP007", # optional X in type hints (for 3.10 compat)
]
[tool.ruff.lint.isort]
known-first-party = ["electron_angle_patcher"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["ARG001"]
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false