[tool.poetry] name = "PySwitchbot" version = "2.3.0" description = "A library to communicate with Switchbot" authors = ["Daniel Hjelseth Hoyer"] license = "MIT" readme = "README.md" repository = "https://github.com/sblibs/pySwitchbot/" packages = [ { include = "switchbot" }, ] classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Other Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Home Automation", "Topic :: Software Development :: Libraries :: Python Modules", ] [tool.poetry.urls] "Bug Tracker" = "https://github.com/sblibs/pySwitchbot/issues" "Changelog" = "https://github.com/sblibs/pySwitchbot/blob/main/CHANGELOG.md" [tool.poetry.dependencies] python = ">=3.11,<4.0" aiohttp = ">=3.9.5" bleak = ">=0.19.0" bleak-retry-connector = ">=3.4.0" cryptography = ">=39.0.0" pyOpenSSL = ">=23.0.0" [tool.poetry.group.dev.dependencies] pytest = ">=7,<10" pytest-cov = ">=3,<8" pytest-asyncio = ">=0.19,<1.5" [tool.semantic_release] branch = "main" # Existing release tags have no "v" prefix (e.g. 2.2.0), unlike PSR's default # "v{version}"; without this PSR finds no prior release and bumps from 0.0.0. tag_format = "{version}" version_toml = ["pyproject.toml:tool.poetry.version"] version_variables = ["switchbot/__version__.py:__version__"] build_command = "pip install poetry && poetry build" [tool.pytest.ini_options] addopts = "--cov=switchbot --cov-report=term-missing" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.ruff] target-version = "py311" line-length = 88 [tool.ruff.lint] preview = true explicit-preview-rules = true # opt in ONLY explicitly-listed preview rules ignore = [ "S101", # use of assert "D203", # 1 blank line required before class docstring "D212", # Multi-line docstring summary should start at the first line "D100", # Missing docstring in public module "D101", # Missing docstring in public module "D102", # Missing docstring in public method "D103", # Missing docstring in public module "D104", # Missing docstring in public package "D105", # Missing docstring in magic method "D107", # Missing docstring in `__init__` "D400", # First line should end with a period "D401", # First line of docstring should be in imperative mood "D205", # 1 blank line required between summary line and description "D415", # First line should end with a period, question mark, or exclamation point "D417", # Missing argument descriptions in the docstring "E501", # Line too long "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` "B008", # Do not perform function call "S110", # `try`-`except`-`pass` detected, consider logging the exception "D106", # Missing docstring in public nested class "UP007", # typer needs Optional syntax "S603", # check for execution of untrusted input "S105", # possible hard coded creds "TID252", # not for this lib "TRY003", # nice but too many to fix, "G201", # too noisy "PLR2004", # too many to fix ] select = [ "ASYNC", # async rules "A", # flake8-builtins "B", # flake8-bugbear "BLE", # flake8-blind-except "D", # flake8-docstrings "C4", # flake8-comprehensions "C90", # mccabe complexity "DTZ", # flake8-datetimez "ERA", # eradicate "EXE", # flake8-executable "S", # flake8-bandit "F", # pyflake "FA", # flake8-future-annotations "FIX", # flake8-fixme "FURB", # refurb "FURB118", # reimplemented-operator (preview) - unneeded lambdas "E", # pycodestyle "W", # pycodestyle "UP", # pyupgrade "I", # isort "ICN", # flake8-import-conventions "INP", # flake8-no-pep420 "ISC", # flake8-implicit-str-concat "LOG", # flake8-logging "Q", # flake8-quotes "RUF", # ruff specific "FLY", # flynt "G", # flake8-logging-format , "PERF", # Perflint "PGH", # pygrep-hooks "PIE", # flake8-pie "PL", # pylint "PT", # flake8-pytest-style "PTH", # flake8-pathlib "PYI", # flake8-pyi "RET", # flake8-return "RSE", # flake8-raise , "SIM", # flake8-simplify "SLF", # flake8-self "SLOT", # flake8-slots "T100", # Trace found: {name} used "T20", # flake8-print "TD", # flake8-todos "TID", # Tidy imports "TRY", # tryceratops "YTT", # flake8-2020 ] [tool.ruff.lint.per-file-ignores] "tests/**/*" = [ "D100", "D101", "D102", "D103", "D104", "S101", "SLF001", "PLR2004", ] "setup.py" = ["D100"] "conftest.py" = ["D100"] "docs/conf.py" = ["D100"] "scripts/**/*" = [ "T201" ] [tool.ruff.lint.isort] known-first-party = ["pySwitchbot", "tests"]