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
19,300
iterative/dvc
dvc/repo/experiments/show.py
dvc.repo.experiments.show._DataNames
from collections.abc import Iterable, Iterator, Mapping from typing import TYPE_CHECKING, Any, Literal, NamedTuple, Optional, Union class _DataNames(NamedTuple): metrics: dict[str, dict[str, Any]] params: dict[str, dict[str, Any]] deps: set[str] @property def sorted_deps(self): return sort...
class _DataNames(NamedTuple): @property def sorted_deps(self): pass def update(self, other: '_DataNames'): pass def _update_d(d: dict[str, dict[str, Any]], other_d: Mapping[str, Mapping[str, Any]]): pass
5
0
8
0
7
0
2
0.11
1
4
0
0
2
0
2
2
24
3
19
8
12
2
15
5
11
3
1
2
5
19,301
iterative/dvc
dvc/repo/experiments/stash.py
dvc.repo.experiments.stash.ApplyStash
from dvc_objects.fs.utils import as_atomic import re from scmrepo.git import Stash from dvc.exceptions import DvcException from dvc.log import logger from contextlib import contextmanager from .refs import APPLY_HEAD, APPLY_STASH from dvc_objects.fs.local import localfs from typing import NamedTuple, Optional from coll...
class ApplyStash(Stash): @property def stash_revs(self) -> dict[str, ApplyStashEntry]: pass @classmethod def format_message(cls, head_rev: str, rev: str, name: Optional[str]=None) -> str: pass @contextmanager def preserve_workspace(self, rev: str, name: Optional[str]=None) -> I...
10
1
13
0
11
2
3
0.12
1
7
1
0
5
0
6
6
93
7
77
34
65
9
57
28
50
4
1
3
18
19,302
iterative/dvc
dvc/repo/experiments/stash.py
dvc.repo.experiments.stash.ApplyStashEntry
from typing import NamedTuple, Optional class ApplyStashEntry(NamedTuple): """Apply stash entry. stash_index: Stash index for this entry. Can be None if this commit is not pushed onto the stash ref. head_rev: HEAD Git commit prior to exp apply. rev: Applied experiment commit. name: Optiona...
class ApplyStashEntry(NamedTuple): '''Apply stash entry. stash_index: Stash index for this entry. Can be None if this commit is not pushed onto the stash ref. head_rev: HEAD Git commit prior to exp apply. rev: Applied experiment commit. name: Optional applied exp name. ''' pass
1
1
0
0
0
0
0
1.4
1
0
0
0
0
0
0
0
14
2
5
1
4
7
5
1
4
0
1
0
0
19,303
iterative/dvc
dvc/repo/experiments/stash.py
dvc.repo.experiments.stash.ExpStash
import re from scmrepo.git import Stash from collections.abc import Iterable, Iterator from typing import NamedTuple, Optional class ExpStash(Stash): MESSAGE_FORMAT = 'dvc-exp:{rev}:{baseline_rev}:{name}' MESSAGE_RE = re.compile('(?:commit: )dvc-exp:(?P<rev>[0-9a-f]+):(?P<baseline_rev>[0-9a-f]+):(?P<name>[^~^:...
class ExpStash(Stash): @property def stash_revs(self) -> dict[str, ExpStashEntry]: pass @classmethod def format_message(cls, rev: str, baseline_rev: str, name: Optional[str]=None, branch: Optional[str]=None) -> str: pass def remove_revs(self, stash_revs: Iterable[ExpStashEntry]): ...
6
1
12
0
12
0
3
0.02
1
5
1
0
2
0
3
3
50
3
46
21
34
1
18
13
14
3
1
2
8
19,304
iterative/dvc
dvc/repo/experiments/stash.py
dvc.repo.experiments.stash.ExpStashEntry
from typing import NamedTuple, Optional class ExpStashEntry(NamedTuple): """Experiment stash entry. stash_index: Stash index for this entry. Can be None if this commit is not pushed onto the stash ref. head_rev: HEAD Git commit to be checked out for this experiment. baseline_rev: Experiment ba...
class ExpStashEntry(NamedTuple): '''Experiment stash entry. stash_index: Stash index for this entry. Can be None if this commit is not pushed onto the stash ref. head_rev: HEAD Git commit to be checked out for this experiment. baseline_rev: Experiment baseline commit. branch: Optional branc...
1
1
0
0
0
0
0
1.33
1
0
0
0
0
0
0
0
16
2
6
1
5
8
6
1
5
0
1
0
0
19,305
iterative/dvc
dvc/repo/get.py
dvc.repo.get.GetDVCFileError
from dvc.exceptions import DvcException class GetDVCFileError(DvcException): def __init__(self): super().__init__('the given path is a DVC file, you must specify a data file or a directory')
class GetDVCFileError(DvcException): def __init__(self): pass
2
0
4
0
4
0
1
0
1
1
0
0
1
0
1
1
5
0
5
2
3
0
3
2
1
1
1
0
1
19,306
iterative/dvc
dvc/repo/index.py
dvc.repo.index.Index
from dvc.dependency import ParamsDependency from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union from collections.abc import Iterable, Iterator from itertools import chain from dvc.utils.objects import cached_property from dvc.fs import LocalFileSystem from collections import defaultdict class ...
class Index: def __init__(self, repo: 'Repo', stages: Optional[list['Stage']]=None, metrics: Optional[dict[str, list[str]]]=None, plots: Optional[dict[str, list[str]]]=None, params: Optional[dict[str, Any]]=None, artifacts: Optional[dict[str, Any]]=None, datasets: Optional[dict[str, list[dict[str, Any]]]]=None, d...
55
1
12
2
10
1
3
0.06
0
17
4
0
26
9
29
29
423
77
329
164
232
19
225
109
182
7
0
4
88
19,307
iterative/dvc
dvc/repo/index.py
dvc.repo.index.IndexView
from collections.abc import Iterable, Iterator from collections import defaultdict from dvc.utils.objects import cached_property from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union from functools import partial class IndexView: """Read-only view of Index.data using filtered stages.""" ...
class IndexView: '''Read-only view of Index.data using filtered stages.''' def __init__(self, index: Index, stage_infos: Iterable['StageInfo'], outs_filter: Optional[Callable[['Output'], bool]]): pass @property def repo(self) -> 'Repo': pass @property def deps(self) -> Iterator...
23
1
9
1
8
0
2
0.03
0
13
2
0
10
4
10
10
108
19
86
48
59
3
67
33
54
5
0
3
27
19,308
iterative/dvc
dvc/repo/index.py
dvc.repo.index._DataPrefixes
from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, Union class _DataPrefixes(NamedTuple): explicit: set['DataIndexKey'] recursive: set['DataIndexKey']
class _DataPrefixes(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
19,309
iterative/dvc
dvc/repo/metrics/__init__.py
dvc.repo.metrics.Metrics
class Metrics: def __init__(self, repo): self.repo = repo def show(self, *args, **kwargs): from dvc.repo.metrics.show import show return show(self.repo, *args, **kwargs) def diff(self, *args, **kwargs): from .diff import diff return diff(self.repo, *args, **kwargs)
class Metrics: def __init__(self, repo): pass def show(self, *args, **kwargs): pass def diff(self, *args, **kwargs): pass
4
0
3
1
3
0
1
0
0
0
0
0
3
1
3
3
13
4
9
7
3
0
9
7
3
1
0
0
3
19,310
iterative/dvc
dvc/repo/metrics/diff.py
dvc.repo.metrics.diff.DiffResult
from typing import TYPE_CHECKING, TypedDict, Union from dvc.utils.diff import diff as _diff_dict class DiffResult(TypedDict, total=False): errors: dict[str, Union[Exception, dict[str, Exception]]] diff: dict[str, dict[str, dict]]
class DiffResult(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
19,311
iterative/dvc
dvc/repo/metrics/show.py
dvc.repo.metrics.show.FileResult
from typing import TYPE_CHECKING, Any, Optional, TypedDict, Union class FileResult(TypedDict, total=False): data: Any error: Exception
class FileResult(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
19,312
iterative/dvc
dvc/repo/metrics/show.py
dvc.repo.metrics.show.Result
from typing import TYPE_CHECKING, Any, Optional, TypedDict, Union class Result(TypedDict, total=False): data: dict[str, FileResult] error: Exception
class Result(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
19,313
iterative/dvc
dvc/repo/params/__init__.py
dvc.repo.params.Params
class Params: def __init__(self, repo): self.repo = repo def show(self, *args, **kwargs): from .show import show return show(self.repo, *args, **kwargs) def diff(self, *args, **kwargs): from .diff import diff return diff(self.repo, *args, **kwargs)
class Params: def __init__(self, repo): pass def show(self, *args, **kwargs): pass def diff(self, *args, **kwargs): pass
4
0
3
1
3
0
1
0
0
0
0
0
3
1
3
3
13
4
9
7
3
0
9
7
3
1
0
0
3
19,314
iterative/dvc
dvc/repo/plots/__init__.py
dvc.repo.plots.NotAPlotError
from dvc.exceptions import DvcException class NotAPlotError(DvcException): def __init__(self, out): super().__init__(f"'{out}' is not a known plot. Use `dvc plots modify` to turn it into one.")
class NotAPlotError(DvcException): def __init__(self, out): pass
2
0
4
0
4
0
1
0
1
1
0
0
1
0
1
12
5
0
5
2
3
0
3
2
1
1
4
0
1
19,315
iterative/dvc
dvc/repo/plots/__init__.py
dvc.repo.plots.PlotMetricTypeError
from dvc.exceptions import DvcException class PlotMetricTypeError(DvcException): def __init__(self, file): super().__init__(f"'{file}' - file type error\nOnly JSON, YAML, CSV and TSV formats are supported.")
class PlotMetricTypeError(DvcException): def __init__(self, file): pass
2
0
5
0
5
0
1
0
1
1
0
0
1
0
1
12
6
0
6
2
4
0
3
2
1
1
4
0
1
19,316
iterative/dvc
dvc/repo/plots/__init__.py
dvc.repo.plots.Plots
from typing import TYPE_CHECKING, Any, Callable, Optional, Union from dvc.utils.objects import cached_property import os from dvc.utils import error_handler, errored_revisions from collections.abc import Iterator from functools import partial class Plots: def __init__(self, repo): self.repo = repo de...
class Plots: def __init__(self, repo): pass def collect(self, targets: Optional[list[str]]=None, revs: Optional[list[str]]=None, recursive: bool=False, onerror: Optional[Callable]=None, props: Optional[dict]=None) -> Iterator[dict]: '''Collects plots definitions and data sources. Gene...
12
1
24
3
17
5
3
0.28
0
10
2
0
7
1
8
8
204
28
137
58
99
39
79
32
65
6
0
3
25
19,317
iterative/dvc
dvc/repo/plots/__init__.py
dvc.repo.plots.PropsNotFoundError
from dvc.exceptions import DvcException class PropsNotFoundError(DvcException): pass
class PropsNotFoundError(DvcException): 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
19,318
iterative/dvc
dvc/repo/scm_context.py
dvc.repo.scm_context.SCMContext
from contextlib import contextmanager from typing import TYPE_CHECKING, Any, Optional, Union import logging from dvc.utils import relpath from dvc.utils.collections import ensure_list import shlex from dvc.log import logger from collections.abc import Iterable, Iterator class SCMContext: def __init__(self, scm: '...
class SCMContext: def __init__(self, scm: 'Base', config: Optional[dict[str, Any]]=None) -> None: pass def track_file(self, paths: Union[str, Iterable[str], None]=None) -> None: '''Track file to remind user to track new files or autostage later.''' pass @staticmethod def _make...
13
2
11
1
9
0
2
0.04
0
11
1
0
9
6
10
10
117
22
93
38
71
4
76
32
58
8
0
2
23
19,319
iterative/dvc
dvc/repo/stage.py
dvc.repo.stage.StageInfo
from typing import NamedTuple, Optional, Union class StageInfo(NamedTuple): stage: 'Stage' filter_info: Optional[str] = None
class StageInfo(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
2
2
0
3
2
2
0
1
0
0
19,320
iterative/dvc
dvc/repo/stage.py
dvc.repo.stage.StageLoad
from collections.abc import Iterable from dvc.ui import ui from typing import NamedTuple, Optional, Union from dvc.exceptions import NoOutputOrStageError, OutputDuplicationError, OutputNotFoundError from dvc.utils import as_posix, parse_target from dvc.log import logger import fnmatch class StageLoad: def __init_...
class StageLoad: def __init__(self, repo: 'Repo') -> None: pass @property def fs(self): pass @locked def add(self, single_stage: bool=False, fname: Optional[str]=None, validate: bool=True, force: bool=False, update_lock: bool=False, **stage_data): pass def create(self,...
19
9
19
2
12
6
3
0.47
0
13
8
0
14
1
15
15
308
43
182
98
106
85
120
45
93
8
0
3
39
19,321
iterative/dvc
dvc/rwlock.py
dvc.rwlock.RWLockFileCorruptedError
from .utils import relpath from .exceptions import DvcException class RWLockFileCorruptedError(DvcException): def __init__(self, path): super().__init__(f'Unable to read RWLock-file {relpath(path)!r}. JSON structure is corrupted')
class RWLockFileCorruptedError(DvcException): def __init__(self, path): pass
2
0
4
0
4
0
1
0
1
1
0
0
1
0
1
1
5
0
5
2
3
0
3
2
1
1
1
0
1
19,322
iterative/dvc
dvc/rwlock.py
dvc.rwlock.RWLockFileFormatError
from .exceptions import DvcException from .utils import relpath class RWLockFileFormatError(DvcException): def __init__(self, path): super().__init__(f'RWLock-file {relpath(path)!r} format error.')
class RWLockFileFormatError(DvcException): def __init__(self, path): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,323
iterative/dvc
dvc/scm.py
dvc.scm.CloneError
class CloneError(SCMError): pass
class CloneError(SCMError): 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
19,324
iterative/dvc
dvc/scm.py
dvc.scm.GitAuthError
class GitAuthError(SCMError): def __init__(self, reason: str) -> None: doc = 'See https://dvc.org/doc/user-guide/troubleshooting#git-auth' super().__init__(f'{reason}\n{doc}')
class GitAuthError(SCMError): def __init__(self, reason: str) -> None: pass
2
0
3
0
3
1
1
0.25
1
2
0
0
1
0
1
1
4
0
4
3
2
1
4
3
2
1
2
0
1
19,325
iterative/dvc
dvc/scm.py
dvc.scm.InvalidRemoteSCMRepo
class InvalidRemoteSCMRepo(SCMError): pass
class InvalidRemoteSCMRepo(SCMError): 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
19,326
iterative/dvc
dvc/scm.py
dvc.scm.NoSCMError
class NoSCMError(SCMError): def __init__(self): msg = "Only supported for Git repositories. If you're seeing this error in a Git repo, try updating the DVC configuration with `dvc config core.no_scm false`." super().__init__(msg)
class NoSCMError(SCMError): def __init__(self): pass
2
0
7
0
7
0
1
0
1
1
0
0
1
0
1
1
8
0
8
3
6
0
4
3
2
1
2
0
1
19,327
iterative/dvc
dvc/scm.py
dvc.scm.RevError
class RevError(SCMError): pass
class RevError(SCMError): 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
19,328
iterative/dvc
dvc/scm.py
dvc.scm.SCMError
from dvc.exceptions import DvcException class SCMError(DvcException): """Base class for source control management errors."""
class SCMError(DvcException): '''Base class for source control management errors.''' pass
1
1
0
0
0
0
0
1
1
0
0
5
0
0
0
0
2
0
1
1
0
1
1
1
0
0
1
0
0
19,329
iterative/dvc
dvc/scm.py
dvc.scm.TqdmGit
from dvc.progress import Tqdm class TqdmGit(Tqdm): BAR_FMT = '{desc}|{bar}|{postfix[info]}{n_fmt}/{total_fmt} [{elapsed}, {rate_fmt:>11}]' def __init__(self, *args, **kwargs): kwargs.setdefault('unit', 'obj') kwargs.setdefault('bar_format', self.BAR_FMT) super().__init__(*args, **kwarg...
class TqdmGit(Tqdm): def __init__(self, *args, **kwargs): pass def update_git(self, event: 'GitProgressEvent') -> None: pass
3
0
11
0
11
2
4
0.16
1
1
0
0
2
1
2
2
27
2
25
7
22
4
19
7
16
6
1
1
7
19,330
iterative/dvc
dvc/stage/__init__.py
dvc.stage.PipelineStage
from dvc.log import logger from typing import TYPE_CHECKING, Any, Optional, TypeVar, Union class PipelineStage(Stage): def __init__(self, *args, name: Optional[str]=None, **kwargs): super().__init__(*args, **kwargs) self.name = name self.cmd_changed = False self.tracked_vars: dict[...
class PipelineStage(Stage): def __init__(self, *args, name: Optional[str]=None, **kwargs): pass def __eq__(self, other): pass def __hash__(self) -> int: pass @property def addressing(self): pass def reload(self) -> Stage: pass def _status_stage(s...
11
0
4
0
3
0
1
0
1
7
1
0
9
3
9
76
43
11
32
16
19
0
31
15
19
2
2
1
12
19,331
iterative/dvc
dvc/stage/__init__.py
dvc.stage.RawData
from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Optional, TypeVar, Union @dataclass class RawData: parametrized: bool = False generated_from: Optional[str] = None
@dataclass class RawData: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
3
2
0
3
3
2
0
0
0
0
19,332
iterative/dvc
dvc/stage/__init__.py
dvc.stage.Stage
from contextlib import suppress from dvc.log import logger from dvc.utils.objects import cached_property from dvc.exceptions import CacheLinkError, CheckoutError, DvcException, MergeError from dvc.utils import relpath from .run import run_stage from .utils import check_circular_dependency, check_duplicated_arguments, c...
class Stage(params.StageParams): def __init__(self, repo, path=None, cmd=None, wdir=os.curdir, deps=None, outs=None, md5=None, locked=False, frozen=False, always_changed=False, stage_text=None, dvcfile=None, desc: Optional[str]=None, meta=None): pass @property def path(self) -> str: pass ...
102
7
8
1
7
0
2
0.05
1
23
10
1
63
14
67
67
659
114
522
231
359
25
370
143
291
10
1
4
158
19,333
iterative/dvc
dvc/stage/cache.py
dvc.stage.cache.RunCacheNotFoundError
from dvc.exceptions import CollectCacheError, DvcException class RunCacheNotFoundError(DvcException): def __init__(self, stage): super().__init__(f'No run-cache for {stage.addressing}')
class RunCacheNotFoundError(DvcException): def __init__(self, stage): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,334
iterative/dvc
dvc/stage/cache.py
dvc.stage.cache.RunCacheNotSupported
from dvc.exceptions import CollectCacheError, DvcException class RunCacheNotSupported(DvcException): pass
class RunCacheNotSupported(DvcException): 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
1
0
0
19,335
iterative/dvc
dvc/stage/cache.py
dvc.stage.cache.StageCache
from typing import TYPE_CHECKING, Optional from funcy import first from dvc.utils import dict_sha256, relpath from contextlib import contextmanager from dvc.config import RemoteConfigError from dvc.exceptions import CollectCacheError, DvcException import os from dvc import fs from dvc.log import logger class StageCach...
class StageCache: def __init__(self, repo): pass def _get_cache_dir(self, key): pass def _get_cache_path(self, key, value): pass def _load_cache(self, key, value): pass def _load_cache(self, key, value): pass def _create_stage(self, cache, wdir=None...
16
1
16
2
13
1
3
0.06
0
13
7
0
14
2
14
14
240
44
187
75
159
11
157
70
130
11
0
3
44
19,336
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.DataSourceChanged
from dvc.exceptions import DvcException class DataSourceChanged(DvcException): def __init__(self, path: str): super().__init__(f'data source changed: {path}')
class DataSourceChanged(DvcException): def __init__(self, path: str): pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,337
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.DuplicateStageName
from dvc.exceptions import DvcException class DuplicateStageName(DvcException): pass
class DuplicateStageName(DvcException): 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
1
0
0
19,338
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.InvalidStageName
from dvc.exceptions import DvcException class InvalidStageName(DvcException): def __init__(self): super().__init__('Stage name cannot contain punctuation characters.')
class InvalidStageName(DvcException): def __init__(self): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,339
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.MissingDataSource
from dvc.exceptions import DvcException class MissingDataSource(DvcException): def __init__(self, missing_files): assert len(missing_files) > 0 source = 'source' if len(missing_files) > 1: source += 's' msg = "missing data '{}': {}".format(source, ', '.join(missing_file...
class MissingDataSource(DvcException): def __init__(self, missing_files): pass
2
0
9
2
7
0
2
0
1
1
0
0
1
0
1
1
10
2
8
4
6
0
8
4
6
2
1
1
2
19,340
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageCmdFailedError
from dvc.exceptions import DvcException class StageCmdFailedError(DvcException): def __init__(self, cmd, status=None): msg = f'failed to run: {cmd}' if status is not None: msg += f', exited with {status}' super().__init__(msg)
class StageCmdFailedError(DvcException): def __init__(self, cmd, status=None): pass
2
0
5
0
5
0
2
0
1
1
0
0
1
0
1
1
6
0
6
3
4
0
6
3
4
2
1
1
2
19,341
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageCommitError
from dvc.exceptions import DvcException class StageCommitError(DvcException): pass
class StageCommitError(DvcException): 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
1
0
0
19,342
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageExternalOutputsError
from dvc.exceptions import DvcException class StageExternalOutputsError(DvcException): pass
class StageExternalOutputsError(DvcException): 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
1
0
0
19,343
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageFileAlreadyExistsError
from dvc.exceptions import DvcException class StageFileAlreadyExistsError(DvcException): pass
class StageFileAlreadyExistsError(DvcException): 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
1
0
0
19,344
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageFileBadNameError
from dvc.exceptions import DvcException class StageFileBadNameError(DvcException): pass
class StageFileBadNameError(DvcException): 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
1
0
0
19,345
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageFileDoesNotExistError
from dvc.exceptions import DvcException class StageFileDoesNotExistError(DvcException): DVC_IGNORED = 'is dvc-ignored' DOES_NOT_EXIST = 'does not exist' def __init__(self, fname, dvc_ignored=False): self.file = fname message = self.DVC_IGNORED if dvc_ignored else self.DOES_NOT_EXIST ...
class StageFileDoesNotExistError(DvcException): def __init__(self, fname, dvc_ignored=False): pass
2
0
4
0
4
0
2
0
1
1
0
0
1
1
1
1
8
1
7
6
5
0
7
6
5
2
1
0
2
19,346
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageFileIsNotDvcFileError
from dvc.exceptions import DvcException class StageFileIsNotDvcFileError(DvcException): def __init__(self, fname): from dvc.dvcfile import DVC_FILE_SUFFIX, is_dvc_file msg = f"'{fname}' is not a .dvc file" sname = fname + DVC_FILE_SUFFIX if is_dvc_file(sname): msg += f"...
class StageFileIsNotDvcFileError(DvcException): def __init__(self, fname): pass
2
0
10
3
7
0
2
0
1
1
0
0
1
0
1
1
11
3
8
5
5
0
8
5
5
2
1
1
2
19,347
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageNameUnspecified
from dvc.exceptions import DvcException class StageNameUnspecified(DvcException): def __init__(self, file): super().__init__(f'Stage name not provided.Please specify the name as: `{file.relpath}:stage_name`')
class StageNameUnspecified(DvcException): def __init__(self, file): pass
2
0
5
0
5
0
1
0
1
1
0
0
1
0
1
1
6
0
6
2
4
0
3
2
1
1
1
0
1
19,348
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageNotFound
from dvc.exceptions import DvcException class StageNotFound(DvcException, KeyError): def __init__(self, file, name): self.file = file.relpath self.name = name super().__init__(f"Stage '{self.name}' not found inside '{self.file}' file") def __str__(self): return self.msg
class StageNotFound(DvcException, KeyError): def __init__(self, file, name): pass def __str__(self): pass
3
0
4
0
3
1
1
0.29
2
1
0
0
2
2
2
15
10
1
7
5
4
2
7
5
4
1
5
0
2
19,349
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StagePathNotDirectoryError
from dvc.exceptions import DvcException class StagePathNotDirectoryError(DvcException): pass
class StagePathNotDirectoryError(DvcException): 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
1
0
0
19,350
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StagePathNotFoundError
from dvc.exceptions import DvcException class StagePathNotFoundError(DvcException): pass
class StagePathNotFoundError(DvcException): 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
1
0
0
19,351
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StagePathOutsideError
from dvc.exceptions import DvcException class StagePathOutsideError(DvcException): pass
class StagePathOutsideError(DvcException): 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
1
0
0
19,352
iterative/dvc
dvc/stage/exceptions.py
dvc.stage.exceptions.StageUpdateError
from dvc.exceptions import DvcException class StageUpdateError(DvcException): def __init__(self, path): super().__init__(f"update is not supported for '{path}' that is not an import.")
class StageUpdateError(DvcException): def __init__(self, path): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,353
iterative/dvc
dvc/stage/loader.py
dvc.stage.loader.SingleStageLoader
from dvc.log import logger from . import PipelineStage, Stage, loads_from from dvc import dependency, output from collections.abc import Mapping from .utils import fill_stage_dependencies, resolve_paths from typing import TYPE_CHECKING, Any, Optional from copy import deepcopy class SingleStageLoader(Mapping): def...
class SingleStageLoader(Mapping): def __init__(self, dvcfile: 'SingleStageFile', stage_data: dict[Any, str], stage_text: Optional[str]=None): pass def __getitem__(self, item): pass @classmethod def load_stage(cls, dvcfile: 'SingleStageFile', d: dict[str, Any], stage_text: Optional[str...
8
0
6
0
6
0
1
0.05
1
3
0
0
5
3
6
40
44
5
37
23
19
2
22
12
15
2
6
1
7
19,354
iterative/dvc
dvc/stage/loader.py
dvc.stage.loader.StageLoader
from funcy import get_in, lcat, once, project from dvc.log import logger from itertools import chain from collections.abc import Mapping from .params import StageParams from dvc.utils.objects import cached_property from . import PipelineStage, Stage, loads_from from .exceptions import StageNameUnspecified, StageNotFoun...
class StageLoader(Mapping): def __init__(self, dvcfile: 'ProjectFile', data, lockfile_data=None): pass @cached_property def lockfile_data(self) -> dict[str, Any]: pass @staticmethod def fill_from_lock(stage, lock_data=None): '''Fill values for params, checksums for outs and...
15
1
13
2
11
0
2
0.03
1
13
7
0
8
6
10
44
145
26
116
37
100
4
84
33
72
6
6
2
21
19,355
iterative/dvc
dvc/stage/params.py
dvc.stage.params.StageParams
class StageParams: PARAM_MD5 = 'md5' PARAM_CMD = 'cmd' PARAM_WDIR = 'wdir' PARAM_DEPS = 'deps' PARAM_OUTS = 'outs' PARAM_LOCKED = 'locked' PARAM_FROZEN = 'frozen' PARAM_META = 'meta' PARAM_ALWAYS_CHANGED = 'always_changed' PARAM_PARAMS = 'params' PARAM_METRICS = 'metrics' ...
class StageParams: pass
1
0
0
0
0
0
0
0.07
0
0
0
1
0
0
0
0
14
0
14
14
13
1
14
14
13
0
0
0
0
19,356
iterative/dvc
dvc/ui/__init__.py
dvc.ui.Console
from dvc.utils.objects import cached_property from collections.abc import Iterable, Iterator, Sequence from contextlib import contextmanager, nullcontext from typing import TYPE_CHECKING, Any, Callable, Optional, TextIO, Union class Console: def __init__(self, formatter: Optional[Formatter]=None, enable: bool=Fal...
null
27
2
14
1
12
0
2
0.04
0
16
3
0
18
3
20
20
307
47
252
126
141
9
113
53
75
7
0
3
41
19,357
iterative/dvc
dvc/ui/__init__.py
dvc.ui.Formatter
from typing import TYPE_CHECKING, Any, Callable, Optional, TextIO, Union class Formatter: def __init__(self, theme: Optional[dict]=None, defaults: Optional[dict]=None) -> None: from collections import defaultdict theme = theme or {'success': {'color': 'green', 'style': 'bold'}, 'warn': {'color': '...
class Formatter: def __init__(self, theme: Optional[dict]=None, defaults: Optional[dict]=None) -> None: pass def format(self, message: str, style: Optional[str]=None, **kwargs) -> str: pass
3
0
8
1
7
0
1
0
0
2
0
0
2
1
2
2
17
3
14
8
7
0
8
6
3
1
0
0
2
19,358
iterative/dvc
dvc/ui/_rich_progress.py
dvc.ui._rich_progress.DbDownloadProgress
from rich.progress import BarColumn, DownloadColumn, MofNCompleteColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn, TransferSpeedColumn class DbDownloadProgress(RichProgress): PROGRESS_COLS = (SpinnerColumn(), TextColumn('[progress.description]{task.description}'), TextColumn('[pr...
class DbDownloadProgress(RichProgress): def get_renderables(self): pass
2
0
6
0
6
0
4
0
1
0
0
0
1
1
1
2
19
1
18
7
16
0
9
7
7
4
2
1
4
19,359
iterative/dvc
dvc/ui/_rich_progress.py
dvc.ui._rich_progress.MofNCompleteColumnWithUnit
from rich.progress import BarColumn, DownloadColumn, MofNCompleteColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn, TransferSpeedColumn class MofNCompleteColumnWithUnit(MofNCompleteColumn): """Requires `task.fields[unit]` to be set.""" def render(self, task): ret = su...
class MofNCompleteColumnWithUnit(MofNCompleteColumn): '''Requires `task.fields[unit]` to be set.''' def render(self, task): pass
2
1
4
0
4
0
2
0.2
1
1
0
0
1
0
1
1
7
1
5
4
3
1
5
4
3
2
1
0
2
19,360
iterative/dvc
dvc/ui/_rich_progress.py
dvc.ui._rich_progress.RichProgress
from rich.progress import BarColumn, DownloadColumn, MofNCompleteColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn, TransferSpeedColumn class RichProgress(Progress): def clear_task(self, task): try: self.remove_task(task) except KeyError: p...
class RichProgress(Progress): def clear_task(self, task): pass
2
0
5
0
5
0
2
0
1
1
0
2
1
0
1
1
6
0
6
2
4
0
6
2
4
2
1
1
2
19,361
iterative/dvc
dvc/ui/_rich_progress.py
dvc.ui._rich_progress.RichTransferProgress
from rich.progress import BarColumn, DownloadColumn, MofNCompleteColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn, TransferSpeedColumn from funcy import split class RichTransferProgress(RichProgress): SUMMARY_COLS = (TextColumn('[magenta]{task.description}[bold green]'), MofNComp...
class RichTransferProgress(RichProgress): def get_renderables(self): pass
2
0
9
0
9
0
1
0
1
0
0
0
1
1
1
2
24
1
23
6
21
0
9
6
7
1
2
0
1
19,362
iterative/dvc
dvc/ui/pager.py
dvc.ui.pager.DvcPager
from rich.pager import Pager class DvcPager(Pager): def show(self, content: str) -> None: pager(content)
class DvcPager(Pager): def show(self, content: str) -> None: pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,363
iterative/dvc
dvc/updater.py
dvc.updater.Updater
from typing import TYPE_CHECKING, Optional from dvc.env import DVC_UPDATER_ENDPOINT import os import time from packaging import version from dvc.log import logger from dvc import PKG, __version__ class Updater: URL = 'https://updater.dvc.org' UPDATER_FILE = 'updater' TIMEOUT = 24 * 60 * 60 TIMEOUT_GET ...
class Updater: def __init__(self, tmp_dir, friendly=False, hardlink_lock=False): pass def _is_outdated_file(self): pass def _with_lock(self, func, action): pass def check(self): pass def _check(self): pass def fetch(self, detach=True): pass ...
13
0
13
2
11
0
2
0.02
0
4
2
0
10
3
11
11
162
30
132
53
103
2
92
42
70
4
0
2
23
19,364
iterative/dvc
dvc/utils/fs.py
dvc.utils.fs.BasePathNotInCheckedPathException
from dvc.exceptions import DvcException class BasePathNotInCheckedPathException(DvcException): def __init__(self, path, base_path): msg = f'Path: {path} does not overlap with base path: {base_path}' super().__init__(msg)
class BasePathNotInCheckedPathException(DvcException): def __init__(self, path, base_path): pass
2
0
3
0
3
0
1
0
1
1
0
0
1
0
1
1
4
0
4
3
2
0
4
3
2
1
1
0
1
19,365
iterative/dvc
dvc/utils/serialize/_common.py
dvc.utils.serialize._common.DumperFn
from typing import TYPE_CHECKING, Any, Callable, Optional, Protocol, TextIO, Union class DumperFn(Protocol): def __call__(self, path: 'StrPath', data: Any, fs: Optional['FileSystem']=None) -> Any: ...
class DumperFn(Protocol): def __call__(self, path: 'StrPath', data: Any, fs: Optional['FileSystem']=None) -> Any: pass
2
0
3
0
3
0
1
0
1
1
0
0
1
0
1
25
4
0
4
4
1
0
3
2
1
1
5
0
1
19,366
iterative/dvc
dvc/utils/serialize/_common.py
dvc.utils.serialize._common.DumpersFn
from typing import TYPE_CHECKING, Any, Callable, Optional, Protocol, TextIO, Union class DumpersFn(Protocol): def __call__(self, data: Any, stream: TextIO) -> Any: ...
class DumpersFn(Protocol): def __call__(self, data: Any, stream: TextIO) -> Any: pass
2
0
1
0
1
0
1
0
1
2
0
0
1
0
1
25
2
0
2
2
1
0
3
2
1
1
5
0
1
19,367
iterative/dvc
dvc/utils/serialize/_common.py
dvc.utils.serialize._common.EncodingError
class EncodingError(ParseError): """We could not read a file with the given encoding""" def __init__(self, path: 'StrPath', encoding: str): self.encoding = encoding super().__init__(path, f'is not valid {encoding}')
class EncodingError(ParseError): '''We could not read a file with the given encoding''' def __init__(self, path: 'StrPath', encoding: str): pass
2
1
3
0
3
0
1
0.25
1
2
0
0
1
1
1
13
6
1
4
3
2
1
4
3
2
1
5
0
1
19,368
iterative/dvc
dvc/utils/serialize/_common.py
dvc.utils.serialize._common.LoaderFn
from typing import TYPE_CHECKING, Any, Callable, Optional, Protocol, TextIO, Union class LoaderFn(Protocol): def __call__(self, path: 'StrPath', fs: Optional['FileSystem']=None) -> Any: ...
class LoaderFn(Protocol): def __call__(self, path: 'StrPath', fs: Optional['FileSystem']=None) -> Any: pass
2
0
1
0
1
0
1
0
1
1
0
0
1
0
1
25
2
0
2
2
1
0
3
2
1
1
5
0
1
19,369
iterative/dvc
dvc/utils/serialize/_common.py
dvc.utils.serialize._common.ModifierFn
from typing import TYPE_CHECKING, Any, Callable, Optional, Protocol, TextIO, Union from contextlib import AbstractContextManager, contextmanager class ModifierFn(Protocol): def __call__(self, path: 'StrPath', fs: Optional['FileSystem']=None) -> AbstractContextManager[dict]: ...
class ModifierFn(Protocol): def __call__(self, path: 'StrPath', fs: Optional['FileSystem']=None) -> AbstractContextManager[dict]: pass
2
0
3
0
3
0
1
0
1
2
0
0
1
0
1
25
4
0
4
4
1
0
3
2
1
1
5
0
1
19,370
iterative/dvc
dvc/utils/serialize/_common.py
dvc.utils.serialize._common.ParseError
from dvc.exceptions import DvcException class ParseError(DvcException): """Errors while parsing files""" def __init__(self, path: 'StrPath', message: str): from dvc.utils import relpath path = relpath(path) self.path = path super().__init__(f"unable to read: '{path}', {message}...
class ParseError(DvcException): '''Errors while parsing files''' def __init__(self, path: 'StrPath', message: str): pass
2
1
6
1
5
0
1
0.17
1
2
0
2
1
1
1
12
9
2
6
4
3
1
6
4
3
1
4
0
1
19,371
iterative/dvc
dvc/utils/serialize/_json.py
dvc.utils.serialize._json.JSONFileCorruptedError
from ._common import ParseError, _dump_data, _load_data, _modify_data class JSONFileCorruptedError(ParseError): def __init__(self, path): super().__init__(path, 'JSON file structure is corrupted')
class JSONFileCorruptedError(ParseError): def __init__(self, path): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
13
3
0
3
2
1
0
3
2
1
1
5
0
1
19,372
iterative/dvc
dvc/utils/serialize/_py.py
dvc.utils.serialize._py.PythonFileCorruptedError
from ._common import ParseError, _dump_data, _load_data, _modify_data class PythonFileCorruptedError(ParseError): def __init__(self, path, message='Python file structure is corrupted'): super().__init__(path, message)
class PythonFileCorruptedError(ParseError): def __init__(self, path, message='Python file structure is corrupted'): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,373
iterative/dvc
dvc/utils/serialize/_toml.py
dvc.utils.serialize._toml.TOMLFileCorruptedError
from ._common import ParseError, _dump_data, _load_data, _modify_data class TOMLFileCorruptedError(ParseError): def __init__(self, path): super().__init__(path, 'TOML file structure is corrupted')
class TOMLFileCorruptedError(ParseError): def __init__(self, path): pass
2
0
2
0
2
0
1
0
1
1
0
0
1
0
1
1
3
0
3
2
1
0
3
2
1
1
1
0
1
19,374
iterative/dvc
dvc/utils/serialize/_yaml.py
dvc.utils.serialize._yaml.YAMLError
from ._common import ParseError, _dump_data, _load_data, _modify_data class YAMLError(ParseError): pass
class YAMLError(ParseError): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
19,375
iterative/dvc
dvc/utils/serialize/_yaml.py
dvc.utils.serialize._yaml.YAMLFileCorruptedError
class YAMLFileCorruptedError(YAMLError): def __init__(self, path): super().__init__(path, 'YAML file structure is corrupted')
class YAMLFileCorruptedError(YAMLError): def __init__(self, path): pass
2
0
2
0
2
0
1
0
1
1
0
1
1
0
1
1
3
0
3
2
1
0
3
2
1
1
2
0
1
19,376
iterative/dvc
dvc/utils/strictyaml.py
dvc.utils.strictyaml.YAMLSyntaxError
from dvc.ui import ui from dvc.utils.serialize import EncodingError, YAMLFileCorruptedError, parse_yaml, parse_yaml_for_update from dvc.exceptions import PrettyDvcException from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar class YAMLSyntaxError(PrettyDvcException, YAMLFileCorruptedError): def __i...
class YAMLSyntaxError(PrettyDvcException, YAMLFileCorruptedError): def __init__(self, path: str, yaml_text: str, exc: Exception, rev: Optional[str]=None) -> None: pass def __pretty_exc__(self, **kwargs: Any) -> None: pass def prepare_linecol(mark: 'StreamMark') -> str: ...
6
0
16
2
14
1
3
0.07
2
5
0
0
2
5
2
15
71
11
58
31
43
4
42
23
35
10
5
2
17
19,377
iterative/dvc
dvc/utils/strictyaml.py
dvc.utils.strictyaml.YAMLValidationError
import typing from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar from dvc.utils.serialize import EncodingError, YAMLFileCorruptedError, parse_yaml, parse_yaml_for_update from dvc.exceptions import PrettyDvcException from dvc.ui import ui class YAMLValidationError(PrettyDvcException): def __init__(...
class YAMLValidationError(PrettyDvcException): def __init__(self, exc: 'MultipleInvalid', path: Optional[str]=None, text: Optional[str]=None, rev: Optional[str]=None) -> None: pass def _prepare_context(self, data: typing.Mapping) -> list[object]: pass def __pretty_exc__(self, **kwargs: A...
4
1
21
2
16
3
5
0.16
1
6
0
0
3
3
3
15
66
8
50
26
39
8
43
20
38
7
5
2
15
19,378
iterative/dvc
dvc/utils/table.py
dvc.utils.table.Table
from typing import TYPE_CHECKING, Any from rich.table import Table as RichTable class Table(RichTable): def add_column(self, *args: Any, collapse: bool=False, **kwargs: Any) -> None: super().add_column(*args, **kwargs) self.columns[-1].collapse = collapse def _calculate_column_widths(self, co...
class Table(RichTable): def add_column(self, *args: Any, collapse: bool=False, **kwargs: Any) -> None: pass def _calculate_column_widths(self, console: 'Console', options: 'ConsoleOptions') -> list[int]: '''Calculate the widths of each column, including padding, not including borders....
4
2
20
1
15
5
4
0.35
1
6
0
0
3
0
3
3
62
4
46
21
35
16
35
14
31
7
1
4
13
19,379
iterative/dvc
dvc/utils/threadpool.py
dvc.utils.threadpool.ThreadPoolExecutor
from itertools import islice from concurrent import futures from collections.abc import Iterable, Iterator from typing import Any, Callable, Optional, TypeVar class ThreadPoolExecutor(futures.ThreadPoolExecutor): def __init__(self, max_workers: Optional[int]=None, cancel_on_error: bool=False, **kwargs): s...
class ThreadPoolExecutor(futures.ThreadPoolExecutor): def __init__(self, max_workers: Optional[int]=None, cancel_on_error: bool=False, **kwargs): pass def imap_unordered(self, fn: Callable[..., _T], *iterables: Iterable[Any]) -> Iterator[_T]: '''Lazier version of map that does not preserve or...
5
1
8
1
7
1
2
0.12
1
10
0
0
3
1
3
3
33
5
25
18
13
3
18
11
13
3
1
2
6
19,380
saltstack/salt
saltstack_salt/doc/conf.py
conf.ReleasesTree
from sphinx.directives.other import TocTree class ReleasesTree(TocTree): option_spec = dict(TocTree.option_spec) def run(self): rst = super().run() entries = rst[0][0]['entries'][:] entries.sort(key=_normalize_version, reverse=True) rst[0][0]['entries'][:] = entries ret...
class ReleasesTree(TocTree): def run(self): pass
2
0
6
0
6
0
1
0
1
1
0
0
1
0
1
1
9
1
8
5
6
0
8
5
6
1
1
0
1
19,381
saltstack/salt
saltstack_salt/noxfile.py
noxfile.Recompress
import pathlib import tempfile import tarfile import gzip import shutil class Recompress: """ Helper class to re-compress a ``.tag.gz`` file to make it reproducible. """ def __init__(self, mtime): self.mtime = int(mtime) def tar_reset(self, tarinfo): """ Reset user, group,...
class Recompress: ''' Helper class to re-compress a ``.tag.gz`` file to make it reproducible. ''' def __init__(self, mtime): pass def tar_reset(self, tarinfo): ''' Reset user, group, mtime, and mode to create reproducible tar. ''' pass def recompre...
4
3
16
0
14
3
3
0.26
0
5
0
0
3
1
3
3
55
4
42
16
38
11
34
12
30
4
0
4
8
19,382
saltstack/salt
saltstack_salt/noxfile.py
noxfile.Tee
class Tee: """ Python class to mimic linux tee behaviour """ def __init__(self, first, second): self._first = first self._second = second def write(self, b): wrote = self._first.write(b) self._first.flush() self._second.write(b) self._second.flush() ...
class Tee: ''' Python class to mimic linux tee behaviour ''' def __init__(self, first, second): pass def write(self, b): pass def fileno(self): pass
4
1
3
0
3
0
1
0.27
0
0
0
0
3
2
3
3
17
3
11
7
7
3
11
7
7
1
0
0
3
19,383
saltstack/salt
saltstack_salt/.github/actions/ssh-tunnel/rtcforward.py
rtcforward.ProxyClient
import asyncio import json class ProxyClient: def __init__(self, args, channel): self.args = args self.channel = channel def start(self): self.channel.on('message')(self.on_message) def on_message(self, message): msg = json.loads(message) key = msg['key'] ...
class ProxyClient: def __init__(self, args, channel): pass def start(self): pass def on_message(self, message): pass @pc.on('datachannel') def on_channel(channel): pass async def finalize_connection(): pass async def h...
10
0
10
1
9
0
2
0.02
0
1
0
0
4
2
4
4
56
10
45
20
35
1
41
18
33
5
0
3
14
19,384
saltstack/salt
saltstack_salt/.github/actions/ssh-tunnel/rtcforward.py
rtcforward.ProxyConnection
class ProxyConnection: def __init__(self, pc, channel): self.pc = pc self.channel = channel
class ProxyConnection: def __init__(self, pc, channel): pass
2
0
3
0
3
0
1
0
0
0
0
0
1
2
1
1
4
0
4
4
2
0
4
4
2
1
0
0
1
19,385
saltstack/salt
saltstack_salt/.github/actions/ssh-tunnel/rtcforward.py
rtcforward.ProxyServer
import asyncio import json class ProxyServer: def __init__(self, args, channel): self.args = args self.channel = channel self.connections = {} async def start(self): @self.channel.on('message') def handle_message(message): asyncio.ensure_future(self.handle...
class ProxyServer: def __init__(self, args, channel): pass async def start(self): pass @self.channel.on('message') def handle_message(message): pass def handle_message(message): pass async def new_connection(self, reader, writer): ...
12
0
12
1
12
0
2
0.01
0
2
1
0
4
4
4
4
82
9
72
27
60
1
56
24
47
5
0
3
16
19,386
saltstack/salt
saltstack_salt/salt/__init__.py
salt.NaclImporter
import importlib import os import sys class NaclImporter: """ Import hook to force PyNaCl to perform dlopen on libsodium with the RTLD_DEEPBIND flag. This is to work around an issue where pyzmq does a dlopen with RTLD_GLOBAL which then causes calls to libsodium to resolve to tweetnacl when it's bee...
class NaclImporter: ''' Import hook to force PyNaCl to perform dlopen on libsodium with the RTLD_DEEPBIND flag. This is to work around an issue where pyzmq does a dlopen with RTLD_GLOBAL which then causes calls to libsodium to resolve to tweetnacl when it's been bundled with pyzmq. See: https:...
4
1
9
0
8
1
2
0.35
0
0
0
0
3
0
3
3
40
5
26
9
22
9
24
9
20
4
0
2
7
19,387
saltstack/salt
saltstack_salt/salt/_logging/handlers.py
salt._logging.handlers.DeferredStreamHandler
from collections import deque class DeferredStreamHandler(StreamHandler): """ This logging handler will store all the log records up to its maximum queue size at which stage the first messages stored will be dropped. Should only be used as a temporary logging handler, while the logging system is n...
class DeferredStreamHandler(StreamHandler): ''' This logging handler will store all the log records up to its maximum queue size at which stage the first messages stored will be dropped. Should only be used as a temporary logging handler, while the logging system is not fully configured. Once c...
5
2
9
0
7
2
2
0.81
1
1
0
0
4
2
4
30
57
8
27
10
22
22
26
10
21
4
5
3
9
19,388
saltstack/salt
saltstack_salt/salt/_logging/handlers.py
salt._logging.handlers.FileHandler
import logging.handlers import logging from salt._logging.mixins import ExcInfoOnLogLevelFormatMixin class FileHandler(ExcInfoOnLogLevelFormatMixin, logging.FileHandler): """ File handler which properly handles exc_info on a per handler basis """
class FileHandler(ExcInfoOnLogLevelFormatMixin, logging.FileHandler): ''' File handler which properly handles exc_info on a per handler basis ''' pass
1
1
0
0
0
0
0
3
2
0
0
0
0
0
0
31
4
0
1
1
0
3
1
1
0
0
5
0
0
19,389
saltstack/salt
saltstack_salt/salt/_logging/handlers.py
salt._logging.handlers.RotatingFileHandler
import logging import sys from salt._logging.mixins import ExcInfoOnLogLevelFormatMixin import logging.handlers class RotatingFileHandler(ExcInfoOnLogLevelFormatMixin, logging.handlers.RotatingFileHandler): """ Rotating file handler which properly handles exc_info on a per handler basis """ def handle...
class RotatingFileHandler(ExcInfoOnLogLevelFormatMixin, logging.handlers.RotatingFileHandler): ''' Rotating file handler which properly handles exc_info on a per handler basis ''' def handleError(self, record): ''' Override the default error handling mechanism Deal with log fil...
2
2
34
3
21
11
5
0.58
2
1
0
0
1
0
1
39
41
4
24
6
20
14
13
4
11
5
7
4
5
19,390
saltstack/salt
saltstack_salt/salt/_logging/handlers.py
salt._logging.handlers.StreamHandler
import logging import logging.handlers from salt._logging.mixins import ExcInfoOnLogLevelFormatMixin class StreamHandler(ExcInfoOnLogLevelFormatMixin, logging.StreamHandler): """ Stream handler which properly handles exc_info on a per handler basis """
class StreamHandler(ExcInfoOnLogLevelFormatMixin, logging.StreamHandler): ''' Stream handler which properly handles exc_info on a per handler basis ''' pass
1
1
0
0
0
0
0
3
2
0
0
1
0
0
0
26
4
0
1
1
0
3
1
1
0
0
4
0
0
19,391
saltstack/salt
saltstack_salt/salt/_logging/handlers.py
salt._logging.handlers.SysLogHandler
import logging import sys from salt._logging.mixins import ExcInfoOnLogLevelFormatMixin import logging.handlers class SysLogHandler(ExcInfoOnLogLevelFormatMixin, logging.handlers.SysLogHandler): """ Syslog handler which properly handles exc_info on a per handler basis """ def handleError(self, record)...
class SysLogHandler(ExcInfoOnLogLevelFormatMixin, logging.handlers.SysLogHandler): ''' Syslog handler which properly handles exc_info on a per handler basis ''' def handleError(self, record): ''' Override the default error handling mechanism for py3 Deal with syslog os errors w...
2
2
22
1
15
6
4
0.56
2
1
0
0
1
0
1
29
27
2
16
4
14
9
12
4
10
4
4
3
4
19,392
saltstack/salt
saltstack_salt/salt/_logging/handlers.py
salt._logging.handlers.WatchedFileHandler
from salt._logging.mixins import ExcInfoOnLogLevelFormatMixin import logging import logging.handlers class WatchedFileHandler(ExcInfoOnLogLevelFormatMixin, logging.handlers.WatchedFileHandler): """ Watched file handler which properly handles exc_info on a per handler basis """
class WatchedFileHandler(ExcInfoOnLogLevelFormatMixin, logging.handlers.WatchedFileHandler): ''' Watched file handler which properly handles exc_info on a per handler basis ''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
35
6
0
3
3
0
3
1
1
0
0
6
0
0
19,393
saltstack/salt
saltstack_salt/salt/_logging/impl.py
salt._logging.impl.SaltColorLogRecord
from salt.utils.textformat import TextFormat class SaltColorLogRecord(SaltLogRecord): def __init__(self, *args, **kwargs): SaltLogRecord.__init__(self, *args, **kwargs) reset = TextFormat('reset') clevel = LOG_COLORS['levels'].get(self.levelname, reset) cmsg = LOG_COLORS['msgs'].ge...
class SaltColorLogRecord(SaltLogRecord): def __init__(self, *args, **kwargs): pass
2
0
15
2
13
0
1
0
1
2
1
0
1
4
1
5
16
2
14
9
12
0
10
9
8
1
3
0
1
19,394
saltstack/salt
saltstack_salt/salt/_logging/impl.py
salt._logging.impl.SaltLogRecord
import logging class SaltLogRecord(logging.LogRecord): def __init__(self, *args, **kwargs): logging.LogRecord.__init__(self, *args, **kwargs) self.bracketname = f'[{str(self.name):<17}]' self.bracketlevel = f'[{str(self.levelname):<8}]' self.bracketprocess = f'[{str(self.process):>...
class SaltLogRecord(logging.LogRecord): def __init__(self, *args, **kwargs): pass
2
0
5
0
5
0
1
0
1
1
0
1
1
3
1
4
6
0
6
5
4
0
6
5
4
1
2
0
1
19,395
saltstack/salt
saltstack_salt/salt/_logging/impl.py
salt._logging.impl.SaltLoggingClass
from salt.exceptions import LoggingRuntimeError import sys import salt.defaults.exitcodes from salt._logging.mixins import LoggingMixinMeta import salt.utils.ctx import logging class SaltLoggingClass(LOGGING_LOGGER_CLASS, metaclass=LoggingMixinMeta): ONCECACHE = set() def __new__(cls, *args): """ ...
class SaltLoggingClass(LOGGING_LOGGER_CLASS, metaclass=LoggingMixinMeta): def __new__(cls, *args): ''' We override `__new__` in our logging logger class in order to provide some additional features like expand the module name padding if length is being used, and also some Unicode f...
4
1
70
8
52
10
11
0.2
2
14
1
0
3
0
3
17
213
26
158
43
132
31
94
21
90
11
3
3
32
19,396
saltstack/salt
saltstack_salt/salt/_logging/mixins.py
salt._logging.mixins.ExcInfoOnLogLevelFormatMixin
import logging import sys class ExcInfoOnLogLevelFormatMixin: """ Logging handler class mixin to properly handle including exc_info on a per logging handler basis """ def format(self, record): """ Format the log record to include exc_info if the handler is enabled for a specific log le...
class ExcInfoOnLogLevelFormatMixin: ''' Logging handler class mixin to properly handle including exc_info on a per logging handler basis ''' def format(self, record): ''' Format the log record to include exc_info if the handler is enabled for a specific log level ''' ...
2
2
60
5
33
23
8
0.76
0
2
0
5
1
1
1
1
65
6
34
6
32
26
23
6
21
8
0
2
8
19,397
saltstack/salt
saltstack_salt/salt/_logging/mixins.py
salt._logging.mixins.LoggingGarbageMixin
import logging class LoggingGarbageMixin: """ Simple mix-in class to add a garbage method to python's logging. """ def garbage(self, msg, *args, **kwargs): self.log(getattr(logging, 'GARBAGE', 5), msg, *args, **kwargs)
class LoggingGarbageMixin: ''' Simple mix-in class to add a garbage method to python's logging. ''' def garbage(self, msg, *args, **kwargs): pass
2
1
2
0
2
0
1
1
0
0
0
0
1
0
1
1
7
1
3
2
1
3
3
2
1
1
0
0
1
19,398
saltstack/salt
saltstack_salt/salt/_logging/mixins.py
salt._logging.mixins.LoggingMixinMeta
class LoggingMixinMeta(type): """ This class is called whenever a new instance of ``SaltLoggingClass`` is created. What this class does is check if any of the bases have a `trace()` or a `garbage()` method defined, if they don't we add the respective mix-ins to the bases. """ def __new...
class LoggingMixinMeta(type): ''' This class is called whenever a new instance of ``SaltLoggingClass`` is created. What this class does is check if any of the bases have a `trace()` or a `garbage()` method defined, if they don't we add the respective mix-ins to the bases. ''' def __new_...
2
1
18
0
18
0
9
0.37
1
6
3
1
1
0
1
14
28
2
19
4
17
7
19
4
17
9
2
3
9
19,399
saltstack/salt
saltstack_salt/salt/_logging/mixins.py
salt._logging.mixins.LoggingProfileMixin
import logging class LoggingProfileMixin: """ Simple mix-in class to add a trace method to python's logging. """ def profile(self, msg, *args, **kwargs): self.log(getattr(logging, 'PROFILE', 15), msg, *args, **kwargs)
class LoggingProfileMixin: ''' Simple mix-in class to add a trace method to python's logging. ''' def profile(self, msg, *args, **kwargs): pass
2
1
2
0
2
0
1
1
0
0
0
0
1
0
1
1
7
1
3
2
1
3
3
2
1
1
0
0
1