From: Jozef Kruszynski <60214390+jozefKruszynski@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:56:55 +0000 (+0100) Subject: Fixing pyproject.toml (#957) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=3a9cc0db04a344a3bbc81a39f49c5022589eaac2;p=music-assistant-server.git Fixing pyproject.toml (#957) Co-authored-by: Jozef Kruszynski --- diff --git a/pyproject.toml b/pyproject.toml index 0f12d6d8..e0f684fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,31 +1,70 @@ [build-system] -requires = [ "setuptools~=62.3", "wheel~=0.37.1",] +requires = ["setuptools~=62.3", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" [project] name = "music_assistant" +# The version is set by GH action on release version = "0.0.0" +license = {text = "Apache-2.0"} description = "Music Assistant" readme = "README.md" requires-python = ">=3.11" -classifiers = [ "Environment :: Console", "Programming Language :: Python :: 3.11",] -dependencies = [ "aiohttp", "orjson", "mashumaro",] -[[project.authors]] -name = "The Music Assistant Authors" -email = "marcelveldt@users.noreply.github.com" - -[project.license] -text = "Apache-2.0" +authors = [ + {name = "The Music Assistant Authors", email = "marcelveldt@users.noreply.github.com"} +] +classifiers = [ + "Environment :: Console", + "Programming Language :: Python :: 3.11", +] +dependencies = [ + "aiohttp", + "orjson", + "mashumaro" +] [project.optional-dependencies] -server = [ "faust-cchardet>=2.1.18", "aiodns>=3.0.0", "Brotli>=1.0.9", "aiohttp==3.9.0", "asyncio-throttle==1.0.2", "aiofiles==23.2.1", "aiorun==2023.7.2", "colorlog==6.8.0", "aiosqlite==0.19.0", "python-slugify==8.0.1", "mashumaro==3.11", "memory-tempfile==2.2.3", "music-assistant-frontend==2.0.16", "pillow==10.1.0", "unidecode==1.3.7", "xmltodict==0.13.0", "orjson==3.9.10", "shortuuid==1.0.11", "zeroconf==0.128.0", "cryptography==41.0.6", "ifaddr==0.2.0", "uvloop==0.19.0",] -test = [ "black==23.7.0", "codespell==2.2.6", "mypy==1.7.1", "ruff==0.1.6", "pytest==7.4.3", "pytest-asyncio==0.23.2", "pytest-aiohttp==1.0.5", "pytest-cov==4.1.0", "pre-commit==3.5.0",] +server = [ + "faust-cchardet>=2.1.18", + "aiodns>=3.0.0", + "Brotli>=1.0.9", + "aiohttp==3.9.0", + "asyncio-throttle==1.0.2", + "aiofiles==23.2.1", + "aiorun==2023.7.2", + "colorlog==6.8.0", + "aiosqlite==0.19.0", + "python-slugify==8.0.1", + "mashumaro==3.11", + "memory-tempfile==2.2.3", + "music-assistant-frontend==2.0.16", + "pillow==10.1.0", + "unidecode==1.3.7", + "xmltodict==0.13.0", + "orjson==3.9.10", + "shortuuid==1.0.11", + "zeroconf==0.128.0", + "cryptography==41.0.6", + "ifaddr==0.2.0", + "uvloop==0.19.0" +] +test = [ + "black==23.7.0", + "codespell==2.2.6", + "mypy==1.7.1", + "ruff==0.1.6", + "pytest==7.4.3", + "pytest-asyncio==0.23.2", + "pytest-aiohttp==1.0.5", + "pytest-cov==4.1.0", + "pre-commit==3.5.0" +] [project.scripts] mass = "music_assistant.__main__:main" [tool.black] -target-version = [ "py311",] +target-version = ['py311'] line-length = 100 [tool.codespell] @@ -34,6 +73,7 @@ ignore-words-list = "provid,hass,followings" [tool.mypy] python_version = "3.11" check_untyped_defs = true +#disallow_any_generics = true disallow_incomplete_defs = true disallow_untyped_calls = false disallow_untyped_defs = true @@ -46,45 +86,54 @@ warn_return_any = true warn_unreachable = true warn_unused_configs = true warn_unused_ignores = true + [[tool.mypy.overrides]] ignore_missing_imports = true -module = [ "aiorun",] +module = [ + "aiorun", +] + +[tool.pytest.ini_options] +asyncio_mode = "auto" +pythonpath = [ + "." +] [tool.setuptools] -platforms = [ "any",] -zip-safe = false -packages = [ "music_assistant",] +platforms = ["any"] +zip-safe = false +packages = ["music_assistant"] include-package-data = true +[tool.setuptools.package-data] +music_assistant = ["py.typed"] + [tool.ruff] fix = true show-fixes = true -select = [ "E", "F", "W", "I", "N", "D", "UP", "PL", "Q", "SIM", "TID", "ARG",] -ignore = [ "PLR2004", "N818",] -extend-exclude = [ "app_vars.py",] -unfixable = [ "F841",] + +# enable later: "C90", "PTH", "TCH", "RET", "ANN" +select = ["E", "F", "W", "I", "N", "D", "UP", "PL", "Q", "SIM", "TID", "ARG"] +ignore = ["PLR2004", "N818"] +extend-exclude = ["app_vars.py"] +unfixable = ["F841"] line-length = 100 target-version = "py311" -[tool.pytest.ini_options] -asyncio_mode = "auto" -pythonpath = [ ".",] - -[tool.setuptools.package-data] -music_assistant = [ "py.typed",] - [tool.ruff.flake8-annotations] allow-star-arg-any = true suppress-dummy-args = true [tool.ruff.flake8-builtins] -builtins-ignorelist = [ "id",] +builtins-ignorelist = ["id"] [tool.ruff.pydocstyle] +# Use Google-style docstrings. convention = "pep257" [tool.ruff.pylint] -max-branches = 25 -max-returns = 15 -max-args = 10 -max-statements = 50 + +max-branches=25 +max-returns=15 +max-args=10 +max-statements=50