From e0a4ce050633a3a16c5f882d069d32874a7d8cdf Mon Sep 17 00:00:00 2001 From: Bartosz Sokorski Date: Thu, 6 Jun 2024 13:39:13 +0200 Subject: [PATCH] fix(check): don't raise error on pypi reference --- pyproject.toml | 3 +-- src/poetry/console/commands/check.py | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1b8b17483c1..afd83be6d0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,7 @@ extend-exclude = [ "tests/masonry/builders/fixtures/pep_561_stub_only*/*", "tests/utils/fixtures/setups/*", ] -fix = false +fix = true line-length = 88 target-version = "py39" @@ -121,7 +121,6 @@ extend-select = [ "TCH", # flake8-type-checking "TID", # flake8-tidy-imports "UP", # pyupgrade - "PTH" ] ignore = [ "B904", # use 'raise ... from err' diff --git a/src/poetry/console/commands/check.py b/src/poetry/console/commands/check.py index 71c5647999b..d6b6517d616 100644 --- a/src/poetry/console/commands/check.py +++ b/src/poetry/console/commands/check.py @@ -95,7 +95,6 @@ def _validate_readme(self, readme: str | list[str], poetry_file: Path) -> list[s def _validate_dependencies_source(self, config: dict[str, Any]) -> list[str]: """Check dependencies's source are valid""" sources = {repository.name for repository in self.poetry.pool.all_repositories} - print(sources) dependency_declarations: list[ dict[str, str | dict[str, str] | list[dict[str, str]]] @@ -119,8 +118,6 @@ def _validate_dependencies_source(self, config: dict[str, Any]) -> list[str]: elif isinstance(declaration, dict) and "source" in declaration: all_referenced_sources.add(declaration["source"]) - print(all_referenced_sources) - return [ f'Invalid source "{source}" referenced in dependencies.' for source in sorted(all_referenced_sources - sources)