From 369f2114738906584510b7d0c218af3bcb10f0a5 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 7 May 2023 07:11:41 +0100 Subject: [PATCH 1/5] tidy pyproject.toml --- pyproject.toml | 71 +++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1c3886dbdff..feb7e119af4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,7 @@ name = "poetry" version = "1.5.0.dev0" description = "Python dependency management and packaging made easy." -authors = [ - "Sébastien Eustace ", -] +authors = ["Sébastien Eustace "] maintainers = [ "Arun Babu Neelicattu ", "Bjorn Neergaard ", @@ -16,25 +14,20 @@ maintainers = [ ] license = "MIT" readme = "README.md" -packages = [ - { include = "poetry", from = "src" } -] -include = [ - { path = "tests", format = "sdist" } -] +packages = [{ include = "poetry", from = "src" }] +include = [{ path = "tests", format = "sdist" }] homepage = "https://python-poetry.org/" repository = "https://github.com/python-poetry/poetry" documentation = "https://python-poetry.org/docs" keywords = ["packaging", "dependency", "poetry"] classifiers = [ "Topic :: Software Development :: Build Tools", - "Topic :: Software Development :: Libraries :: Python Modules" + "Topic :: Software Development :: Libraries :: Python Modules", ] [tool.poetry.urls] Changelog = "https://python-poetry.org/history/" - # Requirements [tool.poetry.dependencies] python = "^3.7" @@ -88,10 +81,10 @@ zipp = { version = "^3.4", python = "<3.8" } [tool.poetry.group.typing.dependencies] mypy = ">=1.0" +typing-extensions = { version = "^4.0.0", python = "<3.8" } types-html5lib = ">=1.1.9" types-jsonschema = ">=4.9.0" types-requests = ">=2.28.8" -typing-extensions = { version = "^4.0.0", python = "<3.8" } # only used in github actions [tool.poetry.group.github-actions] @@ -99,7 +92,6 @@ optional = true [tool.poetry.group.github-actions.dependencies] pytest-github-actions-annotate-failures = "^0.1.7" - [tool.poetry.scripts] poetry = "poetry.console.application:main" @@ -112,28 +104,28 @@ build-backend = "poetry.core.masonry.api" [tool.ruff] fix = true unfixable = [ - "ERA", # do not autoremove commented out code + "ERA", # do not autoremove commented out code ] target-version = "py37" line-length = 88 extend-select = [ - "B", # flake8-bugbear + "B", # flake8-bugbear "C4", # flake8-comprehensions - "ERA", # flake8-eradicate/eradicate - "PIE", # flake8-pie - "SIM", # flake8-simplify - "TID", # flake8-tidy-imports - "TCH", # flake8-type-checking - "N", # pep8-naming - "RUF", # ruff checks + "ERA", # flake8-eradicate/eradicate + "I", # isort + "N", # pep8-naming + "PIE", # flake8-pie + "PGH", # pygrep + "RUF", # ruff checks + "SIM", # flake8-simplify + "TCH", # flake8-type-checking + "TID", # flake8-tidy-imports "UP", # pyupgrade - "I", # isort - "PGH", # pygrep ] ignore = [ - "B904", # use 'raise ... from err' - "B905", # use explicit 'strict=' parameter with 'zip()' - "N818" # Exception name should be named with an Error suffix + "B904", # use 'raise ... from err' + "B905", # use explicit 'strict=' parameter with 'zip()' + "N818", # Exception name should be named with an Error suffix ] extend-exclude = [ "docs/*", @@ -170,15 +162,11 @@ namespace_packages = true explicit_package_bases = true show_error_codes = true strict = true -enable_error_code = [ - "ignore-without-code", - "redundant-expr", - "truthy-bool", -] +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] exclude = [ - "tests/fixtures", - "tests/masonry/builders/fixtures", - "tests/utils/fixtures" + "tests/fixtures", + "tests/masonry/builders/fixtures", + "tests/utils/fixtures", ] # use of importlib-metadata backport makes it impossible to satisfy mypy @@ -189,9 +177,9 @@ module = [ 'poetry.plugins.plugin_manager', 'poetry.repositories.installed_repository', 'poetry.utils.env', + 'tests.console.commands.self.test_show_plugins', 'tests.helpers', 'tests.repositories.test_installed_repository', - 'tests.console.commands.self.test_show_plugins' ] warn_unused_ignores = false @@ -208,20 +196,15 @@ module = [ 'shellingham.*', 'virtualenv.*', 'xattr.*', - 'zipp.*' + 'zipp.*', ] ignore_missing_imports = true [tool.pytest.ini_options] addopts = "-n auto" -testpaths = [ - "tests" -] +testpaths = ["tests"] [tool.coverage.report] -exclude_lines = [ - "pragma: no cover", - "if TYPE_CHECKING:" -] +exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] From c29970c3195840cd2d7dd07837968292a98c2e44 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 7 May 2023 07:15:28 +0100 Subject: [PATCH 2/5] fixup --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index feb7e119af4..f3fcf4298ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,10 +81,10 @@ zipp = { version = "^3.4", python = "<3.8" } [tool.poetry.group.typing.dependencies] mypy = ">=1.0" -typing-extensions = { version = "^4.0.0", python = "<3.8" } types-html5lib = ">=1.1.9" types-jsonschema = ">=4.9.0" types-requests = ">=2.28.8" +typing-extensions = { version = "^4.0.0", python = "<3.8" } # only used in github actions [tool.poetry.group.github-actions] From dfa8577a1692e1a08376a728458103593b1e54e7 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 8 May 2023 10:30:40 +0100 Subject: [PATCH 3/5] fixup --- pyproject.toml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f3fcf4298ae..12cca2aa4db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,7 +144,9 @@ lines-between-types = 1 lines-after-imports = 2 known-first-party = ["poetry"] known-third-party = ["poetry.core"] -required-imports = ["from __future__ import annotations"] +required-imports = [ + "from __future__ import annotations" +] [tool.black] @@ -162,7 +164,11 @@ namespace_packages = true explicit_package_bases = true show_error_codes = true strict = true -enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] +enable_error_code = [ + "ignore-without-code", + "redundant-expr", + "truthy-bool" +] exclude = [ "tests/fixtures", "tests/masonry/builders/fixtures", @@ -207,4 +213,7 @@ testpaths = ["tests"] [tool.coverage.report] -exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] +exclude_lines = [ + "pragma: no cover", + "if TYPE_CHECKING:" +] From 4f45d908d50679be28c3ba0e9465d8d2862b05ae Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 8 May 2023 10:32:12 +0100 Subject: [PATCH 4/5] fixup --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 12cca2aa4db..7f96b6e8a93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,9 +144,7 @@ lines-between-types = 1 lines-after-imports = 2 known-first-party = ["poetry"] known-third-party = ["poetry.core"] -required-imports = [ - "from __future__ import annotations" -] +required-imports = ["from __future__ import annotations"] [tool.black] From a9fada5456fe6b017e712a58ff419c590fb6abdd Mon Sep 17 00:00:00 2001 From: Bartosz Sokorski Date: Mon, 8 May 2023 12:34:59 +0200 Subject: [PATCH 5/5] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f96b6e8a93..2af406fefc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,7 +165,7 @@ strict = true enable_error_code = [ "ignore-without-code", "redundant-expr", - "truthy-bool" + "truthy-bool", ] exclude = [ "tests/fixtures",