Skip to content

Commit

Permalink
Project tidying (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed May 2, 2024
1 parent 012eefd commit d4f75b8
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ homepage = "https://github.com/python-poetry/poetry-core"
repository = "https://github.com/python-poetry/poetry-core"
keywords = ["packaging", "dependency", "poetry"]
classifiers = [
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "poetry", from = "src" },
{ include = "poetry", from = "src" },
]
include = [
{ path = "tests", format = "sdist" },
{ path = "tests", format = "sdist" },
]

[tool.poetry.urls]
Expand Down Expand Up @@ -44,37 +44,40 @@ types-setuptools = ">=57.4.14"

[tool.ruff]
extend-exclude = [
"src/poetry/core/_vendor/*",
"tests/fixtures/*",
"tests/**/fixtures/*"
"src/poetry/core/_vendor/*",
"tests/**/fixtures/*",
]
fix = true
line-length = 88
src = ["src"]
target-version = "py38"

[tool.ruff.lint]
unfixable = [
"ERA", # do not autoremove commented out code
]
extend-select = [
"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
"UP", # pyupgrade
"I", # isort
"PGH", # pygrep
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"ERA", # flake8-eradicate/eradicate
"I", # isort
"N", # pep8-naming
"PIE", # flake8-pie
"PGH", # pygrep
"RUF", # ruff checks
"SIM", # flake8-simplify
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
]
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-safe-fixes = [
"TCH", # move import from and to TYPE_CHECKING blocks
]
unfixable = [
"ERA", # do not autoremove commented out code
]

[tool.ruff.lint.flake8-tidy-imports]
Expand All @@ -88,24 +91,23 @@ known-first-party = ["poetry.core"]
known-third-party = ["poetry.core._vendor"]
required-imports = ["from __future__ import annotations"]

[tool.black]
target-version = ['py38']
preview = true
extend-exclude = "src/poetry/core/_vendor/|tests/([^/]*/)*fixtures/"

[tool.mypy]
strict = true
explicit_package_bases = true
files = "src, tests"
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
show_error_codes = true
strict = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
exclude = [
"src/poetry/core/_vendor",
"tests/fixtures",
"tests/masonry/builders/fixtures",
]
mypy_path = "src"
files = "src, tests"
exclude = "(?x)(^tests/.*/fixtures | ^src/poetry/core/_vendor)"

[[tool.mypy.overrides]]
module = [
Expand All @@ -125,10 +127,10 @@ patches-dir = "vendors/patches"

[tool.vendoring.transformations]
drop = [
"bin/",
"*.so",
"typing.*",
"*/tests/"
"bin/",
"*.so",
"typing.*",
"*/tests/",
]

[build-system]
Expand Down

0 comments on commit d4f75b8

Please sign in to comment.