Commit ae03bdcd by pre-commit-ci[bot] Committed by GitHub

[pre-commit.ci] pre-commit autoupdate (#5952)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent bf81d095
......@@ -75,7 +75,7 @@ repos:
args: [--lines-after-imports, "-1"]
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.6.0
hooks:
- id: black
......
......@@ -309,7 +309,6 @@ environment variable. This has not been done automatically.
class Installer:
CURRENT_PYTHON = sys.executable
CURRENT_PYTHON_VERSION = sys.version_info[:2]
METADATA_URL = "https://pypi.org/pypi/poetry/json"
......
......@@ -105,7 +105,6 @@ _default_config: Config | None = None
class Config:
default_config: dict[str, Any] = {
"cache-dir": str(DEFAULT_CACHE_DIR),
"virtualenvs": {
......
......@@ -10,7 +10,6 @@ if TYPE_CHECKING:
class AboutCommand(Command):
name = "about"
description = "Shows information about Poetry."
......
......@@ -15,7 +15,6 @@ from poetry.utils.helpers import canonicalize_name
class AddCommand(InstallerCommand, InitCommand):
name = "add"
description = "Adds a new dependency to <comment>pyproject.toml</>."
......
......@@ -7,7 +7,6 @@ from poetry.utils.env import build_environment
class BuildCommand(EnvCommand):
name = "build"
description = "Builds a package, as a tarball and a wheel by default."
......
......@@ -10,7 +10,6 @@ from poetry.console.commands.command import Command
class CacheClearCommand(Command):
name = "cache clear"
description = "Clears Poetry's cache."
......
......@@ -5,7 +5,6 @@ from poetry.console.commands.command import Command
class CacheListCommand(Command):
name = "cache list"
description = "List Poetry's caches."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.command import Command
class CheckCommand(Command):
name = "check"
description = "Checks the validity of the <comment>pyproject.toml</comment> file."
......
......@@ -24,7 +24,6 @@ if TYPE_CHECKING:
class ConfigCommand(Command):
name = "config"
description = "Manages configuration settings."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.command import Command
class DebugInfoCommand(Command):
name = "debug info"
description = "Shows debug information."
......
......@@ -14,7 +14,6 @@ if TYPE_CHECKING:
class DebugResolveCommand(InitCommand):
name = "debug resolve"
description = "Debugs dependency resolution."
......
......@@ -12,7 +12,6 @@ if TYPE_CHECKING:
class EnvInfoCommand(Command):
name = "env info"
description = "Displays information about the current environment."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.command import Command
class EnvListCommand(Command):
name = "env list"
description = "Lists all virtualenvs associated with the current project."
......
......@@ -7,7 +7,6 @@ from poetry.console.commands.command import Command
class EnvRemoveCommand(Command):
name = "env remove"
description = "Remove virtual environments associated with the project."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.command import Command
class EnvUseCommand(Command):
name = "env use"
description = "Activates or creates a new virtualenv for the current project."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.installer_command import InstallerCommand
class InstallCommand(InstallerCommand):
name = "install"
description = "Installs the project dependencies."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.installer_command import InstallerCommand
class LockCommand(InstallerCommand):
name = "lock"
description = "Locks the project dependencies."
......
......@@ -11,7 +11,6 @@ from poetry.console.commands.command import Command
class NewCommand(Command):
name = "new"
description = "Creates a new Python project at <path>."
......
......@@ -10,7 +10,6 @@ from poetry.console.commands.self.add import SelfAddCommand
class PluginAddCommand(InitCommand):
name = "plugin add"
description = "Adds new plugins."
......
......@@ -15,7 +15,6 @@ if TYPE_CHECKING:
class PluginRemoveCommand(Command):
name = "plugin remove"
description = "Removes installed plugins"
......
......@@ -13,7 +13,6 @@ if TYPE_CHECKING:
class PluginShowCommand(Command):
name = "plugin show"
description = "Shows information about the currently installed plugins."
......
......@@ -8,7 +8,6 @@ from poetry.console.commands.command import Command
class PublishCommand(Command):
name = "publish"
description = "Publishes a package to a remote repository."
......
......@@ -12,7 +12,6 @@ from poetry.utils.helpers import canonicalize_name
class RemoveCommand(InstallerCommand):
name = "remove"
description = "Removes a package from the project dependencies."
......
......@@ -12,7 +12,6 @@ if TYPE_CHECKING:
class RunCommand(EnvCommand):
name = "run"
description = "Runs a command in the appropriate environment."
......
......@@ -6,7 +6,6 @@ from poetry.console.commands.command import Command
class SearchCommand(Command):
name = "search"
description = "Searches for packages on remote repositories."
......
......@@ -9,7 +9,6 @@ from poetry.console.commands.env_command import EnvCommand
class ShellCommand(EnvCommand):
name = "shell"
description = "Spawns a shell within the virtual environment."
......
......@@ -31,7 +31,6 @@ def reverse_deps(pkg: Package, repo: Repository) -> dict[str, str]:
class ShowCommand(GroupCommand):
name = "show"
description = "Shows information about packages."
......
......@@ -10,7 +10,6 @@ from poetry.console.commands.command import Command
class SourceAddCommand(Command):
name = "source add"
description = "Add source configuration for project."
......
......@@ -7,7 +7,6 @@ from poetry.console.commands.command import Command
class SourceRemoveCommand(Command):
name = "source remove"
description = "Remove source configured for the project."
......
......@@ -7,7 +7,6 @@ from poetry.console.commands.installer_command import InstallerCommand
class UpdateCommand(InstallerCommand):
name = "update"
description = (
"Update the dependencies as according to the <comment>pyproject.toml</> file."
......
......@@ -15,7 +15,6 @@ if TYPE_CHECKING:
class VersionCommand(Command):
name = "version"
description = (
"Shows the version of the project or bumps it when a valid "
......
......@@ -4,5 +4,4 @@ from cleo.exceptions import CleoSimpleException
class PoetrySimpleConsoleException(CleoSimpleException): # type: ignore[misc]
pass
......@@ -13,7 +13,6 @@ if TYPE_CHECKING:
class IOFormatter(logging.Formatter):
_colors = {
"error": "fg=red",
"warning": "fg=yellow",
......
......@@ -2,10 +2,8 @@ from __future__ import annotations
class PoetryException(Exception):
pass
class InvalidProjectFile(PoetryException):
pass
......@@ -15,7 +15,6 @@ SCHEMA_DIR = os.path.join(os.path.dirname(__file__), "schemas")
class ValidationError(ValueError):
pass
......
......@@ -14,17 +14,14 @@ class IncompatibilityCause(Exception):
class RootCause(IncompatibilityCause):
pass
class NoVersionsCause(IncompatibilityCause):
pass
class DependencyCause(IncompatibilityCause):
pass
......
......@@ -50,7 +50,6 @@ logger = logging.getLogger(__name__)
class Locker:
_VERSION = "1.1"
_legacy_keys = ["dependencies", "source", "extras", "dev-dependencies"]
......@@ -180,7 +179,6 @@ class Locker:
package.marker = parse_marker(split_dep[1].strip())
for dep_name, constraint in info.get("dependencies", {}).items():
root_dir = self._lock.path.parent
if package.source_type == "directory":
# root dir should be the source of the package relative to the lock
......
......@@ -21,7 +21,6 @@ if TYPE_CHECKING:
class Poetry(BasePoetry):
VERSION = __version__
def __init__(
......
......@@ -119,7 +119,6 @@ def _get_package_from_git(
class Provider:
UNSAFE_PACKAGES: set[str] = set()
def __init__(
......
......@@ -96,7 +96,6 @@ class Solver:
overrides: tuple[dict[DependencyPackage, dict[str, Dependency]], ...],
use_latest: list[str] | None = None,
) -> tuple[list[Package], list[int]]:
packages = []
depths = []
for override in overrides:
......
......@@ -2,10 +2,8 @@ from __future__ import annotations
class RepositoryError(Exception):
pass
class PackageNotFound(Exception):
pass
......@@ -456,7 +456,6 @@ class SitePackages:
class EnvError(Exception):
pass
......
......@@ -14,12 +14,10 @@ logger = logging.getLogger(__name__)
class PasswordManagerError(Exception):
pass
class PoetryKeyringError(Exception):
pass
......
......@@ -102,7 +102,6 @@ def entry_points(
entry_point_values_by_group: dict[str, list[str]],
plugin_distro: metadata.Distribution,
) -> Callable[[...], list[metadata.EntryPoint]]:
by_group = {
key: [
EntryPoint(name=entry_point_name, group=key, value=value)._for(
......
......@@ -114,7 +114,6 @@ def test_publish_dry_run_skip_existing(
def test_skip_existing_output(
app_tester: ApplicationTester, http: type[httpretty.httpretty]
):
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
......
......@@ -38,7 +38,6 @@ def _use_simple_keyring(with_simple_keyring: None) -> None:
class MockRepository(LegacyRepository):
FIXTURES = Path(__file__).parent / "fixtures" / "legacy"
def __init__(self) -> None:
......
......@@ -28,7 +28,6 @@ def _use_simple_keyring(with_simple_keyring: None) -> None:
class MockRepository(PyPiRepository):
JSON_FIXTURES = Path(__file__).parent / "fixtures" / "pypi.org" / "json"
DIST_FIXTURES = Path(__file__).parent / "fixtures" / "pypi.org" / "dists"
......
......@@ -11,7 +11,6 @@ from poetry.repositories.single_page_repository import SinglePageRepository
class MockSinglePageRepository(SinglePageRepository):
FIXTURES = Path(__file__).parent / "fixtures" / "single-page"
def __init__(self, page: str) -> None:
......
......@@ -112,7 +112,6 @@ def test_authenticator_uses_empty_strings_as_default_password(
http: type[httpretty.httpretty],
with_simple_keyring: None,
):
config.merge(
{
"repositories": repo,
......
......@@ -771,7 +771,6 @@ def test_run_with_input(tmp_dir: str, tmp_venv: VirtualEnv):
def test_run_with_input_non_zero_return(tmp_dir: str, tmp_venv: VirtualEnv):
with pytest.raises(EnvCommandError) as process_error:
# Test command that will return non-zero returncode.
tmp_venv.run("python", "-", input_=ERRORING_SCRIPT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment