[build-system] requires = ["setuptools==77.0.3", "wheel==0.45.1"] build-backend = "setuptools.build_meta" [project] name = "pydeconz" version = "120" license = {text = "MIT"} description = "Python library for communicating with deCONZ REST-API" readme = "README.rst" authors = [{name = "Robert Svensson", email = "Kane610@users.noreply.github.com"}] keywords = ["deconz", "zigbee", "homeassistant"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.12", "Topic :: Home Automation", ] requires-python = ">=3.12.0" dependencies = [ "aiohttp>3.9", "orjson>3.9", ] [project.optional-dependencies] requirements = [ "aiohttp==3.11.14", "orjson==3.10.15", ] requirements-test = [ "aioresponses==0.7.8", "mypy==1.15.0", "pytest==8.3.5", "pytest-aiohttp==1.1.0", "pytest-cov==6.0.0", "ruff==0.11.1", ] requirements-dev = [ "pre-commit==4.2.0" ] [project.urls] "Source Code" = "https://github.com/Kane610/deconz" "Bug Reports" = "https://github.com/Kane610/deconz/issues" "Forum" = "https://community.home-assistant.io/t/deconz-official-thread/" [project.scripts] pydeconz = "pydeconz.__main__:main" [tool.setuptools.packages.find] include = ["pydeconz*"] [tool.setuptools.package-data] "pydeconz" = ["py.typed"] [tool.coverage.report] fail_under = 95 exclude_also = [ "if TYPE_CHECKING:" ] [tool.mypy] python_version = "3.12" 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_equality = true warn_redundant_casts = true warn_return_any = true warn_unreachable = true warn_unused_configs = true warn_unused_ignores = true [tool.pytest.ini_options] addopts = "--cov=pydeconz --cov-report term-missing" asyncio_mode = "auto" log_cli = false log_cli_level = "DEBUG" testpaths = ["tests"] [tool.ruff] src = ["pydeconz", "tests"] target-version = "py312" lint.select = [ "B002", # Python does not support the unary prefix increment "B005", # Using .strip() with multi-character strings is misleading "B007", # Loop control variable {name} not used within loop body "B014", # Exception handler with duplicate exception "B015", # Pointless comparison. Did you mean to assign a value? Otherwise, prepend assert or remove it. "B018", # Found useless attribute access. Either assign it to a variable or remove it. "B023", # Function definition does not bind loop variable {name} "B026", # Star-arg unpacking after a keyword argument is strongly discouraged "B032", # Possible unintentional type annotation (using :). Did you mean to assign (using =)? "C", # complexity "COM818", # Trailing comma on bare tuple prohibited "D", # docstrings "E", # pycodestyle "F", # pyflakes/autoflake "G", # flake8-logging-format "I", # isort "ICN001", # import concentions; {name} should be imported as {asname} "ISC", # flake8-implicit-str-concat "LOG", # flake8-logging "N804", # First argument of a class method should be named cls "N805", # First argument of a method should be named self "N815", # Variable {name} in class scope should not be mixedCase "PERF", # A Linter for performance anti-patterns "PGH004", # Use specific rule codes when using noqa "PIE", # flake8-pie "PL", # pylint "PT", # pytest "RSE", # flake8-raise "RUF005", # Consider iterable unpacking instead of concatenation "RUF006", # Store a reference to the return value of asyncio.create_task "RUF100", # Unused `noqa` directive "S307", # No builtin eval() allowed "SIM", # flake8-simplify "T100", # Trace found: {name} used "T20", # flake8-print "UP", # pyupgrade "W", # pycodestyle ] lint.ignore = [ "D202", # No blank lines allowed after function docstring "D203", # 1 blank line required before class docstring "D206", # Checks for docstrings that are indented with tabs "D213", # Multi-line docstring summary should start at the second line "E501", # Checks for lines that exceed the specified maximum character length "ISC001", # Implicitly concatenated string literals on one line "PLR0912", # Maximum number of branches allowed for a function or method body "PLR0913", # Too many arguments to function call ({c_args} > {max_args}) "PLR0915", # Too many statements ({statements} > {max_statements}) "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable "W191", # Checks for indentation that uses tabs ] [tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false [tool.ruff.lint.isort] force-sort-within-sections = true known-first-party = ["pydeconz"] combine-as-imports = true [tool.ruff.lint.mccabe] max-complexity = 14