repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
diffusers
src/diffusers/commands/env.py
.py
# Copyright 2026 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
186
6,607
financial-services
claude-for-msft-365-install/examples/python-bootstrap/app.py
.py
""" Claude in Office β€” Bootstrap endpoint reference implementation. The Office add-in calls GET /bootstrap with the user's Entra ID token. This server validates the token, decides which skills and MCP servers that employee is allowed to use, and returns them. All customer-editable settings live in config.py β€” edit th...
95
3,424
financial-services
claude-for-msft-365-install/examples/python-bootstrap/mint_dev_token.py
.py
""" Mint a self-signed dev token for local testing of app.py. First run generates dev_private.pem + dev_jwks.json in the current directory. Subsequent runs reuse them. python mint_dev_token.py --oid alice --group <gid> --group <gid2> """ import argparse, json, os, time, base64 import jwt from cryptography.hazmat....
49
1,769
financial-services
claude-for-msft-365-install/examples/python-bootstrap/get_tenant_id.py
.py
#!/usr/bin/env python3 """ Print your Entra (Azure AD) tenant ID. Usage: python get_tenant_id.py alice@yourcompany.com python get_tenant_id.py yourcompany.com python get_tenant_id.py # tries `az account show` if Azure CLI is logged in Set the result as TENANT_ID before running app.py. """ impor...
45
1,354
financial-services
claude-for-msft-365-install/examples/python-bootstrap/config.py
.py
""" Edit this file to configure your bootstrap server. app.py should not need changes. """ import base64 import os # ─── Config ────────────────────────────────────────────────────────── TENANT_ID = os.environ["TENANT_ID"] # your Entra tenant AUDIENCE = "c2995f31-11e7-4882-b7a7-ef9def0a0266" ...
68
2,938
financial-services
scripts/orchestrate.py
.py
#!/usr/bin/env python3 """Reference event loop for cross-agent handoffs between managed agents. REFERENCE ONLY β€” replace with your firm's workflow engine (Temporal, Airflow, Guidewire event bus). This script shows the shape of the loop, not a production implementation. Security note: handoff requests are surfaced in ...
90
3,147
financial-services
scripts/version_bump.py
.py
#!/usr/bin/env python3 """ Single source of truth for plugin version-bump enforcement. A plugin's `.claude-plugin/plugin.json` `version` gates update delivery to already-installed users (Claude Code only re-delivers a plugin when its version changes). This script guarantees that any plugin modified on a branch ends up...
210
7,082
financial-services
scripts/check.py
.py
#!/usr/bin/env python3 """ Lint all plugin + managed-agent manifests and verify cross-file references. Checks: 1. Every *.yaml under managed-agents/ parses. 2. Every plugin.json / marketplace.json / steering-examples.json parses. 3. Every <vertical>/agents/*.md has valid YAML frontmatter with name + description....
220
8,444
financial-services
scripts/sync-agent-skills.py
.py
#!/usr/bin/env python3 """ Re-sync each agent plugin's bundled skills from the vertical-plugin source. Agent plugins under plugins/agent-plugins/<slug>/skills/<name>/ are vendored copies of plugins/vertical-plugins/*/skills/<name>/. The vertical copy is the source of truth; run this after editing a skill there to prop...
45
1,356
financial-services
scripts/validate.py
.py
#!/usr/bin/env python3 """Harness-side schema validation for managed-agent worker output. Usage: validate.py <output.json> <schema.json|schema.yaml> Exits 0 on valid, 1 on invalid (message to stderr). The CMA API does not enforce structured output today, so the deploy harness runs this between a reader subagent and t...
43
1,178
financial-services
plugins/vertical-plugins/financial-analysis/skills/skill-creator/scripts/package_skill.py
.py
#!/usr/bin/env python3 """ Skill Packager - Creates a distributable .skill file of a skill folder Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory] Example: python utils/package_skill.py skills/public/my-skill python utils/package_skill.py skills/public/my-skill ./dist """ im...
111
3,288
financial-services
plugins/vertical-plugins/financial-analysis/skills/ib-check-deck/scripts/extract_numbers.py
.py
#!/usr/bin/env python3 """ Extract numerical values from presentation content for consistency checking. Usage: python extract_numbers.py presentation-content.md python extract_numbers.py presentation-content.md --output numbers.json This script parses markdown-formatted presentation content (from markitdown) ...
306
10,305
financial-services
plugins/vertical-plugins/financial-analysis/skills/dcf-model/scripts/validate_dcf.py
.py
#!/usr/bin/env python3 """ DCF Model Validation Script Validates Excel DCF models for formula errors and common DCF mistakes """ import sys import json from pathlib import Path from typing import Optional class DCFModelValidator: """Validates DCF models for errors and quality issues""" def __init__(self, ex...
293
11,623
poetry
tests/types.py
.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...
160
4,741
poetry
tests/test_factory.py
.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...
513
18,167
poetry
tests/test_conftest.py
.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: ...
82
2,671
poetry
tests/helpers.py
.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...
378
10,977
poetry
tests/test_main.py
.py
from __future__ import annotations import runpy from typing import TYPE_CHECKING import pytest if TYPE_CHECKING: from pytest_mock import MockerFixture def test_module_entrypoint_exits_with_application_status(mocker: MockerFixture) -> None: main_mock = mocker.patch("poetry.console.application.main", side_...
22
505
poetry
tests/test_helpers.py
.py
from __future__ import annotations import os from importlib import metadata from typing import TYPE_CHECKING import keyring import pytest import requests from poetry.core.packages.package import Package from poetry.core.packages.utils.link import Link from poetry.repositories.exceptions import PackageNotFoundError...
582
20,116
poetry
tests/conftest.py
.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...
1,133
35,457
poetry
tests/vcs/git/test_backend.py
.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.refs import HEADREF from dulwich.refs import Ref from dulwich.repo import Repo from poetry.console.exceptions import PoetryRuntimeError fro...
535
16,534
poetry
tests/vcs/git/git_fixture.py
.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
18
283
poetry
tests/vcs/git/test_system.py
.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...
56
1,667
poetry
tests/vcs/git/conftest.py
.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...
65
1,632
poetry
tests/puzzle/test_provider.py
.py
from __future__ import annotations import shutil from pathlib import Path from subprocess import CalledProcessError from typing import TYPE_CHECKING from typing import Any import pytest from cleo.io.null_io import NullIO from packaging.utils import NormalizedName from packaging.utils import canonicalize_name from p...
1,146
39,828
poetry
tests/puzzle/test_solver_internals.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version import parse_constraint from poetry.core.packages.dependency import Dependency from poetry.core.packages.dependency_group import MAIN_GROUP from poetry....
670
23,260
poetry
tests/puzzle/test_solver.py
.py
from __future__ import annotations import re import shutil import sys from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Literal import pytest from cleo.io.buffered_io import BufferedIO from packaging.utils import canonicalize_name from poetry.core.packages.dependenc...
5,648
180,129
poetry
tests/puzzle/test_transaction.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.packages.dependency import Dependency from poetry.core.packages.dependency_group import MAIN_GROUP from poetry.core.packages.package import Package f...
516
16,614
poetry
tests/puzzle/conftest.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.io.null_io import NullIO from poetry.core.packages.project_package import ProjectPackage from poetry.puzzle import Solver from poetry.repositories import Repository from poetry.repositories import RepositoryPool from tests.h...
52
1,217
poetry
tests/mixology/test_incompatibility.py
.py
from __future__ import annotations import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.url_dependency import URLDependency from poetry.mixology.incompatibility import Incompatibility from poetry.mixology.incompatibility_cause import DependencyCauseError from poetry.mixology...
51
1,554
poetry
tests/mixology/helpers.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from poetry.core.packages.package import Package from poetry.factory import Factory from poetry.mixology.failure import SolveFailureError from poetry.mixology.version_solver import VersionSolver if TYPE_CHECKING: from collections.abc import Ma...
80
2,198
poetry
tests/mixology/version_solver/__init__.py
.py
from __future__ import annotations import pytest pytest.register_assert_rewrite("tests.mixology.helpers")
7
109
poetry
tests/mixology/version_solver/test_basic_graph.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.factory import Factory from tests.mixology.helpers import add_to_repo from tests.mixology.helpers import check_solver_result if TYPE_CHECKING: from poetry.core.packages.project_package import ProjectPackage from ...
133
4,326
poetry
tests/mixology/version_solver/test_unsolvable.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.factory import Factory from poetry.puzzle.provider import IncompatibleConstraintsError from tests.mixology.helpers import add_to_repo from tests.mixology.helpers import check_solver_result if TYPE_CHECKING: from poetr...
159
5,475
poetry
tests/mixology/version_solver/test_with_lock.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from cleo.io.null_io import NullIO from packaging.utils import canonicalize_name from poetry.core.packages.package import Package from poetry.factory import Factory from tests.helpers import get_package from tests.mixology.helpers import add_to_repo...
241
7,700
poetry
tests/mixology/version_solver/test_backtracking.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from poetry.factory import Factory from tests.mixology.helpers import add_to_repo from tests.mixology.helpers import check_solver_result if TYPE_CHECKING: from poetry.core.packages.project_package import ProjectPackage from poetry.reposito...
207
7,406
poetry
tests/mixology/version_solver/test_dependency_cache.py
.py
from __future__ import annotations from copy import deepcopy from typing import TYPE_CHECKING from unittest import mock from poetry.factory import Factory from poetry.mixology.version_solver import DependencyCache from tests.helpers import MOCK_DEFAULT_GIT_REVISION from tests.mixology.helpers import add_to_repo if ...
187
7,554
poetry
tests/mixology/version_solver/test_python_constraint.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from poetry.factory import Factory from tests.mixology.helpers import add_to_repo from tests.mixology.helpers import check_solver_result if TYPE_CHECKING: from poetry.core.packages.project_package import ProjectPackage from poetry.reposito...
43
1,759
poetry
tests/mixology/version_solver/conftest.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.io.null_io import NullIO from poetry.core.packages.project_package import ProjectPackage from poetry.puzzle.provider import Provider as BaseProvider from poetry.repositories import Repository from poetry.repositories import ...
46
1,068
poetry
tests/publishing/test_uploader.py
.py
from __future__ import annotations import shutil from typing import TYPE_CHECKING import pytest from cleo.io.null_io import NullIO from poetry.factory import Factory from poetry.publishing.uploader import Uploader from poetry.publishing.uploader import UploadError if TYPE_CHECKING: from pathlib import Path ...
416
14,435
poetry
tests/publishing/test_hash_manager.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from typing import Any import pytest from poetry.publishing.hash_manager import HashManager if TYPE_CHECKING: from pathlib import Path from pytest_mock import MockerFixture from tests.types import FixtureDirGetter @pytest.fixture d...
84
2,276
poetry
tests/publishing/test_publisher.py
.py
from __future__ import annotations import os from pathlib import Path from typing import TYPE_CHECKING import pytest from cleo.io.buffered_io import BufferedIO from cleo.io.null_io import NullIO from packaging.utils import canonicalize_name from poetry.factory import Factory from poetry.publishing.publisher import...
256
8,670
poetry
tests/integration/test_utils_vcs_git.py
.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...
452
14,162
poetry
tests/packages/test_locker.py
.py
from __future__ import annotations import json import logging import os import re import sys import tempfile import uuid from hashlib import sha256 from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Literal import pytest from packaging.utils import canonicalize_name ...
1,936
50,860
poetry
tests/packages/test_transitive_package_info.py
.py
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.packages.dependency_group import MAIN_GROUP from poetry.core.version.markers import parse_marker from poetry.packages.transitive_package_info import TransitivePackageInfo DEV_GROUP = canonicalize_name("d...
36
1,108
poetry
tests/packages/test_direct_origin.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from unittest.mock import MagicMock from poetry.core.packages.utils.link import Link from poetry.packages.direct_origin import DirectOrigin from poetry.utils.cache import ArtifactCache if TYPE_CHECKING: from pathlib import Path from pytes...
78
2,655
poetry
tests/inspection/test_lazy_wheel.py
.py
from __future__ import annotations import re from enum import IntEnum from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING from typing import Protocol from urllib.parse import urlparse from zipfile import ZipInfo import pytest import requests import responses from requests import codes ...
518
18,964
poetry
tests/inspection/test_info.py
.py
from __future__ import annotations import contextlib import shutil import uuid from subprocess import CalledProcessError from typing import TYPE_CHECKING from zipfile import ZipFile import pytest from build import BuildBackendException from build import ProjectBuilder from packaging.metadata import parse_email from...
441
13,998
poetry
tests/config/test_source.py
.py
from __future__ import annotations import pytest from tomlkit.container import Container from tomlkit.items import Table from tomlkit.items import Trivia from poetry.config.source import Source from poetry.repositories.repository_pool import Priority @pytest.mark.parametrize( "source,table_body", [ ...
60
1,617
poetry
tests/config/test_dict_config_source.py
.py
from __future__ import annotations import pytest from poetry.config.config_source import PropertyNotFoundError from poetry.config.dict_config_source import DictConfigSource def test_dict_config_source_add_property() -> None: config_source = DictConfigSource() assert config_source._config == {} config_s...
144
4,409
poetry
tests/config/test_file_config_source.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest import tomlkit from poetry.config.config_source import PropertyNotFoundError from poetry.config.file_config_source import FileConfigSource from poetry.toml import TOMLFile if TYPE_CHECKING: from pathlib import Path def test_fil...
145
4,492
poetry
tests/config/test_config.py
.py
from __future__ import annotations import json import os import re from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from deepdiff.diff import DeepDiff from poetry.config.config import Config from poetry.config.config import PackageFilterPolicy from poetry.config.config...
201
5,751
poetry
tests/config/test_config_source.py
.py
from __future__ import annotations from copy import deepcopy import pytest from cleo.io.buffered_io import BufferedIO from poetry.config.config_source import UNSET from poetry.config.config_source import ConfigSourceMigration from poetry.config.dict_config_source import DictConfigSource @pytest.fixture def config...
151
4,200
poetry
tests/json/test_schema.py
.py
from __future__ import annotations import json from importlib.resources import files from pathlib import Path from typing import Any from poetry.factory import Factory from poetry.toml import TOMLFile SCHEMA_FILE = files("poetry.json") / "schemas" / "poetry.json" FIXTURE_DIR = Path(__file__).parent / "fixtures" SO...
81
2,562
poetry
tests/toml/test_file.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from tomlkit.toml_document import TOMLDocument from poetry.toml import TOMLError from poetry.toml import TOMLFile if TYPE_CHECKING: from pathlib import Path def test_path_returns_the_given_path(tmp_path: Path) -> None: pat...
60
1,528
poetry
tests/pyproject/test_pyproject_toml.py
.py
from __future__ import annotations import uuid from typing import TYPE_CHECKING from poetry.pyproject.toml import PyProjectTOML if TYPE_CHECKING: from pathlib import Path def test_pyproject_toml_reload(pyproject_toml: Path, poetry_section: str) -> None: pyproject = PyProjectTOML(pyproject_toml) name_...
48
1,379
poetry
tests/pyproject/test_pyproject_toml_file.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.exceptions import PoetryCoreError from poetry.toml import TOMLFile if TYPE_CHECKING: from pathlib import Path def test_pyproject_toml_file_invalid(pyproject_toml: Path) -> None: with pyproject_toml.open(mo...
24
561
poetry
tests/pyproject/conftest.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest if TYPE_CHECKING: from pathlib import Path @pytest.fixture def pyproject_toml(tmp_path: Path) -> Path: path = tmp_path / "pyproject.toml" with path.open(mode="w", encoding="utf-8"): pass return path @pytest...
44
867
poetry
tests/console/test_command_loader.py
.py
from __future__ import annotations import pytest from cleo.commands.command import Command from cleo.exceptions import CleoLogicError from poetry.console.command_loader import CommandLoader class _DummyCommand(Command): name = "dummy" class _OtherCommand(Command): name = "other" def test_register_facto...
36
875
poetry
tests/console/test_exceptions_poetry_runtime_error.py
.py
from __future__ import annotations from subprocess import CalledProcessError import pytest from poetry.console.exceptions import ConsoleMessage from poetry.console.exceptions import PoetryRuntimeError @pytest.mark.parametrize( ("reason", "messages", "exit_code", "expected_reason"), [ ("Error occurr...
149
4,761
poetry
tests/console/test_exceptions_console_message.py
.py
from __future__ import annotations import pytest from poetry.console.exceptions import ConsoleMessage @pytest.mark.parametrize( ("text", "expected_stripped"), [ ("<info>Hello, World!</info>", "Hello, World!"), ("<b>Bold</b>", "Bold"), ("<i>Italic</i>", "Italic"), ], ) def test_st...
69
2,182
poetry
tests/console/test_application.py
.py
from __future__ import annotations import json import re import shutil import subprocess import sys from typing import TYPE_CHECKING from typing import ClassVar from typing import cast import pytest from cleo.testers.application_tester import ApplicationTester from poetry.console.application import Application fro...
271
7,977
poetry
tests/console/test_application_removed_commands.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.testers.application_tester import ApplicationTester from poetry.console.application import COMMAND_NOT_FOUND_PREFIX_MESSAGE from poetry.console.application import Application if TYPE_CHECKING: from tests.types import C...
72
1,987
poetry
tests/console/test_application_global_options.py
.py
from __future__ import annotations import re import textwrap from pathlib import Path from typing import TYPE_CHECKING from typing import ClassVar import pytest from cleo.io.buffered_io import BufferedIO from cleo.io.inputs.string_input import StringInput from cleo.testers.application_tester import ApplicationTeste...
265
8,201
poetry
tests/console/test_application_command_not_found.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.testers.application_tester import ApplicationTester from poetry.console.application import Application if TYPE_CHECKING: from tests.types import CommandFactory @pytest.fixture def tester() -> ApplicationTester: r...
64
1,612
poetry
tests/console/conftest.py
.py
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from cleo.io.null_io import NullIO from cleo.testers.application_tester import ApplicationTester from cleo.testers.command_tester import CommandTester from poetry.installation import Installer from poetry.utils.env import M...
166
4,647
poetry
tests/console/logging/test_io_formatter.py
.py
from __future__ import annotations from logging import LogRecord from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.console.logging.io_formatter import IOFormatter from poetry.console.logging.io_formatter import _log_prefix from poetry.console.logging.io_formatter import _path_to_pac...
86
2,780
poetry
tests/console/logging/formatters/test_builder_formatter.py
.py
from __future__ import annotations import pytest from poetry.console.logging.formatters.builder_formatter import BuilderLogFormatter @pytest.mark.parametrize( "input_msg, expected_output", [ ("Building package", " - Building <info>package</info>"), ("Built package", " - Built <success>pack...
30
1,055
poetry
tests/console/commands/test_new.py
.py
from __future__ import annotations import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.utils.helpers import module_name from poetry.factory import Factory if TYPE_CHECKING: from unittest.mock import MagicMock from cleo.testers.command_tester import Command...
287
7,887
poetry
tests/console/commands/test_update.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.console.commands.update import UpdateCommand from tests.helpers import get_package if TYPE_CHECKING: from pytest_mock import MockerFixture from poetry.poetry import Poetry from tests.helpers import DummyRepos...
285
8,935
poetry
tests/console/commands/test_check.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.factory import Factory from poetry.packages import Locker from poetry.toml import TOMLFile if TYPE_CHECKING: from collections.abc import Iterator from pathlib import Path from cleo.testers.command_tester impo...
465
14,915
poetry
tests/console/commands/test_remove.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest import tomlkit from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.package import Package from poetry.factory import Factory from tests.helpers import DummyLocker from tests.helpers import get_p...
873
25,206
poetry
tests/console/commands/test_sync.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.exceptions import CleoNoSuchOptionError from poetry.console.commands.sync import SyncCommand # import all tests from the install command # and run them for sync by overriding the command fixture from tests.console.commands....
46
1,300
poetry
tests/console/commands/test_run.py
.py
from __future__ import annotations import subprocess from typing import TYPE_CHECKING import pytest from poetry.utils._compat import WINDOWS if TYPE_CHECKING: from cleo.testers.application_tester import ApplicationTester from cleo.testers.command_tester import CommandTester from pytest_mock import Moc...
268
8,786
poetry
tests/console/commands/test_config.py
.py
from __future__ import annotations import json import os import textwrap from pathlib import Path from typing import TYPE_CHECKING import pytest from deepdiff.diff import DeepDiff from poetry.core.pyproject.exceptions import PyProjectError from poetry.config.config_source import ConfigSource from poetry.config.con...
917
28,653
poetry
tests/console/commands/test_version.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.console.commands.version import VersionCommand if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester from poetry.poetry import Poetry from tests.types import CommandTesterFactory from te...
135
4,424
poetry
tests/console/commands/test_about.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester from tests.types import CommandTesterFactory @pytest.fixture() def tester(command_tester_factory: CommandTesterFactory) -> CommandTester: return co...
36
824
poetry
tests/console/commands/test_search.py
.py
from __future__ import annotations import re from typing import TYPE_CHECKING import pytest from poetry.repositories.pypi_repository import PyPiRepository if TYPE_CHECKING: import responses from cleo.testers.command_tester import CommandTester from poetry.poetry import Poetry from poetry.reposit...
149
5,024
poetry
tests/console/commands/test_build.py
.py
from __future__ import annotations import shutil import tarfile from typing import TYPE_CHECKING import pytest from cleo.io.null_io import NullIO from cleo.testers.application_tester import ApplicationTester from poetry.console.application import Application from poetry.console.commands.build import BuildCommand f...
305
9,711
poetry
tests/console/commands/test_add.py
.py
from __future__ import annotations import sys from pathlib import Path from typing import TYPE_CHECKING import pytest import tomlkit from packaging.utils import canonicalize_name from poetry.core.constraints.version import Version from poetry.core.packages.package import Package from poetry.console.commands.instal...
1,996
57,463
poetry
tests/console/commands/test_show.py
.py
from __future__ import annotations import json from collections.abc import Callable from typing import TYPE_CHECKING from typing import Any from typing import TypeVar from typing import cast import pytest from poetry.core.packages.dependency_group import MAIN_GROUP from poetry.core.packages.dependency_group import ...
3,047
94,764
poetry
tests/console/commands/test_install.py
.py
from __future__ import annotations import re from typing import TYPE_CHECKING import pytest from poetry.core.masonry.utils.module import ModuleOrPackageNotFoundError from poetry.core.packages.dependency_group import MAIN_GROUP from poetry.console.commands.installer_command import InstallerCommand from poetry.conso...
579
17,649
poetry
tests/console/commands/test_lock.py
.py
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import Version from poetry.packages import Locker from tests.helpers import get_package if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester f...
278
9,110
poetry
tests/console/commands/test_publish.py
.py
from __future__ import annotations import shutil from pathlib import Path from typing import TYPE_CHECKING from typing import NoReturn from unittest.mock import PropertyMock import pytest import requests import responses from poetry.factory import Factory if TYPE_CHECKING: from cleo.testers.application_tester...
269
8,590
poetry
tests/console/commands/test_init.py
.py
from __future__ import annotations import os import shutil import sys import textwrap from pathlib import Path from typing import TYPE_CHECKING import pytest from cleo.testers.command_tester import CommandTester from packaging.utils import canonicalize_name from poetry.core.utils.helpers import module_name from po...
1,252
33,281
poetry
tests/console/commands/conftest.py
.py
from __future__ import annotations import pytest @pytest.fixture def init_basic_inputs() -> str: return "\n".join( [ "my-package", # Package name "1.2.3", # Version "This is a description", # Description "n", # Author "MIT", # License ...
67
1,445
poetry
tests/console/commands/source/test_remove.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester from poetry.config.source import Source from poetry.poetry import Poetry from tests.types import CommandTesterFactory @pytest.fixture def teste...
102
2,902
poetry
tests/console/commands/source/test_add.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.config.source import Source from poetry.repositories.repository_pool import Priority if TYPE_CHECKING: from collections.abc import Iterable from cleo.testers.command_tester import CommandTester from poetry.p...
186
5,623
poetry
tests/console/commands/source/test_show.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.repositories.pypi_repository import PyPiRepository if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester from poetry.config.source import Source from poetry.poetry import Poetry from tes...
201
5,419
poetry
tests/console/commands/source/conftest.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.config.source import Source from poetry.repositories.repository_pool import Priority if TYPE_CHECKING: from poetry.poetry import Poetry from tests.types import CommandTesterFactory from tests.types import Proj...
161
3,696
poetry
tests/console/commands/self/utils.py
.py
from __future__ import annotations from pathlib import Path from tomlkit.items import Array from poetry.factory import Factory def get_self_command_dependencies(locked: bool = True) -> Array | None: from poetry.console.commands.self.self_command import SelfCommand from poetry.locations import CONFIG_DIR ...
33
984
poetry
tests/console/commands/self/test_update.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import Version from poetry.core.packages.package import Package from poetry.__version__ import __version__ from poetry.factory import Factory from poetry.installation.executor import Executor from ...
81
2,150
poetry
tests/console/commands/self/test_sync.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.exceptions import CleoNoSuchOptionError from poetry.console.commands.self.sync import SelfSyncCommand # import all tests from the self install command # and run them for sync by overriding the command fixture from tests.con...
46
1,321
poetry
tests/console/commands/self/test_self_command.py
.py
from __future__ import annotations import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.package import Package from poetry.core.packages.project_package import ProjectPackage from poetry.__version__ import __version__ from poetry.console.commands.self.self_command import Sel...
54
1,701
poetry
tests/console/commands/self/test_show_plugins.py
.py
from __future__ import annotations from importlib import metadata from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.package import Package from poetry.plugins.application_plugin import ApplicationPlugin from poetry....
227
5,815
poetry
tests/console/commands/self/test_show.py
.py
from __future__ import annotations import json from typing import TYPE_CHECKING import pytest import tomlkit from poetry.__version__ import __version__ from poetry.console.commands.self.self_command import SelfCommand if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester from tests.type...
98
2,902
poetry
tests/console/commands/self/test_add_plugins.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.packages.package import Package from poetry.console.commands.add import AddCommand from poetry.console.commands.self.self_command import SelfCommand from poetry.factory import Factory from tests.console.commands.self....
300
7,271
poetry
tests/console/commands/self/test_install.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.console.commands.self.install import SelfInstallCommand if TYPE_CHECKING: from cleo.testers.command_tester import CommandTester from tests.types import CommandTesterFactory @pytest.fixture def command() -> str:...
75
1,701
poetry
tests/console/commands/self/test_remove_plugins.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest import tomlkit from poetry.core.packages.dependency import Dependency from poetry.core.packages.package import Package from poetry.core.packages.project_package import ProjectPackage from poetry.__version__ import __version__ from poe...
113
3,186
poetry
tests/console/commands/self/conftest.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.packages.package import Package from poetry.__version__ import __version__ from poetry.factory import Factory from poetry.repositories import RepositoryPool from poetry.utils.env import EnvManag...
88
2,292