id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
12,700
fxsjy/jieba
fxsjy_jieba/jieba/analyse/tfidf.py
jieba.analyse.tfidf.IDFLoader
class IDFLoader(object): def __init__(self, idf_path=None): self.path = '' self.idf_freq = {} self.median_idf = 0.0 if idf_path: self.set_new_path(idf_path) def set_new_path(self, new_idf_path): if self.path != new_idf_path: self.path = new_idf_p...
class IDFLoader(object): def __init__(self, idf_path=None): pass def set_new_path(self, new_idf_path): pass def get_idf(self): pass
4
0
6
0
6
0
2
0
1
1
0
0
3
3
3
3
22
3
19
10
15
0
18
10
14
3
1
2
6
12,701
fxsjy/jieba
fxsjy_jieba/jieba/analyse/tfidf.py
jieba.analyse.tfidf.KeywordExtractor
import os class KeywordExtractor(object): STOP_WORDS = set(('the', 'of', 'is', 'and', 'to', 'in', 'that', 'we', 'for', 'an', 'are', 'by', 'be', 'as', 'on', 'with', 'can', 'if', 'from', 'which', 'you', 'it', 'this', 'then', 'at', 'have', 'all', 'not', 'one', 'has', 'or', 'that')) def set_stop_words(self, stop_...
class KeywordExtractor(object): def set_stop_words(self, stop_words_path): pass def extract_tags(self, *args, **kwargs): pass
3
0
5
0
5
0
2
0
1
2
0
2
2
0
2
2
18
3
15
7
12
0
11
7
8
3
1
1
4
12,702
fxsjy/jieba
fxsjy_jieba/jieba/analyse/tfidf.py
jieba.analyse.tfidf.TFIDF
from operator import itemgetter import jieba import jieba.posseg import os class TFIDF(KeywordExtractor): def __init__(self, idf_path=None): self.tokenizer = jieba.dt self.postokenizer = jieba.posseg.dt self.stop_words = self.STOP_WORDS.copy() self.idf_loader = IDFLoader(idf_path o...
class TFIDF(KeywordExtractor): def __init__(self, idf_path=None): pass def set_idf_path(self, idf_path): pass def extract_tags(self, sentence, topK=20, withWeight=False, allowPOS=(), withFlag=False): ''' Extract keywords from sentence using TF-IDF algorithm. Param...
4
1
18
0
14
4
5
0.29
1
4
1
0
3
6
3
5
58
4
42
18
38
12
38
18
34
12
2
3
15
12,703
fxsjy/jieba
fxsjy_jieba/jieba/lac_small/reader_small.py
jieba.lac_small.reader_small.Dataset
import os class Dataset(object): """data reader""" def __init__(self): basepath = os.path.abspath(__file__) folder = os.path.dirname(basepath) word_dict_path = os.path.join(folder, 'word.dic') label_dict_path = os.path.join(folder, 'tag.dic') self.word2id_dict = load_kv...
class Dataset(object): '''data reader''' def __init__(self): pass @property def vocab_size(self): '''vocabulary size''' pass @property def num_labels(self): '''num_labels''' pass def word_to_ids(self, words): '''convert word to word index'''...
9
5
7
0
6
1
2
0.16
1
1
0
0
6
4
6
6
49
5
38
25
29
6
34
23
27
3
1
2
10
12,704
fxsjy/jieba
fxsjy_jieba/jieba/posseg/__init__.py
jieba.posseg.POSTokenizer
from .viterbi import viterbi import jieba class POSTokenizer(object): def __init__(self, tokenizer=None): self.tokenizer = tokenizer or jieba.Tokenizer() self.load_word_tag(self.tokenizer.get_dict_file()) def __repr__(self): return '<POSTokenizer tokenizer=%r>' % self.tokenizer d...
class POSTokenizer(object): def __init__(self, tokenizer=None): pass def __repr__(self): pass def __getattr__(self, name): pass def initialize(self, dictionary=None): pass def load_word_tag(self, f): pass def makesure_userdict_loaded(self): ...
16
0
11
0
10
0
4
0.01
1
7
2
0
15
2
15
15
176
20
155
55
139
1
137
55
121
13
1
6
58
12,705
fxsjy/jieba
fxsjy_jieba/jieba/posseg/__init__.py
jieba.posseg.pair
class pair(object): def __init__(self, word, flag): self.word = word self.flag = flag def __unicode__(self): return '%s/%s' % (self.word, self.flag) def __repr__(self): return 'pair(%r, %r)' % (self.word, self.flag) def __str__(self): if PY2: retur...
class pair(object): def __init__(self, word, flag): pass def __unicode__(self): pass def __repr__(self): pass def __str__(self): pass def __iter__(self): pass def __lt__(self, other): pass def __eq__(self, other): pass def _...
10
0
2
0
2
0
1
0
1
0
0
0
9
2
9
9
32
9
23
12
13
0
22
12
12
2
1
1
10
12,706
sdispater/poetry
src/poetry/config/config.py
config.config.Config
from poetry.locations import CONFIG_DIR from packaging.utils import NormalizedName from copy import deepcopy from poetry.config.dict_config_source import DictConfigSource from poetry.locations import DEFAULT_CACHE_DIR from typing import Any from poetry.locations import data_dir from poetry.toml import TOMLFile import r...
class Config: def __init__(self, use_environment: bool=True) -> None: pass @property def config(self) -> dict[str, Any]: pass @property def config_source(self) -> ConfigSource: pass @property def auth_config_source(self) -> ConfigSource: pass def set_co...
35
1
11
2
9
1
2
0.08
0
14
4
0
15
4
19
19
280
53
210
70
173
17
136
56
112
10
0
3
51
12,707
sdispater/poetry
src/poetry/config/config.py
config.config.PackageFilterPolicy
from packaging.utils import canonicalize_name import re import dataclasses @dataclasses.dataclass class PackageFilterPolicy: policy: dataclasses.InitVar[str | list[str] | None] packages: list[str] = dataclasses.field(init=False) def __post_init__(self, policy: str | list[str] | None) -> None: if n...
@dataclasses.dataclass class PackageFilterPolicy: def __post_init__(self, policy: str | list[str] | None) -> None: pass def allows(self, package_name: str) -> bool: pass def has_exact_package(self, package_name: str) -> bool: pass @classmethod def is_reserved(cls, name: st...
11
0
9
1
8
0
3
0
0
3
0
0
2
0
5
5
58
10
48
12
39
0
29
9
23
4
0
2
14
12,708
sdispater/poetry
src/poetry/config/config_source.py
config.config_source.ConfigSource
from abc import ABC from typing import Any from abc import abstractmethod class ConfigSource(ABC): @abstractmethod def get_property(self, key: str) -> Any: ... @abstractmethod def add_property(self, key: str, value: Any) -> None: ... @abstractmethod def remove_property(self, ...
class ConfigSource(ABC): @abstractmethod def get_property(self, key: str) -> Any: pass @abstractmethod def add_property(self, key: str, value: Any) -> None: pass @abstractmethod def remove_property(self, key: str) -> None: pass
7
0
1
0
1
0
1
0
1
2
0
2
3
0
3
23
9
2
7
7
3
0
7
4
3
1
4
0
3
12,709
sdispater/poetry
src/poetry/config/config_source.py
config.config_source.ConfigSourceMigration
import json import dataclasses from cleo.io.null_io import NullIO from typing import Any @dataclasses.dataclass class ConfigSourceMigration: old_key: str new_key: str | None value_migration: dict[Any, Any] = dataclasses.field(default_factory=dict) def dry_run(self, config_source: ConfigSource, io: IO ...
@dataclasses.dataclass class ConfigSourceMigration: def dry_run(self, config_source: ConfigSource, io: IO | None=None) -> bool: pass def apply(self, config_source: ConfigSource) -> None: pass
4
0
19
5
15
0
5
0
0
3
2
0
2
0
2
2
44
11
33
9
30
0
27
9
24
6
0
1
10
12,710
sdispater/poetry
src/poetry/config/config_source.py
config.config_source.PropertyNotFoundError
class PropertyNotFoundError(ValueError): pass
class PropertyNotFoundError(ValueError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
2
0
2
1
1
0
2
1
1
0
4
0
0
12,711
sdispater/poetry
src/poetry/config/dict_config_source.py
config.dict_config_source.DictConfigSource
from typing import Any from poetry.config.config_source import PropertyNotFoundError from poetry.config.config_source import ConfigSource class DictConfigSource(ConfigSource): def __init__(self) -> None: self._config: dict[str, Any] = {} @property def config(self) -> dict[str, Any]: retur...
class DictConfigSource(ConfigSource): def __init__(self) -> None: pass @property def config(self) -> dict[str, Any]: pass def get_property(self, key: str) -> Any: pass def add_property(self, key: str, value: Any) -> None: pass def remove_property(self, key: s...
7
0
9
2
7
0
3
0
1
5
1
0
5
1
5
28
49
14
35
17
28
0
34
16
28
4
5
2
14
12,712
sdispater/poetry
src/poetry/config/file_config_source.py
config.file_config_source.FileConfigSource
from poetry.config.config_source import ConfigSource from poetry.config.config_source import drop_empty_config_category from contextlib import contextmanager from tomlkit import table from tomlkit import document from poetry.config.config_source import PropertyNotFoundError from typing import Any class FileConfigSourc...
class FileConfigSource(ConfigSource): def __init__(self, file: TOMLFile) -> None: pass @property def name(self) -> str: pass @property def file(self) -> TOMLFile: pass def get_property(self, key: str) -> Any: pass def add_property(self, key: str, value: An...
11
0
11
3
8
0
3
0.03
1
7
1
0
7
1
7
30
88
24
62
28
51
2
58
23
50
5
5
3
20
12,713
sdispater/poetry
src/poetry/config/source.py
config.source.Source
import dataclasses from poetry.repositories.repository_pool import Priority @dataclasses.dataclass(order=True, eq=True) class Source: name: str url: str = '' priority: Priority = Priority.PRIMARY def __post_init__(self) -> None: if isinstance(self.priority, str): self.priority = Pr...
@dataclasses.dataclass(order=True, eq=True) class Source: def __post_init__(self) -> None: pass def to_dict(self) -> dict[str, str | bool]: pass def to_toml_table(self) -> Table: pass
5
0
7
0
7
0
2
0.04
0
4
1
0
3
0
3
3
30
4
26
10
20
1
17
10
11
2
0
1
5
12,714
sdispater/poetry
src/poetry/console/application.py
console.application.Application
import argparse from cleo.events.console_events import COMMAND from cleo.application import Application as BaseApplication from cleo.exceptions import CleoCommandNotFoundError from cleo.exceptions import CleoError from poetry.console.exceptions import PoetryRuntimeError from pathlib import Path from cleo.events.event_d...
class Application(BaseApplication): def __init__(self) -> None: pass @property def _default_definition(self) -> Definition: pass @property def project_directory(self) -> Path: pass @property def poetry(self) -> Poetry: pass @property def command_load...
25
3
27
5
19
4
3
0.2
1
19
11
1
16
7
18
18
514
101
347
102
299
68
231
83
200
8
1
5
55
12,715
sdispater/poetry
src/poetry/console/command_loader.py
console.command_loader.CommandLoader
from cleo.exceptions import CleoLogicError from cleo.loaders.factory_command_loader import FactoryCommandLoader class CommandLoader(FactoryCommandLoader): def register_factory(self, command_name: str, factory: Callable[[], Command]) -> None: if command_name in self._factories: raise CleoLogicE...
class CommandLoader(FactoryCommandLoader): def register_factory(self, command_name: str, factory: Callable[[], Command]) -> None: pass
2
0
7
1
6
0
2
0
1
2
0
0
1
0
1
1
8
1
7
4
3
0
5
2
3
2
1
1
2
12,716
sdispater/poetry
src/poetry/console/commands/about.py
console.commands.about.AboutCommand
from poetry.console.commands.command import Command class AboutCommand(Command): name = 'about' description = 'Shows information about Poetry.' def handle(self) -> int: from poetry.utils._compat import metadata self.line(f"<info>Poetry - Package Management for Python\n\nVersion: {metadata....
class AboutCommand(Command): def handle(self) -> int: pass
2
0
17
4
13
0
1
0
1
1
0
0
1
0
1
6
22
6
16
5
13
0
7
5
4
1
2
0
1
12,717
sdispater/poetry
src/poetry/console/commands/add.py
console.commands.add.AddCommand
from poetry.console.commands.init import InitCommand from typing import ClassVar from cleo.helpers import argument from poetry.console.commands.installer_command import InstallerCommand from poetry.core.packages.dependency_group import MAIN_GROUP from tomlkit.toml_document import TOMLDocument from packaging.utils impor...
class AddCommand(InstallerCommand, InitCommand): def handle(self) -> int: pass def get_existing_packages_from_input(self, packages: list[str], section: dict[str, Any], project_dependencies: Collection[NormalizedName]) -> list[str]: pass @property def _hint_update_packages(self) -> str...
7
0
61
10
49
2
13
0.04
2
8
0
1
5
0
5
36
408
58
340
64
320
13
194
56
182
51
4
6
63
12,718
sdispater/poetry
src/poetry/console/commands/build.py
console.commands.build.BuildCommand
from typing import ClassVar from poetry.console.commands.env_command import EnvCommand from cleo.helpers import option class BuildCommand(EnvCommand): name = 'build' description = 'Builds a package, as a tarball and a wheel by default.' options: ClassVar[list[Option]] = [option('format', 'f', 'Limit the fo...
class BuildCommand(EnvCommand): @staticmethod def _prepare_config_settings(local_version: str | None, config_settings: list[str] | None, io: IO) -> dict[str, str]: pass @staticmethod def _prepare_formats(fmt: str | None) -> list[str]: pass def handle(self) -> int: pass
6
0
16
2
14
0
2
0.01
1
7
2
0
1
2
3
6
90
11
79
19
71
1
24
13
20
4
2
2
7
12,719
sdispater/poetry
src/poetry/console/commands/build.py
console.commands.build.BuildHandler
from poetry.utils.isolated_build import isolated_builder from poetry.utils.helpers import remove_directory from poetry.utils._compat import metadata from pathlib import Path from poetry.masonry.builders import BUILD_FORMATS from poetry.core.constraints.version import Version from typing import Any class BuildHandler: ...
class BuildHandler: def __init__(self, poetry: Poetry, env: Env, io: IO) -> None: pass def _build(self, fmt: DistributionType, executable: Path, target_dir: Path, config_settings: dict[str, Any]) -> None: pass def _isolated_build(self, fmt: DistributionType, executable: Path, target_dir:...
8
1
15
2
12
2
2
0.13
0
9
2
0
7
3
7
7
114
20
84
31
64
11
44
18
36
5
0
1
15
12,720
sdispater/poetry
src/poetry/console/commands/build.py
console.commands.build.BuildOptions
from typing import Any import dataclasses from poetry.masonry.builders import BUILD_FORMATS @dataclasses.dataclass(frozen=True) class BuildOptions: clean: bool formats: list[DistributionType] output: str config_settings: dict[str, Any] = dataclasses.field(default_factory=dict) def __post_init__(se...
@dataclasses.dataclass(frozen=True) class BuildOptions: def __post_init__(self) -> None: pass
3
0
4
0
4
0
3
0
0
1
0
0
1
0
1
1
10
1
9
4
7
0
9
4
7
3
0
2
3
12,721
sdispater/poetry
src/poetry/console/commands/cache/clear.py
console.commands.cache.clear.CacheClearCommand
from cleo.helpers import argument from poetry.utils.cache import FileCache import os from typing import ClassVar from cleo.helpers import option from poetry.console.commands.command import Command from poetry.config.config import Config from packaging.utils import canonicalize_name class CacheClearCommand(Command): ...
class CacheClearCommand(Command): def handle(self) -> int: pass
2
0
58
13
44
1
10
0.02
1
6
2
0
1
0
1
6
69
15
53
16
51
1
39
15
37
10
2
2
10
12,722
sdispater/poetry
src/poetry/console/commands/cache/list.py
console.commands.cache.list.CacheListCommand
from poetry.config.config import Config from poetry.console.commands.command import Command class CacheListCommand(Command): name = 'cache list' description = "List Poetry's caches." def handle(self) -> int: config = Config.create() if config.repository_cache_directory.exists(): ...
class CacheListCommand(Command): def handle(self) -> int: pass
2
0
11
1
10
0
4
0
1
2
1
0
1
0
1
6
15
2
13
7
11
0
13
7
11
4
2
3
4
12,723
sdispater/poetry
src/poetry/console/commands/check.py
console.commands.check.CheckCommand
from poetry.console.commands.command import Command from cleo.helpers import option from typing import Any from typing import ClassVar class CheckCommand(Command): name = 'check' description = 'Validates the content of the <comment>pyproject.toml</> file and its consistency with the poetry.lock file.' opti...
class CheckCommand(Command): def _validate_classifiers(self, project_classifiers: set[str]) -> tuple[list[str], list[str]]: '''Identify unrecognized and deprecated trove classifiers. A fully-qualified classifier is a string delimited by `` :: `` separators. To make the error message more r...
5
3
36
7
24
5
7
0.18
1
8
0
0
4
0
4
9
168
31
116
40
105
21
76
38
67
10
2
5
27
12,724
sdispater/poetry
src/poetry/console/commands/command.py
console.commands.command.Command
from cleo.exceptions import CleoValueError from cleo.commands.command import Command as BaseCommand from typing import ClassVar from typing import Any class Command(BaseCommand): loggers: ClassVar[list[str]] = [] _poetry: Poetry | None = None @property def poetry(self) -> Poetry: if self._poet...
class Command(BaseCommand): @property def poetry(self) -> Poetry: pass def set_poetry(self, poetry: Poetry) -> None: '''Explicitly set the current Poetry. Useful for Plugins that extends the features of a Poetry CLI Command. ''' pass def get_application(self) ...
7
1
5
1
4
1
1
0.14
1
3
0
20
5
0
5
5
35
10
22
11
14
3
21
10
14
2
1
1
7
12,725
sdispater/poetry
src/poetry/console/commands/config.py
console.commands.config.ConfigCommand
from poetry.config.config import PackageFilterPolicy from typing import Any from typing import cast from cleo.helpers import option from poetry.config.config import boolean_normalizer from poetry.config.config import build_config_setting_normalizer from poetry.config.config import build_config_setting_validator from po...
class ConfigCommand(Command): @property def unique_config_values(self) -> dict[str, tuple[Any, Any]]: pass def handle(self) -> int: pass def _handle_single_value(self, source: ConfigSource, key: str, callbacks: tuple[Any, Any], values: list[Any]) -> int: pass def _list_c...
7
0
70
14
55
1
13
0.02
1
15
5
0
5
0
5
10
385
85
294
60
269
7
195
50
179
47
2
4
65
12,726
sdispater/poetry
src/poetry/console/commands/debug/info.py
console.commands.debug.info.DebugInfoCommand
import sys from poetry.console.commands.command import Command class DebugInfoCommand(Command): name = 'debug info' description = 'Shows debug information.' def handle(self) -> int: poetry_python_version = '.'.join((str(s) for s in sys.version_info[:3])) self.line('') self.line('<b...
class DebugInfoCommand(Command): def handle(self) -> int: pass
2
0
17
2
15
0
1
0
1
2
0
0
1
0
1
6
21
3
18
7
16
0
11
7
9
1
2
0
1
12,727
sdispater/poetry
src/poetry/console/commands/debug/resolve.py
console.commands.debug.resolve.DebugResolveCommand
from cleo.helpers import option from typing import ClassVar from poetry.console.commands.show import ShowCommand from cleo.helpers import argument from poetry.console.commands.init import InitCommand from cleo.io.outputs.output import Verbosity class DebugResolveCommand(InitCommand): name = 'debug resolve' des...
class DebugResolveCommand(InitCommand): def handle(self) -> int: pass
2
0
107
29
76
2
13
0.02
1
7
5
0
1
1
1
17
132
32
98
34
89
2
74
34
65
13
3
4
13
12,728
sdispater/poetry
src/poetry/console/commands/debug/tags.py
console.commands.debug.tags.DebugTagsCommand
from poetry.console.commands.env_command import EnvCommand class DebugTagsCommand(EnvCommand): name = 'debug tags' description = "Shows compatible tags for your project's current active environment." def handle(self) -> int: for tag in self.env.get_supported_tags(): self.io.write_line(...
class DebugTagsCommand(EnvCommand): def handle(self) -> int: pass
2
0
8
0
8
0
2
0
1
1
0
0
1
0
1
4
12
1
11
5
9
0
7
5
5
2
2
1
2
12,729
sdispater/poetry
src/poetry/console/commands/env/activate.py
console.commands.env.activate.EnvActivateCommand
import shellingham from poetry.utils._compat import WINDOWS import shlex from poetry.console.commands.env_command import EnvCommand class EnvActivateCommand(EnvCommand): name = 'env activate' description = 'Print the command to activate a virtual environment.' def handle(self) -> int: from poetry....
class EnvActivateCommand(EnvCommand): def handle(self) -> int: pass def _get_activate_command(self, env: Env, shell: str) -> str: pass @staticmethod def _quote(command: str, shell: str) -> str: pass
5
0
14
1
13
0
5
0
1
5
3
0
2
0
3
6
49
6
43
12
37
0
34
9
29
9
2
2
15
12,730
sdispater/poetry
src/poetry/console/commands/env/activate.py
console.commands.env.activate.ShellNotSupportedError
class ShellNotSupportedError(Exception): """Raised when a shell doesn't have an activator in virtual environment"""
class ShellNotSupportedError(Exception): '''Raised when a shell doesn't have an activator in virtual environment''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
3
0
0
12,731
sdispater/poetry
src/poetry/console/commands/env/info.py
console.commands.env.info.EnvInfoCommand
from typing import ClassVar from cleo.helpers import option from poetry.console.commands.command import Command class EnvInfoCommand(Command): name = 'env info' description = 'Displays information about the current environment.' options: ClassVar[list[Option]] = [option('path', 'p', "Only display the envir...
class EnvInfoCommand(Command): def handle(self) -> int: pass def _display_complete_info(self, env: Env) -> None: pass
3
0
31
5
26
0
5
0
1
4
2
0
2
0
2
7
74
13
61
11
57
0
32
11
28
5
2
2
10
12,732
sdispater/poetry
src/poetry/console/commands/env/list.py
console.commands.env.list.EnvListCommand
from cleo.helpers import option from poetry.console.commands.command import Command from typing import ClassVar class EnvListCommand(Command): name = 'env list' description = 'Lists all virtualenvs associated with the current project.' options: ClassVar[list[Option]] = [option('full-path', None, 'Output th...
class EnvListCommand(Command): def handle(self) -> int: pass
2
0
19
6
13
0
4
0
1
3
1
0
1
0
1
6
27
8
19
10
16
0
17
10
14
4
2
2
4
12,733
sdispater/poetry
src/poetry/console/commands/env/remove.py
console.commands.env.remove.EnvRemoveCommand
from cleo.helpers import option from typing import ClassVar from cleo.helpers import argument from poetry.console.commands.command import Command class EnvRemoveCommand(Command): name = 'env remove' description = 'Remove virtual environments associated with the project.' arguments: ClassVar[list[Argument]]...
class EnvRemoveCommand(Command): def handle(self) -> int: pass
2
0
30
5
21
4
7
0.1
1
2
1
0
1
0
1
6
52
7
41
13
38
4
24
13
21
7
2
3
7
12,734
sdispater/poetry
src/poetry/console/commands/env/use.py
console.commands.env.use.EnvUseCommand
from typing import ClassVar from poetry.console.commands.command import Command from cleo.helpers import argument class EnvUseCommand(Command): name = 'env use' description = 'Activates or creates a new virtualenv for the current project.' arguments: ClassVar[list[Argument]] = [argument('python', 'The pyth...
class EnvUseCommand(Command): def handle(self) -> int: pass
2
0
15
6
9
0
2
0
1
2
1
0
1
1
1
6
23
8
15
7
12
0
13
7
10
2
2
1
2
12,735
sdispater/poetry
src/poetry/console/commands/env_command.py
console.commands.env_command.EnvCommand
from poetry.console.commands.command import Command class EnvCommand(Command): def __init__(self) -> None: self._env: Env | None = None super().__init__() @property def env(self) -> Env: assert self._env is not None return self._env def set_env(self, env: Env) -> None...
class EnvCommand(Command): def __init__(self) -> None: pass @property def env(self) -> Env: pass def set_env(self, env: Env) -> None: pass
5
0
3
0
3
0
1
0.1
1
2
1
6
3
1
3
3
14
3
10
6
5
1
9
5
5
1
1
0
3
12,736
sdispater/poetry
src/poetry/console/commands/group_command.py
console.commands.group_command.GroupCommand
from poetry.console.commands.command import Command from cleo.helpers import option from poetry.console.exceptions import GroupNotFoundError from packaging.utils import NormalizedName from collections import defaultdict from packaging.utils import canonicalize_name class GroupCommand(Command): @staticmethod d...
class GroupCommand(Command): @staticmethod def _group_dependency_options() -> list[Option]: pass @property def non_optional_groups(self) -> set[str]: pass @property def default_group(self) -> str | None: ''' The default group to use when no group is specified. T...
13
3
14
1
11
2
2
0.16
1
5
1
2
6
0
7
12
108
13
82
20
69
13
33
15
25
6
2
3
15
12,737
sdispater/poetry
src/poetry/console/commands/init.py
console.commands.init.InitCommand
from typing import ClassVar from pathlib import Path from packaging.utils import canonicalize_name from poetry.utils.dependency_specification import RequirementsParser from poetry.utils.env.python import Python from cleo.helpers import option from tomlkit import inline_table from poetry.console.commands.env_command imp...
class InitCommand(Command): def __init__(self) -> None: pass def handle(self) -> int: pass def _init_pyproject(self, project_path: Path, allow_interactive: bool=True, layout_name: str='standard', readme_format: str='md', allow_layout_creation_on_empty: bool=False) -> int: pass ...
14
0
41
8
33
1
6
0.02
1
18
6
3
9
1
11
16
502
99
396
103
350
9
242
81
218
28
2
4
69
12,738
sdispater/poetry
src/poetry/console/commands/install.py
console.commands.install.InstallCommand
from poetry.plugins.plugin_manager import PluginManager from poetry.console.commands.installer_command import InstallerCommand from cleo.helpers import option from typing import ClassVar class InstallCommand(InstallerCommand): name = 'install' description = 'Installs the project dependencies.' options: Cla...
class InstallCommand(InstallerCommand): @property def activated_groups(self) -> set[NormalizedName]: pass @property def _alternative_sync_command(self) -> str: pass @property def _with_synchronization(self) -> bool: pass def handle(self) -> int: pass
8
0
34
4
28
2
5
0.05
1
9
2
2
4
0
4
24
211
28
175
22
165
8
71
18
64
13
4
2
18
12,739
sdispater/poetry
src/poetry/console/commands/installer_command.py
console.commands.installer_command.InstallerCommand
from poetry.console.commands.env_command import EnvCommand from poetry.console.commands.group_command import GroupCommand from poetry.utils.password_manager import PoetryKeyring class InstallerCommand(GroupCommand, EnvCommand): def __init__(self) -> None: self._installer: Installer | None = None s...
class InstallerCommand(GroupCommand, EnvCommand): def __init__(self) -> None: pass def reset_poetry(self) -> None: pass @property def installer(self) -> Installer: pass def set_installer(self, installer: Installer) -> None: pass def execute(self, io: IO) -> i...
7
0
4
0
3
0
1
0.06
2
4
2
6
5
1
5
20
24
6
17
8
10
1
16
7
10
1
3
0
5
12,740
sdispater/poetry
src/poetry/console/commands/lock.py
console.commands.lock.LockCommand
from cleo.helpers import option from typing import ClassVar from poetry.console.commands.installer_command import InstallerCommand class LockCommand(InstallerCommand): name = 'lock' description = 'Locks the project dependencies.' options: ClassVar[list[Option]] = [option('regenerate', None, 'Ignore existin...
class LockCommand(InstallerCommand): def handle(self) -> int: pass
2
0
4
1
3
0
1
0
1
1
0
1
1
0
1
21
30
6
24
7
22
0
9
7
7
1
4
0
1
12,741
sdispater/poetry
src/poetry/console/commands/new.py
console.commands.new.NewCommand
from typing import ClassVar from poetry.console.commands.init import InitCommand from cleo.helpers import option from cleo.helpers import argument class NewCommand(InitCommand): name = 'new' description = 'Creates a new Python project at <path>.' arguments: ClassVar[list[Argument]] = [argument('path', 'The...
class NewCommand(InitCommand): def handle(self) -> int: pass
2
0
32
5
24
3
6
0.05
1
4
0
0
1
0
1
17
75
7
65
8
62
3
17
8
14
6
3
1
6
12,742
sdispater/poetry
src/poetry/console/commands/publish.py
console.commands.publish.PublishCommand
from cleo.helpers import option from typing import ClassVar from poetry.console.commands.command import Command from pathlib import Path class PublishCommand(Command): name = 'publish' description = 'Publishes a package to a remote repository.' options: ClassVar[list[Option]] = [option('repository', 'r', '...
class PublishCommand(Command): def handle(self) -> int: pass
2
0
50
12
37
1
7
0.01
1
3
1
0
1
0
1
6
96
18
77
13
74
1
27
13
24
7
2
2
7
12,743
sdispater/poetry
src/poetry/console/commands/remove.py
console.commands.remove.RemoveCommand
from poetry.console.commands.installer_command import InstallerCommand from typing import Any from poetry.core.packages.dependency_group import MAIN_GROUP from packaging.utils import canonicalize_name from cleo.helpers import argument from cleo.helpers import option from typing import ClassVar from tomlkit.toml_documen...
class RemoveCommand(InstallerCommand): def handle(self) -> int: pass def _remove_packages(self, packages: list[str], standard_section: list[str], poetry_section: dict[str, Any], group_name: str) -> set[str]: pass
3
0
53
8
44
2
11
0.03
1
7
0
1
2
0
2
22
141
21
117
33
108
3
70
27
67
14
4
3
21
12,744
sdispater/poetry
src/poetry/console/commands/run.py
console.commands.run.RunCommand
from typing import ClassVar from poetry.console.commands.env_command import EnvCommand from poetry.utils._compat import WINDOWS from cleo.helpers import argument class RunCommand(EnvCommand): name = 'run' description = 'Runs a command in the appropriate environment.' arguments: ClassVar[list[Argument]] = [...
class RunCommand(EnvCommand): def handle(self) -> int: pass @property def _module(self) -> Module: pass def run_script(self, script: str | dict[str, str], args: list[str]) -> int: '''Runs an entry point script defined in the section ``[tool.poetry.scripts]``. When a sc...
6
1
18
4
12
2
3
0.16
1
5
0
0
4
0
4
7
83
19
55
22
48
9
42
21
36
6
2
2
11
12,745
sdispater/poetry
src/poetry/console/commands/search.py
console.commands.search.SearchCommand
from typing import ClassVar from poetry.console.commands.command import Command from cleo.helpers import argument class SearchCommand(Command): name = 'search' description = 'Searches for packages on remote repositories.' arguments: ClassVar[list[Argument]] = [argument('tokens', 'The tokens to search for.'...
class SearchCommand(Command): def handle(self) -> int: pass
2
0
37
7
30
0
6
0
1
3
0
0
1
0
1
6
45
9
36
12
34
0
23
12
21
6
2
3
6
12,746
sdispater/poetry
src/poetry/console/commands/self/add.py
console.commands.self.add.SelfAddCommand
from poetry.core.constraints.version import Version from poetry.console.commands.add import AddCommand from poetry.__version__ import __version__ from typing import ClassVar from poetry.console.commands.self.self_command import SelfCommand class SelfAddCommand(SelfCommand, AddCommand): name = 'self add' descri...
class SelfAddCommand(SelfCommand, AddCommand): @property def _hint_update_packages(self) -> str: pass
3
0
12
2
10
0
2
0
2
1
0
0
1
0
1
49
31
5
26
9
23
0
11
8
9
2
5
1
2
12,747
sdispater/poetry
src/poetry/console/commands/self/install.py
console.commands.self.install.SelfInstallCommand
from packaging.utils import canonicalize_name from poetry.core.packages.dependency_group import MAIN_GROUP from poetry.console.commands.install import InstallCommand from packaging.utils import NormalizedName from poetry.console.commands.self.self_command import SelfCommand from typing import ClassVar class SelfInstal...
class SelfInstallCommand(SelfCommand, InstallCommand): @property def activated_groups(self) -> set[NormalizedName]: pass @property def _alternative_sync_command(self) -> str: pass
5
0
2
0
2
0
1
0
2
2
0
1
2
0
2
38
26
4
22
9
17
0
9
7
6
1
5
0
2
12,748
sdispater/poetry
src/poetry/console/commands/self/lock.py
console.commands.self.lock.SelfLockCommand
from poetry.console.commands.self.self_command import SelfCommand from poetry.console.commands.lock import LockCommand class SelfLockCommand(SelfCommand, LockCommand): name = 'self lock' description = "Lock the Poetry installation's system requirements." help = f"The <c1>self lock</c1> command reads this P...
class SelfLockCommand(SelfCommand, LockCommand): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
33
11
1
10
4
9
0
4
4
3
0
5
0
0
12,749
sdispater/poetry
src/poetry/console/commands/self/remove.py
console.commands.self.remove.SelfRemoveCommand
from poetry.console.commands.remove import RemoveCommand from typing import ClassVar from poetry.console.commands.self.self_command import SelfCommand class SelfRemoveCommand(SelfCommand, RemoveCommand): name = 'self remove' description = "Remove additional packages from Poetry's runtime environment." opti...
class SelfRemoveCommand(SelfCommand, RemoveCommand): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
34
13
1
12
5
11
0
5
5
4
0
5
0
0
12,750
sdispater/poetry
src/poetry/console/commands/self/self_command.py
console.commands.self.self_command.SelfCommand
from poetry.core.packages.project_package import ProjectPackage from poetry.factory import Factory import typing from poetry.console.commands.installer_command import InstallerCommand from poetry.utils.helpers import directory from poetry.utils.env import SystemEnv from poetry.__version__ import __version__ from poetry...
class SelfCommand(InstallerCommand): @staticmethod def get_default_system_pyproject_file() -> Path: pass @property def system_pyproject(self) -> Path: pass def reset_env(self) -> None: pass @property def env(self) -> Env: pass @property def default_...
19
2
8
1
5
2
2
0.4
1
8
3
7
11
3
12
32
110
24
63
31
43
25
55
24
41
5
4
3
18
12,751
sdispater/poetry
src/poetry/console/commands/self/show/__init__.py
console.commands.self.show.SelfShowCommand
from poetry.console.commands.self.self_command import SelfCommand from poetry.console.commands.show import ShowCommand from typing import ClassVar from cleo.helpers import option class SelfShowCommand(SelfCommand, ShowCommand): name = 'self show' options: ClassVar[list[Option]] = [option('addons', None, 'List ...
class SelfShowCommand(SelfCommand, ShowCommand): @property def activated_groups(self) -> set[NormalizedName]: pass
3
0
6
1
5
0
2
0
2
3
0
0
1
0
1
44
26
4
22
8
19
0
10
7
8
2
5
1
2
12,752
sdispater/poetry
src/poetry/console/commands/self/show/plugins.py
console.commands.self.show.plugins.PluginPackage
import dataclasses @dataclasses.dataclass class PluginPackage: package: Package plugins: list[metadata.EntryPoint] = dataclasses.field(default_factory=list) application_plugins: list[metadata.EntryPoint] = dataclasses.field(default_factory=list) def append(self, entry_point: metadata.EntryPoint) -> No...
@dataclasses.dataclass class PluginPackage: def append(self, entry_point: metadata.EntryPoint) -> None: pass
3
0
13
2
11
0
3
0
0
4
2
0
1
0
1
1
20
3
17
8
13
0
13
8
9
3
0
1
3
12,753
sdispater/poetry
src/poetry/console/commands/self/show/plugins.py
console.commands.self.show.plugins.SelfShowPluginsCommand
from poetry.console.commands.self.self_command import SelfCommand class SelfShowPluginsCommand(SelfCommand): name = 'self show plugins' description = 'Shows information about the currently installed plugins.' help = 'The <c1>self show plugins</c1> command lists all installed Poetry plugins.\n\nPlugins can ...
class SelfShowPluginsCommand(SelfCommand): def _system_project_handle(self) -> int: pass
2
0
66
16
50
0
10
0
1
9
6
0
1
0
1
33
78
19
59
25
50
0
45
25
36
10
5
3
10
12,754
sdispater/poetry
src/poetry/console/commands/self/sync.py
console.commands.self.sync.SelfSyncCommand
from poetry.console.commands.self.install import SelfInstallCommand from typing import ClassVar class SelfSyncCommand(SelfInstallCommand): name = 'self sync' description = "Sync Poetry's own environment according to the locked packages (incl. addons) required by this Poetry installation." options: ClassVar...
class SelfSyncCommand(SelfInstallCommand): @property def _with_synchronization(self) -> bool: pass
3
0
2
0
2
0
1
0
1
1
0
0
1
0
1
39
23
3
20
7
17
0
7
6
5
1
6
0
1
12,755
sdispater/poetry
src/poetry/console/commands/self/update.py
console.commands.self.update.SelfUpdateCommand
from poetry.console.commands.self.self_command import SelfCommand from cleo.io.io import IO from cleo.helpers import option from cleo.helpers import argument from cleo.io.inputs.string_input import StringInput from poetry.console.commands.add import AddCommand from typing import ClassVar class SelfUpdateCommand(SelfCo...
class SelfUpdateCommand(SelfCommand): def _system_project_handle(self) -> int: pass
2
0
25
4
21
0
3
0
1
2
1
0
1
0
1
33
48
6
42
11
40
0
21
11
19
3
5
1
3
12,756
sdispater/poetry
src/poetry/console/commands/show.py
console.commands.show.ShowCommand
from packaging.utils import canonicalize_name import sys import json from cleo.helpers import option from poetry.console.commands.group_command import GroupCommand from cleo.helpers import argument from typing import ClassVar from poetry.console.commands.env_command import EnvCommand class ShowCommand(GroupCommand, En...
class ShowCommand(GroupCommand, EnvCommand): def handle(self) -> int: pass def _display_single_package_information(self, package: str, locked_repository: Repository) -> int: pass def _display_packages_information(self, locked_repository: Repository, root: ProjectPackage) -> int: ...
12
0
46
8
37
1
8
0.03
2
12
6
1
11
1
11
26
547
100
434
132
387
13
271
106
248
27
3
4
83
12,757
sdispater/poetry
src/poetry/console/commands/source/add.py
console.commands.source.add.SourceAddCommand
from poetry.console.commands.command import Command from poetry.repositories.repository_pool import Priority from cleo.helpers import argument from cleo.io.null_io import NullIO from poetry.config.source import Source from tomlkit.items import AoT from typing import ClassVar from cleo.helpers import option from typing ...
class SourceAddCommand(Command): def handle(self) -> int: pass
2
0
68
10
55
3
11
0.04
1
7
2
0
1
0
1
6
97
13
81
19
78
3
48
18
45
11
2
2
11
12,758
sdispater/poetry
src/poetry/console/commands/source/remove.py
console.commands.source.remove.SourceRemoveCommand
from poetry.console.commands.command import Command from typing import ClassVar from tomlkit.items import AoT from cleo.helpers import argument class SourceRemoveCommand(Command): name = 'source remove' description = 'Remove source configured for the project.' arguments: ClassVar[list[Argument]] = [argumen...
class SourceRemoveCommand(Command): def handle(self) -> int: pass
2
0
24
5
19
0
4
0
1
1
0
0
1
0
1
6
35
7
28
10
26
0
21
10
19
4
2
2
4
12,759
sdispater/poetry
src/poetry/console/commands/source/show.py
console.commands.source.show.SourceShowCommand
from typing import ClassVar from poetry.console.commands.command import Command from cleo.helpers import argument class SourceShowCommand(Command): name = 'source show' description = 'Show information about sources configured for the project.' arguments: ClassVar[list[Argument]] = [argument('source', 'Sour...
class SourceShowCommand(Command): def notify_implicit_pypi(self) -> None: pass def handle(self) -> int: pass
3
0
25
5
20
1
5
0.02
1
1
0
0
2
0
2
7
63
12
51
13
48
1
37
13
34
8
2
2
10
12,760
sdispater/poetry
src/poetry/console/commands/sync.py
console.commands.sync.SyncCommand
from typing import ClassVar from poetry.console.commands.install import InstallCommand class SyncCommand(InstallCommand): name = 'sync' description = "Update the project's environment according to the lockfile." options: ClassVar[list[Option]] = [opt for opt in InstallCommand.options if opt.name != 'sync']...
class SyncCommand(InstallCommand): @property def _with_synchronization(self) -> bool: pass
3
0
2
0
2
0
1
0
1
1
0
0
1
0
1
25
28
7
21
7
18
0
7
6
5
1
5
0
1
12,761
sdispater/poetry
src/poetry/console/commands/update.py
console.commands.update.UpdateCommand
from poetry.console.commands.installer_command import InstallerCommand from typing import ClassVar from cleo.helpers import argument from cleo.helpers import option class UpdateCommand(InstallerCommand): name = 'update' description = 'Update the dependencies as according to the <comment>pyproject.toml</> file....
class UpdateCommand(InstallerCommand): def handle(self) -> int: pass
2
0
14
3
10
1
2
0.03
1
1
0
0
1
0
1
21
42
6
35
8
33
1
16
8
14
2
4
1
2
12,762
sdispater/poetry
src/poetry/console/commands/version.py
console.commands.version.VersionCommand
from cleo.helpers import option from typing import Any from cleo.helpers import argument from tomlkit.toml_document import TOMLDocument from poetry.console.commands.command import Command from typing import ClassVar from poetry.core.version.exceptions import InvalidVersionError class VersionCommand(Command): name ...
class VersionCommand(Command): def handle(self) -> int: pass def increment_version(self, version: str, rule: str, next_phase: bool=False) -> Version: pass
3
0
36
4
32
0
9
0
1
6
0
0
2
0
2
7
105
13
92
18
86
0
51
16
47
11
2
3
18
12,763
sdispater/poetry
src/poetry/console/exceptions.py
console.exceptions.ConsoleMessage
import dataclasses @dataclasses.dataclass class ConsoleMessage: """ Representation of a console message, providing utilities for formatting text with tags, indentation, and sections. The ConsoleMessage class is designed to represent text messages that might be displayed in a console or terminal ou...
@dataclasses.dataclass class ConsoleMessage: ''' Representation of a console message, providing utilities for formatting text with tags, indentation, and sections. The ConsoleMessage class is designed to represent text messages that might be displayed in a console or terminal output. It provides fea...
7
1
7
1
6
0
2
0.29
0
1
0
0
4
0
4
4
45
9
28
13
17
8
23
8
17
4
0
1
9
12,764
sdispater/poetry
src/poetry/console/exceptions.py
console.exceptions.GroupNotFoundError
class GroupNotFoundError(PoetryConsoleError): pass
class GroupNotFoundError(PoetryConsoleError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
2
0
0
12,765
sdispater/poetry
src/poetry/console/exceptions.py
console.exceptions.PoetryConsoleError
from cleo.exceptions import CleoError class PoetryConsoleError(CleoError): pass
class PoetryConsoleError(CleoError): pass
1
0
0
0
0
0
0
0
1
0
0
2
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
12,766
sdispater/poetry
src/poetry/console/exceptions.py
console.exceptions.PoetryRuntimeError
from subprocess import CalledProcessError class PoetryRuntimeError(PoetryConsoleError): """ Represents a runtime error in the Poetry console application. """ def __init__(self, reason: str, messages: list[ConsoleMessage] | None=None, exit_code: int=1) -> None: super().__init__(reason) ...
class PoetryRuntimeError(PoetryConsoleError): ''' Represents a runtime error in the Poetry console application. ''' def __init__(self, reason: str, messages: list[ConsoleMessage] | None=None, exit_code: int=1) -> None: pass def write(self, io: IO) -> None: ''' Write the er...
8
4
17
2
12
3
3
0.27
1
9
2
0
5
2
6
6
110
16
74
29
54
20
42
15
35
8
2
2
18
12,767
sdispater/poetry
src/poetry/console/exceptions.py
console.exceptions.PrettyCalledProcessError
from dataclasses import InitVar from subprocess import CalledProcessError from poetry.utils._compat import decode import shlex import dataclasses @dataclasses.dataclass class PrettyCalledProcessError: """ Represents a formatted and decorated error object for a subprocess call. This class is used to encaps...
@dataclasses.dataclass class PrettyCalledProcessError: ''' Represents a formatted and decorated error object for a subprocess call. This class is used to encapsulate information about a `CalledProcessError`, providing additional context such as command output, errors, and helpful debugging messages....
3
1
19
0
19
0
2
0.56
0
4
1
0
1
0
1
1
46
4
27
9
25
15
14
9
12
2
0
0
2
12,768
sdispater/poetry
src/poetry/console/logging/formatters/builder_formatter.py
console.logging.formatters.builder_formatter.BuilderLogFormatter
import re from poetry.console.logging.formatters.formatter import Formatter class BuilderLogFormatter(Formatter): def format(self, msg: str) -> str: if msg.startswith('Building '): msg = re.sub('Building (.+)', ' - Building <info>\\1</info>', msg) elif msg.startswith('Built '): ...
class BuilderLogFormatter(Formatter): def format(self, msg: str) -> str: pass
2
0
15
1
14
0
5
0
1
1
0
0
1
0
1
22
16
1
15
2
13
0
8
2
6
5
5
1
5
12,769
sdispater/poetry
src/poetry/console/logging/formatters/formatter.py
console.logging.formatters.formatter.Formatter
from abc import abstractmethod from abc import ABC class Formatter(ABC): @abstractmethod def format(self, msg: str) -> str: ...
class Formatter(ABC): @abstractmethod def format(self, msg: str) -> str: pass
3
0
1
0
1
0
1
0
1
1
0
1
1
0
1
21
3
0
3
3
1
0
3
2
1
1
4
0
1
12,770
sdispater/poetry
src/poetry/console/logging/io_formatter.py
console.logging.io_formatter.IOFormatter
from typing import ClassVar from poetry.console.logging.formatters import FORMATTERS import logging import textwrap from poetry.console.logging.filters import POETRY_FILTER class IOFormatter(logging.Formatter): _colors: ClassVar[dict[str, str]] = {'error': 'fg=red', 'warning': 'fg=yellow', 'debug': 'debug', 'info'...
class IOFormatter(logging.Formatter): def format(self, record: LogRecord) -> str: pass
2
0
21
5
15
1
5
0.05
1
3
0
0
1
0
1
8
29
6
22
6
20
1
14
6
12
5
2
2
5
12,771
sdispater/poetry
src/poetry/console/logging/io_handler.py
console.logging.io_handler.IOHandler
import logging class IOHandler(logging.Handler): def __init__(self, io: IO) -> None: self._io = io super().__init__() def emit(self, record: LogRecord) -> None: try: msg = self.format(record) level = record.levelname.lower() err = level in ('warning...
class IOHandler(logging.Handler): def __init__(self, io: IO) -> None: pass def emit(self, record: LogRecord) -> None: pass
3
0
8
1
7
0
2
0
1
3
0
0
2
1
2
22
17
2
15
7
12
0
14
7
11
3
3
2
4
12,772
sdispater/poetry
src/poetry/exceptions.py
exceptions.PoetryError
class PoetryError(Exception): pass
class PoetryError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
12,773
sdispater/poetry
src/poetry/factory.py
factory.Factory
from poetry.core.constraints.version import parse_constraint from poetry.toml.file import TOMLFile from poetry.core.factory import Factory as BaseFactory from typing import cast from poetry.plugins.plugin_manager import PluginManager from poetry.core.constraints.version import Version from poetry.__version__ import __v...
class Factory(BaseFactory): ''' Factory class to create various elements needed by Poetry. ''' def create_poetry(self, cwd: Path | None=None, with_groups: bool=True, io: IO | None=None, disable_plugins: bool=False, disable_cache: bool=False) -> Poetry: pass @classmethod def create_...
10
1
60
13
46
1
11
0.04
1
24
12
0
1
0
5
5
312
69
234
79
199
9
163
57
149
25
1
4
53
12,774
sdispater/poetry
tests/repositories/fixtures/pypi.org/generate.py
generate.FileManager
from tests.helpers import FIXTURE_PATH_REPOSITORIES_PYPI import shutil import sys import os from typing import Callable from poetry.core.masonry.utils.helpers import normalize_file_permissions from pathlib import Path from poetry.repositories.pypi_repository import PyPiRepository from packaging.metadata import parse_em...
class FileManager: def __init__(self, pypi: PyPiRepository) -> None: pass @staticmethod def should_preserve_file_content_check(link: Link) -> Callable[[str], bool]: pass def sdist_check(filename: str) -> bool: pass def bdist_check(filename: str) -> bool: ...
10
0
20
3
17
0
2
0.02
0
9
2
0
5
1
6
6
154
28
123
36
113
3
72
27
63
6
0
5
18
12,775
sdispater/poetry
tests/repositories/fixtures/pypi.org/generate.py
generate.Project
import json from poetry.repositories.pypi_repository import PyPiRepository from pathlib import Path from functools import cached_property from tests.helpers import FIXTURE_PATH_REPOSITORIES_PYPI from typing import Any class Project: def __init__(self, name: str, releases: list[Release]): self.name = name ...
class Project: def __init__(self, name: str, releases: list[Release]): pass @property def filenames(self) -> list[str]: pass @property def files(self) -> list[ReleaseFileMetadata]: pass @property def versions(self) -> list[str]: pass @cached_property ...
14
0
10
2
8
0
2
0
0
8
3
0
7
2
8
8
92
22
70
31
54
0
46
24
37
5
0
2
16
12,776
sdispater/poetry
tests/repositories/fixtures/pypi.org/generate.py
generate.Release
from functools import cached_property import json from tests.helpers import FIXTURE_PATH_REPOSITORIES_PYPI from poetry.core.packages.package import Package from poetry.repositories.pypi_repository import PyPiRepository from typing import Any from pathlib import Path class Release: def __init__(self, name: str, ve...
class Release: def __init__(self, name: str, version: str, download_files: bool=True, stub: bool=True, preserved_files: list[str] | None=None): pass @cached_property def json_path(self) -> Path: pass @staticmethod def _finalise_file_item(data: dict[str, Any], files: list[ReleaseFil...
8
0
18
3
15
0
3
0
0
9
3
0
4
6
5
5
95
19
76
30
59
0
46
19
40
6
0
3
15
12,777
sdispater/poetry
tests/repositories/fixtures/pypi.org/generate.py
generate.ReleaseFileMetadata
from pathlib import Path import dataclasses import hashlib @dataclasses.dataclass class ReleaseFileMetadata: path: Path md5: str = dataclasses.field(init=False) sha256: str = dataclasses.field(init=False) def __post_init__(self) -> None: data = self.path.read_bytes() self.sha256 = hash...
@dataclasses.dataclass class ReleaseFileMetadata: def __post_init__(self) -> None: pass
3
0
4
0
4
0
1
0
0
0
0
0
1
0
1
1
9
1
8
5
6
0
8
5
6
1
0
0
1
12,778
sdispater/poetry
tests/repositories/fixtures/pypi.org/generate.py
generate._ReleaseFileCollection
from pathlib import Path class _ReleaseFileCollection: def __init__(self, locations: list[Path] | None=None) -> None: self.locations = locations or [RELEASE_FILE_LOCATIONS.dist, RELEASE_FILE_LOCATIONS.stubbed] def filename_exists(self, filename: str) -> bool: return any((location.joinpath(fil...
class _ReleaseFileCollection: def __init__(self, locations: list[Path] | None=None) -> None: pass def filename_exists(self, filename: str) -> bool: pass def find(self, filename: str) -> ReleaseFileMetadata | None: pass def list(self, location: Path | None=None) -> Iterator[R...
5
0
6
1
5
0
3
0
0
6
1
0
4
1
4
4
27
5
22
10
17
0
19
10
14
6
0
2
11
12,779
sdispater/poetry
tests/repositories/fixtures/pypi.org/generate.py
generate._ReleaseFileLocations
import dataclasses from pathlib import Path from tests.helpers import FIXTURE_PATH_DISTRIBUTIONS from tests.helpers import FIXTURE_PATH_REPOSITORIES_PYPI @dataclasses.dataclass(frozen=True) class _ReleaseFileLocations: dist: Path = dataclasses.field(default=FIXTURE_PATH_REPOSITORIES_PYPI.joinpath('dist')) mock...
@dataclasses.dataclass(frozen=True) class _ReleaseFileLocations: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
11
0
11
5
10
0
5
5
4
0
0
0
0
12,780
sdispater/poetry
src/poetry/inspection/info.py
inspection.info.PackageInfo
from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils.helpers import parse_requires from poetry.utils.helpers import extractall from poetry.core.factory import Factory from poetry.core.utils.helpers import temporary_directory from typing import Any import contextlib from pathlib import Path from p...
class PackageInfo: def __init__(self, *, name: str | None=None, version: str | None=None, summary: str | None=None, requires_dist: list[str] | None=None, requires_python: str | None=None, files: Sequence[Mapping[str, str]] | None=None, yanked: str | bool=False, cache_version: str | None=None) -> None: pas...
35
15
23
3
15
6
3
0.36
0
15
1
0
5
11
19
19
474
75
293
101
240
106
201
65
181
16
0
4
66
12,781
sdispater/poetry
src/poetry/inspection/info.py
inspection.info.PackageInfoError
from pathlib import Path class PackageInfoError(ValueError): def __init__(self, path: Path, *reasons: BaseException | str) -> None: reasons = (f'Unable to determine package info for path: {path!s}', *reasons) super().__init__('\n\n'.join((str(msg).strip() for msg in reasons if msg)))
class PackageInfoError(ValueError): def __init__(self, path: Path, *reasons: BaseException | str) -> None: pass
2
0
3
0
3
0
1
0
1
3
0
0
1
0
1
12
4
0
4
2
2
0
4
2
2
1
4
0
1
12,782
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.HTTPRangeRequestNotRespectedError
class HTTPRangeRequestNotRespectedError(LazyWheelUnsupportedError): """Raised when the remote server tells us that it supports byte ranges but does not respect a respective request."""
class HTTPRangeRequestNotRespectedError(LazyWheelUnsupportedError): '''Raised when the remote server tells us that it supports byte ranges but does not respect a respective request.''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
10
3
0
1
1
0
2
1
1
0
0
4
0
0
12,783
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.HTTPRangeRequestUnsupportedError
class HTTPRangeRequestUnsupportedError(LazyWheelUnsupportedError): """Raised when the remote server appears unable to support byte ranges."""
class HTTPRangeRequestUnsupportedError(LazyWheelUnsupportedError): '''Raised when the remote server appears unable to support byte ranges.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
4
0
0
12,784
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.InvalidWheelError
class InvalidWheelError(LazyWheelUnsupportedError): """Invalid (e.g. corrupt) wheel.""" def __init__(self, location: str, name: str) -> None: self.location = location self.name = name def __str__(self) -> str: return f'Wheel {self.name} located at {self.location} is invalid.'
class InvalidWheelError(LazyWheelUnsupportedError): '''Invalid (e.g. corrupt) wheel.''' def __init__(self, location: str, name: str) -> None: pass def __str__(self) -> str: pass
3
1
3
0
3
0
1
0.17
1
1
0
0
2
2
2
12
9
2
6
5
3
1
6
5
3
1
4
0
2
12,785
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.LazyFileOverHTTP
from requests.models import Response from tempfile import NamedTemporaryFile from contextlib import contextmanager from requests.status_codes import codes from requests.models import CONTENT_CHUNK_SIZE class LazyFileOverHTTP(ReadOnlyIOWrapper): """File-like object representing a fixed-length file over HTTP. T...
class LazyFileOverHTTP(ReadOnlyIOWrapper): '''File-like object representing a fixed-length file over HTTP. This uses HTTP range requests to lazily fetch the file's content into a temporary file. If such requests are not supported by the server, raises ``HTTPRangeRequestUnsupportedError`` in the ``__ent...
16
11
14
1
9
4
2
0.45
1
16
4
1
12
5
13
58
201
31
118
44
92
53
89
30
75
4
3
3
26
12,786
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.LazyWheelOverHTTP
from requests.status_codes import codes from urllib.parse import urlparse from requests.models import HTTPError from typing import ClassVar from requests.models import Response from zipfile import ZipFile import io from requests.models import CONTENT_CHUNK_SIZE import re class LazyWheelOverHTTP(LazyFileOverHTTP): ...
class LazyWheelOverHTTP(LazyFileOverHTTP): '''File-like object mapped to a ZIP file over HTTP. This uses HTTP range requests to lazily fetch the file's content, which should be provided as the first argument to a ``ZipFile``. ''' def read_metadata(self, name: str) -> bytes: '''Download and...
10
8
34
3
19
12
4
0.65
1
11
3
0
5
1
7
65
259
31
138
42
124
90
99
34
91
7
4
4
26
12,787
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.LazyWheelUnsupportedError
class LazyWheelUnsupportedError(Exception): """Raised when a lazy wheel is unsupported."""
class LazyWheelUnsupportedError(Exception): '''Raised when a lazy wheel is unsupported.''' pass
1
1
0
0
0
0
0
1
1
0
0
4
0
0
0
10
2
0
1
1
0
1
1
1
0
0
3
0
0
12,788
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.MergeIntervals
from bisect import bisect_left from bisect import bisect_right class MergeIntervals: """Stateful bookkeeping to merge interval graphs.""" def __init__(self, *, left: Iterable[int]=(), right: Iterable[int]=()) -> None: self._left = list(left) self._right = list(right) def __repr__(self) ->...
class MergeIntervals: '''Stateful bookkeeping to merge interval graphs.''' def __init__(self, *, left: Iterable[int]=(), right: pass def __repr__(self) -> str: pass def _merge(self, start: int, end: int, left: int, right: int) -> Iterator[tuple[int, int]]: '''Return an iterat...
5
3
12
1
7
4
2
0.61
0
8
0
0
4
2
4
4
52
7
28
16
19
17
21
12
16
4
0
2
7
12,789
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.ReadOnlyIOWrapper
from typing import IO from typing import Any class ReadOnlyIOWrapper(IO[bytes]): """Implement read-side ``IO[bytes]`` methods wrapping an inner ``IO[bytes]``. This wrapper is useful because Python currently does not distinguish read-only streams at the type level. """ def __init__(self, inner: IO...
class ReadOnlyIOWrapper(IO[bytes]): '''Implement read-side ``IO[bytes]`` methods wrapping an inner ``IO[bytes]``. This wrapper is useful because Python currently does not distinguish read-only streams at the type level. ''' def __init__(self, inner: IO[bytes]) -> None: pass def __ente...
27
12
4
0
2
1
1
0.52
1
11
0
1
23
1
23
45
113
28
56
33
24
29
48
25
24
1
2
0
23
12,790
sdispater/poetry
src/poetry/inspection/lazy_wheel.py
inspection.lazy_wheel.UnsupportedWheelError
class UnsupportedWheelError(LazyWheelUnsupportedError): """Unsupported wheel."""
class UnsupportedWheelError(LazyWheelUnsupportedError): '''Unsupported wheel.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
4
0
0
12,791
sdispater/poetry
src/poetry/installation/Installer.py
installation.Installer.Installer
from poetry.repositories import Repository from poetry.repositories.lockfile_repository import LockfileRepository from poetry.repositories.installed_repository import InstalledRepository from poetry.puzzle.transaction import Transaction from cleo.io.null_io import NullIO from packaging.utils import canonicalize_name fr...
class Installer: def __init__(self, io: IO, env: Env, package: ProjectPackage, locker: Locker, pool: RepositoryPool, config: Config, installed: InstalledRepository | None=None, executor: Executor | None=None, disable_cache: bool=False) -> None: pass @property def executor(self) -> Executor: ...
25
1
15
2
11
1
2
0.08
0
18
10
0
23
17
23
23
358
75
263
84
219
20
172
66
146
24
0
4
56
12,792
sdispater/poetry
src/poetry/installation/chef.py
installation.chef.Chef
import tempfile from pathlib import Path from poetry.core.utils.helpers import temporary_directory from poetry.utils.helpers import extractall from poetry.utils.isolated_build import isolated_builder class Chef: def __init__(self, artifact_cache: ArtifactCache, env: Env, pool: RepositoryPool) -> None: sel...
class Chef: def __init__(self, artifact_cache: ArtifactCache, env: Env, pool: RepositoryPool) -> None: pass def prepare(self, archive: Path, output_dir: Path | None=None, *, editable: bool=False, config_settings: Mapping[str, str | Sequence[str]] | None=None) -> Path: pass def _prepare(s...
8
0
15
2
14
0
2
0
0
9
3
1
5
3
6
6
98
14
84
42
54
0
37
18
29
4
0
3
12
12,793
sdispater/poetry
src/poetry/installation/chef.py
installation.chef.ChefError
class ChefError(Exception): ...
class ChefError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
1
0
1
1
1
0
2
1
1
0
3
0
0
12,794
sdispater/poetry
src/poetry/installation/chooser.py
installation.chooser.Chooser
from poetry.utils.helpers import get_highest_priority_hash_type from poetry.repositories.http_repository import HTTPRepository from poetry.utils.wheel import Wheel from typing import Any from poetry.config.config import PackageFilterPolicy from poetry.config.config import Config import re from poetry.console.exceptions...
class Chooser: ''' A Chooser chooses an appropriate release archive for packages. ''' def __init__(self, pool: RepositoryPool, env: Env, config: Config | None=None) -> None: pass def choose_for(self, package: Package) -> Link: ''' Return the url of the selected archive for...
7
3
46
6
36
5
5
0.15
0
17
8
0
6
5
6
6
285
39
214
58
196
33
111
45
104
10
0
3
32
12,795
sdispater/poetry
src/poetry/installation/executor.py
installation.executor.Executor
from poetry.installation.operations import Update from poetry.utils.helpers import remove_directory from poetry.installation.operations import Install from poetry.vcs.git import Git from poetry.installation.chef import Chef import json from poetry.utils.log_utils import format_build_wheel_log from subprocess import Cal...
class Executor: def __init__(self, env: Env, pool: RepositoryPool, config: Config, io: IO, parallel: bool | None=None, disable_cache: bool=False) -> None: pass @property def installations_count(self) -> int: pass @property def updates_count(self) -> int: pass @property ...
45
2
21
3
17
1
4
0.08
0
31
15
1
37
22
38
38
863
150
663
192
593
51
449
159
407
21
0
7
145
12,796
sdispater/poetry
src/poetry/installation/installer.py
installation.installer.Installer
from poetry.repositories import Repository from cleo.io.null_io import NullIO from poetry.repositories.lockfile_repository import LockfileRepository from poetry.puzzle.transaction import Transaction from poetry.installation.executor import Executor from poetry.repositories.installed_repository import InstalledRepositor...
class Installer: def __init__(self, io: IO, env: Env, package: ProjectPackage, locker: Locker, pool: RepositoryPool, config: Config, installed: InstalledRepository | None=None, executor: Executor | None=None, disable_cache: bool=False) -> None: pass @property def executor(self) -> Executor: ...
25
1
15
2
11
1
2
0.08
0
18
10
0
23
17
23
23
358
75
263
84
219
20
172
66
146
24
0
4
56
12,797
sdispater/poetry
src/poetry/installation/operations/install.py
installation.operations.install.Install
from poetry.installation.operations.operation import Operation class Install(Operation): def __init__(self, package: Package, reason: str | None=None, priority: int=0) -> None: super().__init__(reason, priority=priority) self._package = package @property def package(self) -> Package: ...
class Install(Operation): def __init__(self, package: Package, reason: str | None=None, priority: int=0) -> None: pass @property def package(self) -> Package: pass @property def job_type(self) -> str: pass def __str__(self) -> str: pass def __repr__(self) ...
8
0
4
0
4
0
1
0
1
3
0
0
5
1
5
34
27
5
22
11
12
0
12
7
6
1
5
0
5
12,798
sdispater/poetry
src/poetry/installation/operations/operation.py
installation.operations.operation.Operation
from abc import abstractmethod from abc import ABC class Operation(ABC): def __init__(self, reason: str | None=None, priority: float=0) -> None: self._reason = reason self._skipped = False self._skip_reason: str | None = None self._priority = priority @property @abstractme...
class Operation(ABC): def __init__(self, reason: str | None=None, priority: float=0) -> None: pass @property @abstractmethod def job_type(self) -> str: pass @property def reason(self) -> str | None: pass @property def skipped(self) -> bool: pass @pro...
18
0
3
0
2
0
1
0
1
3
0
4
9
4
9
29
41
10
31
21
15
0
25
15
15
1
4
0
9
12,799
sdispater/poetry
src/poetry/installation/operations/uninstall.py
installation.operations.uninstall.Uninstall
from poetry.installation.operations.operation import Operation class Uninstall(Operation): def __init__(self, package: Package, reason: str | None=None, priority: float=float('inf')) -> None: super().__init__(reason, priority=priority) self._package = package @property def package(self) -...
class Uninstall(Operation): def __init__(self, package: Package, reason: str | None=None, priority: float=float('inf')) -> None: pass @property def package(self) -> Package: pass @property def job_type(self) -> str: pass def __str__(self) -> str: pass def ...
8
0
5
0
4
0
1
0
1
3
0
0
5
1
5
34
30
5
25
14
12
0
12
7
6
1
5
0
5