From 8beb6d08bd5821cfe6734a78f32b5b2796b95730 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 22 Dec 2025 22:24:57 +0300 Subject: [PATCH 1/2] Return `[tool.poetry]` to `pyproject.toml` --- CHANGELOG.md | 1 + Makefile | 2 -- poetry.lock | 12 ++++++------ pyproject.toml | 16 ++++++++-------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57275bf48..76425fc8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ Semantic versioning in our case means: ### Misc - Improves docs: remove outdated AST online visualisation tool url +- Returns `[tool.poetry]` instead of `[project]` in `pyproject.toml` ## 1.4.0 diff --git a/Makefile b/Makefile index f4cd0851f..849d36516 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,6 @@ unit: .PHONY: package package: - # TODO: re-enable when poetry@2.0 support will be fixed - # poetry run poetry check poetry run pip check .PHONY: test diff --git a/poetry.lock b/poetry.lock index 1595c5c3d..06e0842bb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2424,18 +2424,18 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] [[package]] name = "syrupy" -version = "4.9.1" +version = "5.0.0" description = "Pytest Snapshot Test Utility" optional = false -python-versions = ">=3.8.1" +python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "syrupy-4.9.1-py3-none-any.whl", hash = "sha256:b94cc12ed0e5e75b448255430af642516842a2374a46936dd2650cfb6dd20eda"}, - {file = "syrupy-4.9.1.tar.gz", hash = "sha256:b7d0fcadad80a7d2f6c4c71917918e8ebe2483e8c703dfc8d49cdbb01081f9a4"}, + {file = "syrupy-5.0.0-py3-none-any.whl", hash = "sha256:c848e1a980ca52a28715cd2d2b4d434db424699c05653bd1158fb31cf56e9546"}, + {file = "syrupy-5.0.0.tar.gz", hash = "sha256:3282fe963fa5d4d3e47231b16d1d4d0f4523705e8199eeb99a22a1bc9f5942f2"}, ] [package.dependencies] -pytest = ">=7.0.0,<9.0.0" +pytest = ">=8.0.0" [[package]] name = "tokenize-rt" @@ -2589,4 +2589,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "fa7168f36ee6939f786bbe240718aa7481bace557f2e46219d8ef0660f21a599" +content-hash = "f46a23cbfaa672cfb49f04b28f6777200146361587b83348e6d08e2ffc513afa" diff --git a/pyproject.toml b/pyproject.toml index 5bebd2896..0338f55e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,15 +2,15 @@ build-backend = "poetry.core.masonry.api" requires = [ "poetry-core>=2.2" ] -[project] +[tool.poetry] name = "wemake-python-styleguide" version = "1.4.0" description = "The strictest and most opinionated python linter ever" - -license = {text = "MIT"} +license = "MIT" +requires-poetry = ">=2.2" authors = [ - {name = "Nikita Sobolev", email = "mail@sobolevn.me"} + "Nikita Sobolev ", ] readme = "README.md" @@ -37,7 +37,7 @@ classifiers = [ "Typing :: Typed", ] -[project.urls] +[tool.poetry.urls] Homepage = "https://wemake-python-styleguide.rtfd.io" Repository = "https://github.com/wemake-services/wemake-python-styleguide" Funding = "https://opencollective.com/wemake-python-styleguide" @@ -61,11 +61,11 @@ pytest-cov = "^7.0" pytest-randomly = "^4.0" pytest-xdist = "^3.8" covdefaults = "^2.3" -syrupy = "^4.6" +syrupy = "^5.0" hypothesis = "^6.135" hypothesmith = "^0.3" -mypy = "^1.18" +mypy = "^1.19" types-flake8 = "^7.3" import-linter = "^2.0" @@ -73,7 +73,7 @@ import-linter = "^2.0" astpath = "^0.9" lxml = "^6.0" nbqa = "^1.2" -ruff = ">=0.14" +ruff = "^0.14" black = "^25.1" [tool.poetry.group.docs] From f715430b46b2f6f833dee5040d9ceff92d99290a Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 22 Dec 2025 22:29:04 +0300 Subject: [PATCH 2/2] Remove black --- .github/workflows/test.yml | 6 --- docs/conf.py | 2 +- poetry.lock | 87 +------------------------------------- pyproject.toml | 12 ------ 4 files changed, 2 insertions(+), 105 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b17bd298..b2c8f606d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,12 +42,6 @@ jobs: poetry install - name: Run tests run: make test - - name: Check black - run: | - # We ensure that WPS does not report - # any issues after `black` is applied. - poetry run black . - poetry run flake8 . - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: diff --git a/docs/conf.py b/docs/conf.py index c9f770c01..8dadb9a13 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,7 @@ def _get_project_meta(): with pathlib.Path('../pyproject.toml').open(mode='rb') as pyproject: - return tomli.load(pyproject)['project'] + return tomli.load(pyproject)['tool']['poetry'] pkg_meta = _get_project_meta() diff --git a/poetry.lock b/poetry.lock index 06e0842bb..44be1af6a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -133,59 +133,6 @@ charset-normalizer = ["charset-normalizer"] html5lib = ["html5lib"] lxml = ["lxml"] -[[package]] -name = "black" -version = "25.12.0" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.10" -groups = ["dev"] -files = [ - {file = "black-25.12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f85ba1ad15d446756b4ab5f3044731bf68b777f8f9ac9cdabd2425b97cd9c4e8"}, - {file = "black-25.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:546eecfe9a3a6b46f9d69d8a642585a6eaf348bcbbc4d87a19635570e02d9f4a"}, - {file = "black-25.12.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:17dcc893da8d73d8f74a596f64b7c98ef5239c2cd2b053c0f25912c4494bf9ea"}, - {file = "black-25.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:09524b0e6af8ba7a3ffabdfc7a9922fb9adef60fed008c7cd2fc01f3048e6e6f"}, - {file = "black-25.12.0-cp310-cp310-win_arm64.whl", hash = "sha256:b162653ed89eb942758efeb29d5e333ca5bb90e5130216f8369857db5955a7da"}, - {file = "black-25.12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d0cfa263e85caea2cff57d8f917f9f51adae8e20b610e2b23de35b5b11ce691a"}, - {file = "black-25.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1a2f578ae20c19c50a382286ba78bfbeafdf788579b053d8e4980afb079ab9be"}, - {file = "black-25.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d3e1b65634b0e471d07ff86ec338819e2ef860689859ef4501ab7ac290431f9b"}, - {file = "black-25.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:a3fa71e3b8dd9f7c6ac4d818345237dfb4175ed3bf37cd5a581dbc4c034f1ec5"}, - {file = "black-25.12.0-cp311-cp311-win_arm64.whl", hash = "sha256:51e267458f7e650afed8445dc7edb3187143003d52a1b710c7321aef22aa9655"}, - {file = "black-25.12.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:31f96b7c98c1ddaeb07dc0f56c652e25bdedaac76d5b68a059d998b57c55594a"}, - {file = "black-25.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:05dd459a19e218078a1f98178c13f861fe6a9a5f88fc969ca4d9b49eb1809783"}, - {file = "black-25.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c1f68c5eff61f226934be6b5b80296cf6939e5d2f0c2f7d543ea08b204bfaf59"}, - {file = "black-25.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:274f940c147ddab4442d316b27f9e332ca586d39c85ecf59ebdea82cc9ee8892"}, - {file = "black-25.12.0-cp312-cp312-win_arm64.whl", hash = "sha256:169506ba91ef21e2e0591563deda7f00030cb466e747c4b09cb0a9dae5db2f43"}, - {file = "black-25.12.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a05ddeb656534c3e27a05a29196c962877c83fa5503db89e68857d1161ad08a5"}, - {file = "black-25.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9ec77439ef3e34896995503865a85732c94396edcc739f302c5673a2315e1e7f"}, - {file = "black-25.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e509c858adf63aa61d908061b52e580c40eae0dfa72415fa47ac01b12e29baf"}, - {file = "black-25.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:252678f07f5bac4ff0d0e9b261fbb029fa530cfa206d0a636a34ab445ef8ca9d"}, - {file = "black-25.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:bc5b1c09fe3c931ddd20ee548511c64ebf964ada7e6f0763d443947fd1c603ce"}, - {file = "black-25.12.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:0a0953b134f9335c2434864a643c842c44fba562155c738a2a37a4d61f00cad5"}, - {file = "black-25.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2355bbb6c3b76062870942d8cc450d4f8ac71f9c93c40122762c8784df49543f"}, - {file = "black-25.12.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9678bd991cc793e81d19aeeae57966ee02909877cb65838ccffef24c3ebac08f"}, - {file = "black-25.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:97596189949a8aad13ad12fcbb4ae89330039b96ad6742e6f6b45e75ad5cfd83"}, - {file = "black-25.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:778285d9ea197f34704e3791ea9404cd6d07595745907dd2ce3da7a13627b29b"}, - {file = "black-25.12.0-py3-none-any.whl", hash = "sha256:48ceb36c16dbc84062740049eef990bb2ce07598272e673c17d1a7720c71c828"}, - {file = "black-25.12.0.tar.gz", hash = "sha256:8d3dd9cea14bff7ddc0eb243c811cdb1a011ebb4800a5f0335a01a68654796a7"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -pytokens = ">=0.3.0" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.10)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "certifi" version = "2025.11.12" @@ -1689,23 +1636,6 @@ files = [ [package.dependencies] ptyprocess = ">=0.5" -[[package]] -name = "platformdirs" -version = "4.5.1" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -optional = false -python-versions = ">=3.10" -groups = ["dev"] -files = [ - {file = "platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31"}, - {file = "platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda"}, -] - -[package.extras] -docs = ["furo (>=2025.9.25)", "proselint (>=0.14)", "sphinx (>=8.2.3)", "sphinx-autodoc-typehints (>=3.2)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.4.2)", "pytest-cov (>=7)", "pytest-mock (>=3.15.1)"] -type = ["mypy (>=1.18.2)"] - [[package]] name = "pluggy" version = "1.6.0" @@ -1884,21 +1814,6 @@ psutil = ["psutil (>=3.0)"] setproctitle = ["setproctitle"] testing = ["filelock"] -[[package]] -name = "pytokens" -version = "0.3.0" -description = "A Fast, spec compliant Python 3.14+ tokenizer that runs on older Pythons." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "pytokens-0.3.0-py3-none-any.whl", hash = "sha256:95b2b5eaf832e469d141a378872480ede3f251a5a5041b8ec6e581d3ac71bbf3"}, - {file = "pytokens-0.3.0.tar.gz", hash = "sha256:2f932b14ed08de5fcf0b391ace2642f858f1394c0857202959000b68ed7a458a"}, -] - -[package.extras] -dev = ["black", "build", "mypy", "pytest", "pytest-cov", "setuptools", "tox", "twine", "wheel"] - [[package]] name = "pyyaml" version = "6.0.3" @@ -2589,4 +2504,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "f46a23cbfaa672cfb49f04b28f6777200146361587b83348e6d08e2ffc513afa" +content-hash = "a4e5f3fb35b58b05ab4748b50e8063e4c937f184380b8ad41939f7ab18c159c7" diff --git a/pyproject.toml b/pyproject.toml index 0338f55e2..26ecaf122 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,6 @@ astpath = "^0.9" lxml = "^6.0" nbqa = "^1.2" ruff = "^0.14" -black = "^25.1" [tool.poetry.group.docs] optional = true @@ -88,17 +87,6 @@ added-value = "^0.24" tomli = "^2.0" myst-parser = "^4.0" -[tool.black] -line-length = 80 -preview = true -skip-string-normalization = true # we use ' -target-version = [ 'py310' ] -# Exclude intentionally bad files: -extend-exclude = ''' -( - tests/.*/__snapshots__/.* | tests/fixtures/.* -) -''' [tool.ruff] # Ruff config: https://docs.astral.sh/ruff/settings