-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (118 loc) · 3.16 KB
/
pyproject.toml
File metadata and controls
135 lines (118 loc) · 3.16 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
[project]
name = "porth"
version = "0.1.0"
description = "Next-generation async Python SMS Gateway"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"aiohttp>=3.9.0",
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
"smppai @ git+https://github.com/codcod/smppai.git",
"pyyaml>=6.0",
"structlog>=23.2.0",
"watchdog>=6.0.0",
]
[dependency-groups]
dev = [
"black>=25.1.0",
"mypy>=1.7.0",
"pytest-asyncio>=1.0.0",
"pytest-cov>=6.2.1",
"pytest>=8.4.1",
"ruff>=0.1.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.pyright]
pythonVersion = "3.13"
venv = ".venv"
venvPath = "."
typeCheckingMode = "basic" # Options: "off", "basic", "strict"
include = ["src", "tests"]
exclude = ["**/node_modules", "**/__pycache__", "**/*.pyc"]
reportMissingImports = true # Report missing imports
reportUnusedImports = true # Report unused imports
reportUnusedFunction = true # Report unused functions
[tool.black]
line-length = 88
target-version = ["py313"]
include = '\.pyi?$'
exclude = '''(
/(
.git
| .mypy_cache
| .pytest_cache
| build
| dist
)/
)'''
skip-string-normalization = true
fast = false
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py313"
exclude = ["docs/**/*.py"]
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
quote-style = "single"
skip-magic-trailing-comma = false
[tool.ruff.lint]
# select = ["E4", "E7", "E9", "F", "W", "E", "B", "I", "PL", "C90"]
select = ["E4", "E7", "E9", "F"]
ignore = []
fixable = ["ALL"]
unfixable = ["B"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
extend-immutable-calls = [
"Depends",
"fastapi.Depends",
"fastapi.params.Depends",
]
[tool.pytest.ini_options]
# https://docs.pytest.org/en/latest/reference/customize.html
minversion = "6.0"
addopts = [
# "-v",
# "-q",
"--tb=short", # line, auto, short, long, native, no
"--capture=no",
"--log-cli-level=INFO",
"--import-mode=importlib",
"--maxfail=10",
# "--disable-warnings",
# "--doctest-modules",
# "--cov=smpp",
]
testpaths = ["tests/unit"]
pythonpath = ["src"]
log_format = "%(asctime)s [%(levelname)-8s] [%(filename)s:%(lineno)s] %(message)s"
log_date_format = "%H:%M:%S"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::RuntimeWarning:unittest.mock",
"ignore:.*coroutine.*was never awaited.*:RuntimeWarning",
]
# Reminder:
# '^file1\.py$', # TOML literal string (single-quotes, no escaping necessary)
# "^file2\\.py$", # TOML basic string (double-quotes, backslash and other characters need escaping
[tool.bandit]
targets = ["src"]
exclude_dirs = ["tests", ".venv"]
skips = ["B101", "B301", "B601"]
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
exclude = [
'^file1\.py$', # TOML literal string (single-quotes, no escaping necessary)
"^file2\\.py$", # TOML basic string (double-quotes, backslash and other characters need escaping)
]