-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (85 loc) · 2.61 KB
/
pyproject.toml
File metadata and controls
96 lines (85 loc) · 2.61 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
[project]
name = "socketshark"
version = "0.5.0"
description = "WebSocket message router"
readme = "README.rst"
license = "MIT"
requires-python = ">=3.10"
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"aiohttp",
"aioredis>=1,<2",
"click",
"structlog",
"websockets>=13,<14",
]
[project.optional-dependencies]
prometheus = ["prometheus-async"]
[project.scripts]
socketshark = "socketshark.__main__:run"
[project.urls]
Homepage = "http://github.com/closeio/socketshark"
[dependency-groups]
lint = ["mypy", "ruff>=0.15"]
test = [
"aioresponses",
"pytest",
"pytest-asyncio",
"prometheus-async",
"prometheus-client",
# TODO: Remove this and switch to using `redis-py` instead of the
# no-longer-needed `aioredis`. `aioredis` has become part of `redis-py`
# and hasn't been necessary in 4-5 years... It's so ancient that it still
# requires `setuptools` and its subdependency of `distutils`, which is no
# longer present in Python 3.12+. We must thus bring it back explicitly.
"setuptools",
]
dev = [{include-group = "lint"}, {include-group = "test"}]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages]
find = {include = ["socketshark*"]}
[tool.ruff]
target-version = "py310"
line-length = 79
[tool.ruff.lint]
extend-select = [
"UP", # Enable pyupgrade rules for modern Python syntax.
"F", # Enable pyflakes rules (unused imports, undefined names, etc.).
"I", # Enable import sorting rules (I-series, from isort).
"T", # Enable flake8-print rules.
"DTZ", # Enable flake8-datetimez rules (e.g. requiring explicit tzinfo).
"B904", # Enforce "raise from" within the "except" clause.
]
[tool.ruff.lint.isort]
combine-as-imports = true
forced-separate = ["tests"]
known-first-party = ["socketshark"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
no_implicit_optional = true
strict_equality = true
follow_imports = "skip"
warn_unreachable = true
show_error_context = true
pretty = true
files = ["socketshark"]
mypy_path = "$MYPY_CONFIG_FILE_DIR/stubs"
namespace_packages = true
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_defs = true
disallow_incomplete_defs = true