-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
144 lines (130 loc) · 3.43 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
[project]
authors = [
{name = "Zhang Hua", email = "[email protected]"},
]
requires-python = "<3.14,>=3.12"
dependencies = [
"aiohttp<4.0.0,>=3.9.3",
"defusedxml>=0.7.1",
"watchfiles>=0.24.0",
"pydantic>=2.9.2",
]
name = "crx-repo"
description = "Download Chrom(e|ium) extensions from Chrome Web Store and serve a update manifest."
readme = "README.md"
dynamic = ["version"]
[project.scripts]
crx-repo = "crx_repo:main"
[project.optional-dependencies]
uvloop = [
"uvloop>=0.20.0",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[dependency-groups]
dev = [
"pytest-aiohttp<2.0.0,>=1.0.5",
"pytest-cov>=6.0.0",
"pytest-ruff<1.0.0,>=0.3.1",
]
[tool.pdm.version]
source = "file"
path = "src/crx_repo/__init__.py"
[tool.basedpyright]
venvPath="."
venv=".venv"
reportMissingImports = true
pythonPlatform = "All"
typeCheckingMode = "all"
useLibraryCodeForTypes = true
# diagnostic rules
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
reportMissingTypeStubs = "warning"
reportImportCycles = true
reportUninitializedInstanceVariable = "warning"
reportCallInDefaultInitializer = "warning"
reportImplicitStringConcatenation = true
reportUnusedCallResult = "information"
reportUnnecessaryTypeIgnoreComment = "information"
reportImplicitOverride = "information"
reportShadowedImports = "information"
[tool.pytest.ini_options]
addopts = "--cov=crx_repo --ruff"
required_plugins = "pytest-ruff pytest-cov pytest-aiohttp"
[tool.ruff]
builtins = ["_"]
line-length = 100
extend-exclude = ["__pycache__"]
output-format = "github"
required-version = ">=0.6.2"
[tool.ruff.lint]
preview = true
select = [
"F", # Pyflakes
"E", "W", # pycodestyle, Error, Warning
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"T20", # flake8-print
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"FIX", # flake8-fixme
"ERA", # eradicate
"PL", # Pylint
"R", # Refactor
"FLY", # flynt
"FURB", # refurb
"LOG", # flake8-logging
"RUF", # Ruff specific
]
ignore = [
"ANN101", # type for self
"ANN102", # type for cls
"PLW0603", # global statements
"FIX002", # todo is not critical
"COM812",
"ISC001",
]
[tool.ruff.lint.per-file-ignores]
# tests are usually using assert and private objects
# pyright is not happy when using i.attr
# test __eq__ function should not be changed to ==
"tests/**.py" = ["S101"]
# async generator is required by aiohttp
"src/crx_repo/__init__.py" = ["RUF029"]
# xml.etree.ElementTree is used for creating xml instead parsing
# async generator is required by aiohttp
"src/crx_repo/server.py" = ["S405", "RUF029"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
mypy-init-return = true
suppress-dummy-args = true
suppress-none-returning = true
[tool.ruff.lint.isort]
force-single-line = true
length-sort = true
lines-after-imports = 2
no-sections = true
[tool.ruff.lint.pycodestyle]
max-doc-length = 100
max-line-length = 100
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
docstring-code-format = true