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
|
[tool.poetry]
name = "switchbot_api"
version = "2.5.0"
description = "An asynchronous library to use Switchbot API"
authors = ["Ravaka Razafimanantsoa <contact@ravaka.dev>"]
license = "MIT"
readme = "README.md"
packages = [{include = "switchbot_api"}]
repository = "https://github.com/SeraphicCorp/py-switchbot-api"
[tool.poetry.dependencies]
python = "^3.10"
aiohttp = ">=3.0.0"
[tool.poetry.group.dev.dependencies]
coverage = {version = "7.6.10", extras = ["toml"]}
mypy = "^1.4.1"
pytest-asyncio = "^0.25.2"
pytest-freezer = "^0.4.9"
pytest = "^8.3.4"
syrupy = "^4.8.1"
aioresponses = "^0.7.7"
ruff = "^0.9.2"
pytest-cov = "^6.0.0"
covdefaults = "^2.3.0"
codespell = "^2.3.0"
pre-commit = "^4.0.1"
pre-commit-hooks = "^5.0.0"
yamllint = "^1.35.1"
[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"
# 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
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.pytest.ini_options]
addopts = "--cov"
asyncio_mode = "auto"
pythonpath = ["switchbot_api"]
[tool.coverage.report]
skip_empty = true
show_missing = true
fail_under = 50
[tool.coverage.run]
plugins = ["covdefaults"]
source = ["switchbot_api"]
[tool.ruff.lint]
ignore = [
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
"COM812", # Conflicts with other rules
"D203", # Conflicts with other rules
"D213", # Conflicts with other rules
"D417", # False positives in some occasions
"ISC001", # Conflicts with other rules
"PLR2004", # Just annoying, not really useful
]
select = ["ALL"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.lint.isort]
known-first-party = ["switchbot_api"]
force-sort-within-sections = true
split-on-trailing-comma = false
combine-as-imports = true
[tool.ruff.lint.mccabe]
max-complexity = 25
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
|