-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (152 loc) · 4.19 KB
/
pyproject.toml
File metadata and controls
167 lines (152 loc) · 4.19 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
[tool.poetry]
name = "ocpp-proxy"
version = "0.1.0"
description = "OCPP 1.6 & 2.0.1 JSON WebSocket proxy for EV charger sharing"
authors = ["OpenChargeHub"]
readme = "README.md"
packages = [{include = "ocpp_proxy", from = "src"}]
[tool.poetry.dependencies]
python = ">=3.11,<4.0"
ocpp = ">=2.0.0"
aiohttp = ">=3.9.0"
websockets = ">=12.0"
PyYAML = ">=6.0.0"
[tool.poetry.group.dev.dependencies]
pytest = ">=7.4.0"
pytest-asyncio = ">=0.21.0"
pytest-aiohttp = ">=1.0.0"
pytest-mock = ">=3.12.0"
pytest-cov = ">=4.1.0"
aioresponses = ">=0.7.0"
ruff = ">=0.1.0"
mypy = ">=1.7.0"
pre-commit = ">=3.5.0"
types-pyyaml = "^6.0.12.20250516"
[tool.poetry.scripts]
ocpp-proxy = "ocpp_proxy.main:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"e2e: End-to-end tests",
"slow: Slow running tests"
]
[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:"
]
show_missing = true
fail_under = 85
[tool.ruff]
target-version = "py311"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG001", # unused-function-argument
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"ICN", # flake8-import-conventions
"YTT", # flake8-2020
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"A", # flake8-builtins
"COM", # flake8-commas
"C90", # mccabe
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"TRY", # tryceratops
"FLY", # flynt
"NPY", # NumPy-specific rules
"PERF", # Perflint
"LOG", # flake8-logging
"RUF", # Ruff-specific rules
]
ignore = [
"S101", # assert detected
"S311", # suspicious-non-cryptographic-random-usage
"S603", # subprocess-without-shell-equals-true
"S607", # start-process-with-partial-path
"COM812", # missing-trailing-comma (conflicts with black)
"ISC001", # implicit-str-concat (conflicts with black)
"FBT001", # boolean-type-hint-positional-argument
"FBT002", # boolean-default-value-positional-argument
"A003", # builtin-attribute-shadowing
"TRY003", # raise-vanilla-args
"EM101", # raw-string-in-exception
"EM102", # f-string-in-exception
"TID252", # relative-imports
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # assert detected
"ARG001", # unused-function-argument
"S105", # hardcoded-password-string
"S106", # hardcoded-password-func-arg
"SLF001", # private-member-access
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false