klaasnicolaas/python-zurich

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[tool.poetry]
name = "zurich"
version = "0.0.0"
description = "Asynchronous Python client providing Open Data information of Zurich (Switzerland)"
authors = ["Klaas Schoute <hello@student-techlife.com>"]
maintainers = ["Klaas Schoute <hello@student-techlife.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/klaasnicolaas/python-zurich"
repository = "https://github.com/klaasnicolaas/python-zurich"
documentation = "https://github.com/klaasnicolaas/python-zurich"
keywords = ["open", "data", "platform", "zurich", "parking", "api", "async", "client"]
classifiers = [
  "Development Status :: 5 - Production/Stable",
  "Framework :: AsyncIO",
  "Intended Audience :: Developers",
  "License :: OSI Approved :: MIT License",
  "Natural Language :: English",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: 3",
  "Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
  { include = "zurich", from = "src" },
]

[tool.poetry.dependencies]
aiohttp = ">=3.0.0"
python = "^3.11"
yarl = ">=1.6.0"

[tool.poetry.urls]
"Bug Tracker" = "https://github.com/klaasnicolaas/python-zurich/issues"
Changelog = "https://github.com/klaasnicolaas/python-zurich/releases"

[tool.poetry.group.dev.dependencies]
ruff = "0.4.4"
aresponses = "3.0.0"
blacken-docs = "1.16.0"
codespell = "2.2.6"
coverage = {version = "7.5.1", extras = ["toml"]}
mypy = "1.10.0"
pre-commit = "3.7.1"
pre-commit-hooks = "4.6.0"
pylint = "3.2.1"
pytest = "8.2.1"
pytest-asyncio = "0.23.6"
pytest-cov = "5.0.0"
yamllint = "1.35.1"
covdefaults = "2.3.0"

[tool.coverage.run]
plugins = ["covdefaults"]
source = ["zurich"]

[tool.coverage.report]
fail_under = 90
show_missing = true

[tool.mypy]
# Specify the target platform details in config, so your developers are
# free to run mypy on Windows, Linux, or macOS and get consistent
# results.
platform = "linux"
python_version = "3.11"

# flake8-mypy expects the two following for sensible formatting
show_column_numbers = true

# show error messages from unrelated files
follow_imports = "normal"

# suppress errors about unsatisfied imports
ignore_missing_imports = true

# be strict
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
strict_optional = true
warn_incomplete_stub = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true

[tool.pylint.BASIC]
good-names = ["_", "ex", "fp", "i", "id", "j", "k", "on", "Run", "T"]

[tool.pylint."MESSAGES CONTROL"]
disable= [
  "duplicate-code",
  "format",
  "unsubscriptable-object",
]

[tool.pylint.SIMILARITIES]
ignore-imports = true

[tool.pylint.FORMAT]
max-line-length = 88

[tool.pylint.DESIGN]
max-attributes = 20

[tool.pytest.ini_options]
addopts = "--cov"
asyncio_mode = "auto"

[tool.ruff]
target-version = "py311"
lint.select = ["ALL"]
lint.ignore = [
  "ANN101",  # Self... explanatory
  "ANN102",  # cls... just as useless
  "ANN401",  # Opinioated warning on disallowing dynamically typed expressions
  "D203",    # Conflicts with other rules
  "D213",    # Conflicts with other rules
  "D417",    # False positives in some occasions
  "PLR2004", # Just annoying, not really useful
  "SLOT000", # Has a bug with enums: https://github.com/astral-sh/ruff/issues/5748

  # Conflicts with the Ruff formatter
  "COM812",
  "ISC001",
]

[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
fixture-parentheses = false

[tool.ruff.lint.isort]
known-first-party = ["zurich"]

[tool.ruff.lint.mccabe]
max-complexity = 25

[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]