You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
3.1 KiB

[tool.poetry]
name = "fastsio"
version = "5.13.1.dev0"
description = "light and typization Socket.IO server and client for Python"
license = "MIT"
license-files = ["LICEN[CS]E*"]
readme = "README.md"
homepage = "https://github.com/cicwak/fastsio"
repository = "https://github.com/cicwak/fastsio"
packages = [
{ include = "fastsio", from = "src" },
]
authors = [
"Miguel Grinberg <miguel.grinberg@gmail.com>",
"Konstantin Ponomarev <cicwak@gmail.com>",
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/cicwak/fastsio"
"Bug Tracker" = "https://github.com/cicwak/fastsio/issues"
[project.optional-dependencies]
client = [
"requests >= 2.21.0",
"websocket-client >= 0.54.0",
]
asyncio_client = [
"aiohttp >= 3.4",
]
docs = [
"sphinx",
]
[tool.poetry.dependencies]
python = ">=3.8"
bidict = ">=0.21.0"
python-engineio = "^4.12.2"
requests = { version = ">=2.21.0", optional = true }
websocket-client = { version = ">=0.54.0", optional = true }
aiohttp = { version = ">=3.4", optional = true }
sphinx = { version = "*", optional = true }
[tool.poetry.extras]
client = ["requests", "websocket-client"]
asyncio_client = ["aiohttp"]
docs = ["sphinx"]
[tool.setuptools]
zip-safe = false
include-package-data = true
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.packages.find]
where = [
"src",
]
namespaces = false
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
[tool.mypy]
plugins = ["pydantic.mypy"]
ignore_missing_imports = true
disallow_untyped_calls = false
exclude = "(venv|migrations|start_service\\.dist|start_service\\.build|start_service\\.onefile-build)"
[tool.ruff]
line-length = 88
exclude = [
"migrations",
"venv",
]
[tool.ruff.lint]
select = [
"F", "E", "W", "I", "UP", "N", "Q",
"B", "BLE", "ARG", "SIM", "C4", "PERF",
"A", "DTZ", "TCH", "TRY",
"RUF", "D", "ANN",
"RET", "RSE", "TID",
]
# Столкновения стилей докстрингов: выберем Google и заглушим конфликтующие правила
ignore = ["D203", "D213"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["fast_socketio"]
combine-as-imports = true
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"pydantic.validator",
"declared_attr",
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
# Тестам позволяем послабления: assert, отсутствие докстрингов и Any
"tests/**" = ["S101", "D", "ANN401", "ARG002", "PT009", "PT011"]
# В __init__ обычно реэкспорт, без докстрингов — не ругаемся
"**/__init__.py" = ["D104", "F401"]
# Скрипты/пример использования (если есть): можно Any и без докстрингов
"examples/**" = ["D", "ANN401"]