repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/toml/file.py | src/poetry/toml/file.py | from __future__ import annotations
from typing import TYPE_CHECKING
from tomlkit.toml_file import TOMLFile as BaseTOMLFile
if TYPE_CHECKING:
from pathlib import Path
from tomlkit.toml_document import TOMLDocument
class TOMLFile(BaseTOMLFile):
def __init__(self, path: Path) -> None:
super().__... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/toml/exceptions.py | src/poetry/toml/exceptions.py | from __future__ import annotations
from poetry.core.exceptions import PoetryCoreError
from tomlkit.exceptions import TOMLKitError
class TOMLError(TOMLKitError, PoetryCoreError):
pass
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/toml/__init__.py | src/poetry/toml/__init__.py | from __future__ import annotations
from poetry.toml.exceptions import TOMLError
from poetry.toml.file import TOMLFile
__all__ = ["TOMLError", "TOMLFile"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/plugins/base_plugin.py | src/poetry/plugins/base_plugin.py | from __future__ import annotations
from abc import ABC
from abc import abstractmethod
class BasePlugin(ABC):
"""
Base class for all plugin types
The `activate()` method must be implemented and receives the Poetry instance.
"""
PLUGIN_API_VERSION = "1.0.0"
@property
@abstractmethod
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/plugins/application_plugin.py | src/poetry/plugins/application_plugin.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.plugins.base_plugin import BasePlugin
if TYPE_CHECKING:
from poetry.console.application import Application
from poetry.console.commands.command import Command
class ApplicationPlugin(BasePlugin):
"""
Base class for app... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/plugins/plugin.py | src/poetry/plugins/plugin.py | from __future__ import annotations
from abc import abstractmethod
from typing import TYPE_CHECKING
from poetry.plugins.base_plugin import BasePlugin
if TYPE_CHECKING:
from cleo.io.io import IO
from poetry.poetry import Poetry
class Plugin(BasePlugin):
"""
Generic plugin not related to the console... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/plugins/__init__.py | src/poetry/plugins/__init__.py | from __future__ import annotations
from poetry.plugins.application_plugin import ApplicationPlugin
from poetry.plugins.plugin import Plugin
__all__ = ["ApplicationPlugin", "Plugin"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/plugins/plugin_manager.py | src/poetry/plugins/plugin_manager.py | from __future__ import annotations
import hashlib
import json
import logging
import shutil
import sys
from functools import cached_property
from importlib import metadata
from pathlib import Path
from site import addsitedir
from typing import TYPE_CHECKING
import tomlkit
from poetry.core.packages.project_package im... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/wheel_installer.py | src/poetry/installation/wheel_installer.py | from __future__ import annotations
import logging
import platform
import sys
from pathlib import Path
from typing import TYPE_CHECKING
from installer import install
from installer.destinations import SchemeDictionaryDestination
from installer.sources import WheelFile
from installer.sources import _WheelFileValidatio... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/chooser.py | src/poetry/installation/chooser.py | from __future__ import annotations
import logging
import re
from typing import TYPE_CHECKING
from typing import Any
from poetry.config.config import Config
from poetry.config.config import PackageFilterPolicy
from poetry.console.exceptions import ConsoleMessage
from poetry.console.exceptions import PoetryRuntimeErro... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/executor.py | src/poetry/installation/executor.py | from __future__ import annotations
import csv
import functools
import itertools
import json
import threading
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from concurrent.futures import wait
from pathlib import Path
from subprocess import CalledProcessError
from typing import T... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | true |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/__init__.py | src/poetry/installation/__init__.py | from __future__ import annotations
from poetry.installation.installer import Installer
__all__ = ["Installer"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/installer.py | src/poetry/installation/installer.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import cast
from cleo.io.null_io import NullIO
from packaging.utils import canonicalize_name
from poetry.installation.executor import Executor
from poetry.puzzle.transaction import Transaction
from poetry.repositories import Repository
f... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/chef.py | src/poetry/installation/chef.py | from __future__ import annotations
import tempfile
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING
from poetry.utils.helpers import extractall
from poetry.utils.isolated_build import isolated_builder
if TYPE_CHECKING:
from collections.abc import Mapping
fro... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/operations/uninstall.py | src/poetry/installation/operations/uninstall.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.installation.operations.operation import Operation
if TYPE_CHECKING:
from poetry.core.packages.package import Package
class Uninstall(Operation):
def __init__(
self,
package: Package,
reason: str | None... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/operations/update.py | src/poetry/installation/operations/update.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.installation.operations.operation import Operation
if TYPE_CHECKING:
from poetry.core.packages.package import Package
class Update(Operation):
def __init__(
self,
initial: Package,
target: Package,
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/operations/__init__.py | src/poetry/installation/operations/__init__.py | from __future__ import annotations
from poetry.installation.operations.install import Install
from poetry.installation.operations.uninstall import Uninstall
from poetry.installation.operations.update import Update
__all__ = ["Install", "Uninstall", "Update"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/operations/install.py | src/poetry/installation/operations/install.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.installation.operations.operation import Operation
if TYPE_CHECKING:
from poetry.core.packages.package import Package
class Install(Operation):
def __init__(
self, package: Package, reason: str | None = None, priority:... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/installation/operations/operation.py | src/poetry/installation/operations/operation.py | from __future__ import annotations
from abc import ABC
from abc import abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.core.packages.package import Package
from typing_extensions import Self
class Operation(ABC):
def __init__(self, reason: str | None = None, priority: floa... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/puzzle/exceptions.py | src/poetry/puzzle/exceptions.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
from poetry.mixology.failure import SolveFailureError
class SolverProblemError(Exception):
def __init__(self... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/puzzle/transaction.py | src/poetry/puzzle/transaction.py | from __future__ import annotations
from collections import defaultdict
from typing import TYPE_CHECKING
from typing import Any
from poetry.utils.extras import get_extra_package_names
if TYPE_CHECKING:
from collections.abc import Mapping
from packaging.utils import NormalizedName
from poetry.core.packag... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/puzzle/solver.py | src/poetry/puzzle/solver.py | from __future__ import annotations
import functools
import time
from collections import defaultdict
from contextlib import contextmanager
from typing import TYPE_CHECKING
from poetry.core.version.markers import AnyMarker
from poetry.core.version.markers import EmptyMarker
from poetry.core.version.markers import Mult... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/puzzle/__init__.py | src/poetry/puzzle/__init__.py | from __future__ import annotations
from poetry.puzzle.solver import Solver
__all__ = ["Solver"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/puzzle/provider.py | src/poetry/puzzle/provider.py | from __future__ import annotations
import functools
import itertools
import logging
import re
import time
from collections import defaultdict
from contextlib import contextmanager
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import cast
from cleo.ui.progress_indicat... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | true |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/failure.py | src/poetry/mixology/failure.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.core.constraints.version import parse_constraint
from poetry.mixology.incompatibility_cause import ConflictCauseError
from poetry.mixology.incompatibility_cause import PythonCauseError
if TYPE_CHECKING:
from poetry.mixology.incompa... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/version_solver.py | src/poetry/mixology/version_solver.py | from __future__ import annotations
import collections
import functools
import time
from enum import IntEnum
from typing import TYPE_CHECKING
from poetry.core.packages.dependency import Dependency
from poetry.mixology.failure import SolveFailureError
from poetry.mixology.incompatibility import Incompatibility
from p... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/result.py | src/poetry/mixology/result.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.core.packages.package import Package
from poetry.core.packages.project_package import ProjectPackage
class SolverResult:
def __init__(
self,
root: ProjectPackage,
packages: list[Pac... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/incompatibility_cause.py | src/poetry/mixology/incompatibility_cause.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.mixology.incompatibility import Incompatibility
class IncompatibilityCauseError(Exception):
"""
The reason and Incompatibility's terms are incompatible.
"""
class RootCauseError(IncompatibilityCauseE... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/partial_solution.py | src/poetry/mixology/partial_solution.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.mixology.assignment import Assignment
from poetry.mixology.set_relation import SetRelation
if TYPE_CHECKING:
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
from poetr... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/assignment.py | src/poetry/mixology/assignment.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.mixology.term import Term
if TYPE_CHECKING:
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
from poetry.mixology.incompatibility import Incompatibility
class Assignm... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/set_relation.py | src/poetry/mixology/set_relation.py | from __future__ import annotations
class SetRelation:
"""
An enum of possible relationships between two sets.
"""
SUBSET = "subset"
DISJOINT = "disjoint"
OVERLAPPING = "overlapping"
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/__init__.py | src/poetry/mixology/__init__.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.mixology.version_solver import VersionSolver
if TYPE_CHECKING:
from poetry.core.packages.project_package import ProjectPackage
from poetry.mixology.result import SolverResult
from poetry.puzzle.provider import Provider
de... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/incompatibility.py | src/poetry/mixology/incompatibility.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.mixology.incompatibility_cause import ConflictCauseError
from poetry.mixology.incompatibility_cause import DependencyCauseError
from poetry.mixology.incompatibility_cause import NoVersionsCauseError
from poetry.mixology.incompatibility_ca... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/mixology/term.py | src/poetry/mixology/term.py | from __future__ import annotations
import functools
from typing import TYPE_CHECKING
from poetry.mixology.set_relation import SetRelation
if TYPE_CHECKING:
from poetry.core.constraints.version import VersionConstraint
from poetry.core.packages.dependency import Dependency
class Term:
"""
A statem... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/publishing/publisher.py | src/poetry/publishing/publisher.py | from __future__ import annotations
import logging
from typing import TYPE_CHECKING
from poetry.publishing.uploader import Uploader
from poetry.utils.authenticator import Authenticator
if TYPE_CHECKING:
from pathlib import Path
from cleo.io.io import IO
from poetry.poetry import Poetry
logger = loggi... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/publishing/uploader.py | src/poetry/publishing/uploader.py | from __future__ import annotations
import itertools
import tarfile
import zipfile
from collections import defaultdict
from functools import cached_property
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import Literal
import requests
from packaging.metadata import RawMe... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/publishing/hash_manager.py | src/poetry/publishing/hash_manager.py | from __future__ import annotations
import hashlib
import io
from contextlib import suppress
from typing import TYPE_CHECKING
from typing import NamedTuple
if TYPE_CHECKING:
from pathlib import Path
class Hexdigest(NamedTuple):
md5: str | None
sha256: str | None
blake2_256: str | None
class HashM... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/publishing/__init__.py | src/poetry/publishing/__init__.py | from __future__ import annotations
from poetry.publishing.publisher import Publisher
__all__ = ["Publisher"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/layouts/__init__.py | src/poetry/layouts/__init__.py | from __future__ import annotations
from poetry.layouts.layout import Layout
from poetry.layouts.src import SrcLayout
_LAYOUTS = {"src": SrcLayout, "standard": Layout}
def layout(name: str) -> type[Layout]:
if name not in _LAYOUTS:
raise ValueError("Invalid layout")
return _LAYOUTS[name]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/layouts/src.py | src/poetry/layouts/src.py | from __future__ import annotations
from pathlib import Path
from poetry.layouts.layout import Layout
class SrcLayout(Layout):
@property
def basedir(self) -> Path:
return Path("src")
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/layouts/layout.py | src/poetry/layouts/layout.py | from __future__ import annotations
import importlib.metadata
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from packaging.utils import canonicalize_name
from poetry.core.constraints.version import Version
from poetry.core.utils.helpers import module_name
from poetry.core.utils.patt... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/inspection/__init__.py | src/poetry/inspection/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/inspection/lazy_wheel.py | src/poetry/inspection/lazy_wheel.py | """Lazy ZIP over HTTP"""
from __future__ import annotations
import io
import logging
import re
from bisect import bisect_left
from bisect import bisect_right
from contextlib import contextmanager
from tempfile import NamedTemporaryFile
from typing import IO
from typing import TYPE_CHECKING
from typing import Any
fro... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/inspection/info.py | src/poetry/inspection/info.py | from __future__ import annotations
import contextlib
import functools
import glob
import logging
import tempfile
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING
from typing import Any
import pkginfo
from poetry.core.constraints.version import Version
from poetry.cor... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/pyproject/toml.py | src/poetry/pyproject/toml.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.core.pyproject.toml import PyProjectTOML as BasePyProjectTOML
from tomlkit.api import table
from tomlkit.items import Table
from tomlkit.toml_document import TOMLDocument
from poetry.toml import TOMLFile
if TYPE_CHECKING:
from path... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/pyproject/__init__.py | src/poetry/pyproject/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/config/dict_config_source.py | src/poetry/config/dict_config_source.py | from __future__ import annotations
from typing import Any
from poetry.config.config_source import ConfigSource
from poetry.config.config_source import PropertyNotFoundError
class DictConfigSource(ConfigSource):
def __init__(self) -> None:
self._config: dict[str, Any] = {}
@property
def config(s... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/config/file_config_source.py | src/poetry/config/file_config_source.py | from __future__ import annotations
from contextlib import contextmanager
from typing import TYPE_CHECKING
from typing import Any
from tomlkit import document
from tomlkit import table
from poetry.config.config_source import ConfigSource
from poetry.config.config_source import PropertyNotFoundError
from poetry.config... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/config/config.py | src/poetry/config/config.py | from __future__ import annotations
import dataclasses
import json
import logging
import os
import re
from copy import deepcopy
from json import JSONDecodeError
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from packaging.utils import NormalizedName
from ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/config/config_source.py | src/poetry/config/config_source.py | from __future__ import annotations
import dataclasses
import json
from abc import ABC
from abc import abstractmethod
from typing import TYPE_CHECKING
from typing import Any
from cleo.io.null_io import NullIO
if TYPE_CHECKING:
from cleo.io.io import IO
UNSET = object()
class PropertyNotFoundError(ValueError... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/config/__init__.py | src/poetry/config/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/config/source.py | src/poetry/config/source.py | from __future__ import annotations
import dataclasses
from typing import TYPE_CHECKING
from poetry.repositories.repository_pool import Priority
if TYPE_CHECKING:
from tomlkit.items import Table
@dataclasses.dataclass(order=True, eq=True)
class Source:
name: str
url: str = ""
priority: Priority = ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/single_page_repository.py | src/poetry/repositories/single_page_repository.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.repositories.exceptions import PackageNotFoundError
from poetry.repositories.legacy_repository import LegacyRepository
from poetry.repositories.link_sources.html import HTMLPage
if TYPE_CHECKING:
from packaging.utils import Normaliz... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/http_repository.py | src/poetry/repositories/http_repository.py | from __future__ import annotations
import functools
import hashlib
from contextlib import contextmanager
from contextlib import suppress
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING
from typing import Any
import requests
import requests.adapters
from packaging.me... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/legacy_repository.py | src/poetry/repositories/legacy_repository.py | from __future__ import annotations
from contextlib import suppress
from functools import cached_property
from typing import TYPE_CHECKING
from typing import Any
import requests.adapters
from poetry.core.packages.package import Package
from poetry.inspection.info import PackageInfo
from poetry.repositories.exception... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/lockfile_repository.py | src/poetry/repositories/lockfile_repository.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.repositories import Repository
if TYPE_CHECKING:
from poetry.core.packages.package import Package
class LockfileRepository(Repository):
"""
Special repository that distinguishes packages not only by name and version,
b... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/exceptions.py | src/poetry/repositories/exceptions.py | from __future__ import annotations
class RepositoryError(Exception):
pass
class PackageNotFoundError(Exception):
pass
class InvalidSourceError(Exception):
pass
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/pypi_repository.py | src/poetry/repositories/pypi_repository.py | from __future__ import annotations
import contextlib
import logging
from typing import TYPE_CHECKING
from typing import Any
import requests
import requests.adapters
from cachecontrol.controller import logger as cache_control_logger
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.pac... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/__init__.py | src/poetry/repositories/__init__.py | from __future__ import annotations
from poetry.repositories.repository import Repository
from poetry.repositories.repository_pool import RepositoryPool
__all__ = ["Repository", "RepositoryPool"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/installed_repository.py | src/poetry/repositories/installed_repository.py | from __future__ import annotations
import itertools
import json
import logging
from importlib import metadata
from pathlib import Path
from typing import TYPE_CHECKING
from packaging.utils import canonicalize_name
from poetry.core.packages.package import Package
from poetry.core.packages.utils.utils import is_python... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/cached_repository.py | src/poetry/repositories/cached_repository.py | from __future__ import annotations
from abc import ABC
from abc import abstractmethod
from typing import TYPE_CHECKING
from typing import Any
from packaging.utils import canonicalize_name
from poetry.core.constraints.version import parse_constraint
from poetry.config.config import Config
from poetry.repositories.rep... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/repository_pool.py | src/poetry/repositories/repository_pool.py | from __future__ import annotations
import enum
from collections import OrderedDict
from dataclasses import dataclass
from enum import IntEnum
from typing import TYPE_CHECKING
from poetry.config.config import Config
from poetry.repositories.abstract_repository import AbstractRepository
from poetry.repositories.cached... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/abstract_repository.py | src/poetry/repositories/abstract_repository.py | from __future__ import annotations
from abc import ABC
from abc import abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.core.constraints.version import Version
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
class Abst... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/repository.py | src/poetry/repositories/repository.py | from __future__ import annotations
import logging
from typing import TYPE_CHECKING
from packaging.utils import canonicalize_name
from poetry.core.constraints.version import Version
from poetry.repositories.abstract_repository import AbstractRepository
from poetry.repositories.exceptions import PackageNotFoundError
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/link_sources/html.py | src/poetry/repositories/link_sources/html.py | from __future__ import annotations
import urllib.parse
from collections import defaultdict
from functools import cached_property
from html import unescape
from typing import TYPE_CHECKING
from poetry.core.packages.utils.link import Link
from poetry.repositories.link_sources.base import LinkSource
from poetry.reposi... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/link_sources/__init__.py | src/poetry/repositories/link_sources/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/link_sources/json.py | src/poetry/repositories/link_sources/json.py | from __future__ import annotations
import urllib.parse
from collections import defaultdict
from functools import cached_property
from typing import TYPE_CHECKING
from typing import Any
from poetry.core.packages.utils.link import Link
from poetry.repositories.link_sources.base import LinkSource
from poetry.repositor... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/link_sources/base.py | src/poetry/repositories/link_sources/base.py | from __future__ import annotations
import logging
import re
from functools import cached_property
from typing import TYPE_CHECKING
from typing import ClassVar
from poetry.core.constraints.version import Version
from poetry.core.packages.package import Package
from poetry.core.version.exceptions import InvalidVersion... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/parsers/pypi_search_parser.py | src/poetry/repositories/parsers/pypi_search_parser.py | from __future__ import annotations
import functools
from dataclasses import dataclass
from html.parser import HTMLParser
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Callable
# The following code was originally written for PDM project
# https://github.com/pdm-project/pdm/blob... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/parsers/__init__.py | src/poetry/repositories/parsers/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/repositories/parsers/html_page_parser.py | src/poetry/repositories/parsers/html_page_parser.py | from __future__ import annotations
from html.parser import HTMLParser
class HTMLPageParser(HTMLParser):
def __init__(self) -> None:
super().__init__()
self.base_url: str | None = None
self.anchors: list[dict[str, str | None]] = []
def handle_starttag(self, tag: str, attrs: list[tuple... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/packages/direct_origin.py | src/poetry/packages/direct_origin.py | from __future__ import annotations
import functools
from pathlib import Path
from typing import TYPE_CHECKING
from poetry.core.packages.utils.link import Link
from poetry.config.config import Config
from poetry.inspection.info import PackageInfo
from poetry.inspection.info import PackageInfoError
from poetry.utils.... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/packages/locker.py | src/poetry/packages/locker.py | from __future__ import annotations
import json
import logging
import os
import re
import warnings
from hashlib import sha256
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import cast
from packaging.utils import canonicalize_name
from poetry.c... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/packages/dependency_package.py | src/poetry/packages/dependency_package.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterable
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
class DependencyPackage:
def __init__(self, dependency: Dependency, pac... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/packages/transitive_package_info.py | src/poetry/packages/transitive_package_info.py | from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.core.version.markers import BaseMarker
from poetry.core.version.markers import EmptyMarker
if TYPE_CHECKING:
from collections.abc import ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/packages/package_collection.py | src/poetry/packages/package_collection.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.packages.dependency_package import DependencyPackage
if TYPE_CHECKING:
from collections.abc import Iterable
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
class Pac... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/packages/__init__.py | src/poetry/packages/__init__.py | from __future__ import annotations
from poetry.packages.dependency_package import DependencyPackage
from poetry.packages.locker import Locker
from poetry.packages.package_collection import PackageCollection
__all__ = ["DependencyPackage", "Locker", "PackageCollection"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/test_factory.py | tests/test_factory.py | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
import pytest
from cleo.io.buffered_io import BufferedIO
from deepdiff.diff import DeepDiff
from packaging.utils import canonicalize_name
from poetry.core.constraints.version import Version
from poetry... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/test_conftest.py | tests/test_conftest.py | from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
from packaging.utils import canonicalize_name
from poetry.factory import Factory
from poetry.repositories import Repository
if TYPE_CHECKING:
from tests.types import PackageFactory
@pytest.fixture
def repo() -> Repository:
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/conftest.py | tests/conftest.py | from __future__ import annotations
import contextlib
import logging
import os
import platform
import re
import shutil
import sys
from collections.abc import Iterator
from pathlib import Path
from typing import TYPE_CHECKING
import findpython
import keyring
import packaging.version
import pytest
import responses
fro... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/helpers.py | tests/helpers.py | from __future__ import annotations
import contextlib
import os
import re
import shutil
from importlib import metadata
from pathlib import Path
from typing import TYPE_CHECKING
import keyring
from poetry.core.packages.package import Package
from poetry.core.packages.utils.link import Link
from poetry.core.vcs.git im... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/__init__.py | tests/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/types.py | tests/types.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import Protocol
if TYPE_CHECKING:
from collections.abc import Callable
from contextlib import AbstractContextManager
from pathlib import Path
from cleo.io.inputs.argument import Argument
from c... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/test_helpers.py | tests/test_helpers.py | from __future__ import annotations
import os
from tests.helpers import flatten_dict
from tests.helpers import isolated_environment
def test_flatten_dict() -> None:
orig_dict = {
"a": 1,
"b": 2,
"c": {
"x": 8,
"y": 9,
},
}
flattened_dict = {
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/integration/test_utils_vcs_git.py | tests/integration/test_utils_vcs_git.py | from __future__ import annotations
import os
import uuid
from copy import deepcopy
from hashlib import sha1
from pathlib import Path
from typing import TYPE_CHECKING
from typing import TypedDict
from urllib.parse import urlparse
from urllib.parse import urlunparse
import pytest
from dulwich.client import HTTPUnauth... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/integration/__init__.py | tests/integration/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/masonry/builders/test_editable_builder.py | tests/masonry/builders/test_editable_builder.py | from __future__ import annotations
import csv
import json
import os
import shutil
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from cleo.io.null_io import NullIO
from deepdiff.diff import DeepDiff
from poetry.core.constraints.version import Version
from poetry.core.masonry.metadata import... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/masonry/builders/__init__.py | tests/masonry/builders/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/masonry/builders/fixtures/excluded_subpackage/example/__init__.py | tests/masonry/builders/fixtures/excluded_subpackage/example/__init__.py | from __future__ import annotations
__version__ = "0.1.0"
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/masonry/builders/fixtures/excluded_subpackage/example/test/excluded.py | tests/masonry/builders/fixtures/excluded_subpackage/example/test/excluded.py | from __future__ import annotations
from tests.masonry.builders.fixtures.excluded_subpackage.example import __version__
def test_version():
assert __version__ == "0.1.0"
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/masonry/builders/fixtures/excluded_subpackage/example/test/__init__.py | tests/masonry/builders/fixtures/excluded_subpackage/example/test/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/vcs/git/test_backend.py | tests/vcs/git/test_backend.py | from __future__ import annotations
import shutil
from typing import TYPE_CHECKING
from typing import cast
import pytest
from dulwich.client import FetchPackResult
from dulwich.repo import Repo
from poetry.console.exceptions import PoetryRuntimeError
from poetry.vcs.git.backend import Git
from poetry.vcs.git.backen... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/vcs/git/conftest.py | tests/vcs/git/conftest.py | from __future__ import annotations
from typing import TYPE_CHECKING
import dulwich.repo
import pytest
from tests.vcs.git.git_fixture import TempRepoFixture
if TYPE_CHECKING:
from pathlib import Path
@pytest.fixture()
def temp_repo(tmp_path: Path) -> TempRepoFixture:
"""Temporary repository with 2 commits... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/vcs/git/git_fixture.py | tests/vcs/git/git_fixture.py | from __future__ import annotations
import typing
if typing.TYPE_CHECKING:
from pathlib import Path
import dulwich.repo
class TempRepoFixture(typing.NamedTuple):
path: Path
repo: dulwich.repo.Repo
init_commit: str
middle_commit: str
head_commit: str
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/vcs/git/test_system.py | tests/vcs/git/test_system.py | from __future__ import annotations
import re
import shutil
import subprocess
import typing
import pytest
from poetry.vcs.git.system import SystemGit
if typing.TYPE_CHECKING:
from pathlib import Path
from tests.vcs.git.git_fixture import TempRepoFixture
GIT_NOT_INSTALLED = shutil.which("git") is None
de... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/fixtures/scripts/scripts/check_argv0.py | tests/fixtures/scripts/scripts/check_argv0.py | from __future__ import annotations
import sys
from pathlib import Path
def main() -> int:
path = Path(sys.argv[0])
if sys.argv[1] == "absolute":
if not path.is_absolute():
raise RuntimeError(f"sys.argv[0] is not an absolute path: {path}")
if not path.exists():
raise R... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/fixtures/scripts/scripts/exit_code.py | tests/fixtures/scripts/scripts/exit_code.py | from __future__ import annotations
def main() -> None:
raise SystemExit(42)
if __name__ == "__main__":
main()
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/fixtures/scripts/scripts/__init__.py | tests/fixtures/scripts/scripts/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/fixtures/scripts/scripts/return_code.py | tests/fixtures/scripts/scripts/return_code.py | from __future__ import annotations
def main() -> int:
return 42
if __name__ == "__main__":
raise SystemExit(main())
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/tests/fixtures/extended_project/build.py | tests/fixtures/extended_project/build.py | from __future__ import annotations
from pathlib import Path
from typing import Any
def build(setup_kwargs: dict[str, Any]):
assert setup_kwargs["name"] == "extended-project"
assert setup_kwargs["version"] == "1.2.3"
dynamic_module = Path(__file__).parent / "extended_project" / "built.py"
dynamic_mod... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.