mirror of
https://github.com/emmett-framework/granian.git
synced 2025-07-07 19:35:33 +00:00
138 lines
3.2 KiB
TOML
138 lines
3.2 KiB
TOML
[project]
|
|
name = 'granian'
|
|
authors = [
|
|
{ name = 'Giovanni Barillari', email = 'g@baro.dev' }
|
|
]
|
|
classifiers = [
|
|
'Development Status :: 5 - Production/Stable',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: BSD License',
|
|
'Operating System :: MacOS',
|
|
'Operating System :: Microsoft :: Windows',
|
|
'Operating System :: POSIX :: Linux',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.9',
|
|
'Programming Language :: Python :: 3.10',
|
|
'Programming Language :: Python :: 3.11',
|
|
'Programming Language :: Python :: 3.12',
|
|
'Programming Language :: Python :: 3.13',
|
|
'Programming Language :: Python :: 3.14',
|
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
'Programming Language :: Python :: Implementation :: PyPy',
|
|
'Programming Language :: Python',
|
|
'Programming Language :: Rust',
|
|
'Topic :: Internet :: WWW/HTTP',
|
|
]
|
|
|
|
dynamic = [
|
|
'description',
|
|
'keywords',
|
|
'license',
|
|
'readme',
|
|
'version',
|
|
]
|
|
|
|
requires-python = '>=3.9'
|
|
dependencies = [
|
|
'click>=8.0.0',
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dotenv = [
|
|
'python-dotenv~=1.1',
|
|
]
|
|
pname = [
|
|
'setproctitle~=1.3.3',
|
|
]
|
|
reload = [
|
|
'watchfiles~=1.0',
|
|
]
|
|
rloop = [
|
|
'rloop~=0.1; sys_platform != "win32"',
|
|
]
|
|
uvloop = [
|
|
'uvloop>=0.18.0; sys_platform != "win32" and platform_python_implementation == "CPython"',
|
|
]
|
|
|
|
all = ['granian[dotenv,pname,reload]']
|
|
|
|
[project.urls]
|
|
Homepage = 'https://github.com/emmett-framework/granian'
|
|
Funding = 'https://github.com/sponsors/gi0baro'
|
|
Source = 'https://github.com/emmett-framework/granian'
|
|
|
|
[dependency-groups]
|
|
build = [
|
|
'maturin~=1.8',
|
|
]
|
|
lint = [
|
|
'ruff~=0.11',
|
|
]
|
|
test = [
|
|
'httpx~=0.28',
|
|
'pytest~=8.3',
|
|
'pytest-asyncio~=0.26',
|
|
'sniffio~=1.3',
|
|
'websockets~=15.0',
|
|
]
|
|
|
|
all = [
|
|
{ include-group = 'build' },
|
|
{ include-group = 'lint' },
|
|
{ include-group = 'test' },
|
|
]
|
|
|
|
[project.scripts]
|
|
granian = 'granian:cli.entrypoint'
|
|
|
|
[build-system]
|
|
requires = ['maturin>=1.8.0,<2']
|
|
build-backend = 'maturin'
|
|
|
|
[tool.maturin]
|
|
module-name = 'granian._granian'
|
|
bindings = 'pyo3'
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
extend-select = [
|
|
# E and F are enabled by default
|
|
'B', # flake8-bugbear
|
|
'C4', # flake8-comprehensions
|
|
'C90', # mccabe
|
|
'I', # isort
|
|
'N', # pep8-naming
|
|
'Q', # flake8-quotes
|
|
'RUF100', # ruff (unused noqa)
|
|
'S', # flake8-bandit
|
|
'W', # pycodestyle
|
|
]
|
|
extend-ignore = [
|
|
'B008', # function calls in args defaults are fine
|
|
'B009', # getattr with constants is fine
|
|
'B904', # rising without from is fine
|
|
'E501', # leave line length to black
|
|
'N818', # leave to us exceptions naming
|
|
'S101', # assert is fine
|
|
'S110', # except pass is fine
|
|
]
|
|
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
|
|
mccabe = { max-complexity = 20 }
|
|
|
|
[tool.ruff.format]
|
|
quote-style = 'single'
|
|
|
|
[tool.ruff.isort]
|
|
combine-as-imports = true
|
|
lines-after-imports = 2
|
|
known-first-party = ['granian', 'tests']
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
'granian/_granian.pyi' = ['I001']
|
|
'tests/**' = ['B018', 'S110', 'S501']
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = 'auto'
|
|
|
|
[tool.uv]
|
|
package = false
|