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,100 | iterative/dvc | dvc/commands/stage.py | dvc.commands.stage.CmdStageAdd | from dvc.utils.cli_parse import parse_params
import logging
from dvc.log import logger
from dvc.cli.command import CmdBase
class CmdStageAdd(CmdBase):
def run(self):
from dvc.repo import lock_repo
kwargs = vars(self.args)
kwargs.update({'cmd': parse_cmd(kwargs.pop('command')), 'params': pa... |
class CmdStageAdd(CmdBase):
def run(self):
pass | 2 | 0 | 20 | 3 | 17 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 24 | 21 | 3 | 18 | 5 | 15 | 0 | 13 | 5 | 10 | 2 | 5 | 2 | 2 |
19,101 | iterative/dvc | dvc/commands/stage.py | dvc.commands.stage.CmdStageList | from dvc.log import logger
from collections.abc import Iterable
from dvc.cli.command import CmdBase
from itertools import chain, filterfalse
class CmdStageList(CmdBase):
def _get_stages(self) -> Iterable['Stage']:
if self.args.all:
stages: list[Stage] = self.repo.index.stages
logge... |
class CmdStageList(CmdBase):
def _get_stages(self) -> Iterable['Stage']:
pass
def run(self):
pass
def log_error(relpath: str, exc: Exception):
pass | 4 | 0 | 11 | 2 | 8 | 1 | 2 | 0.09 | 1 | 7 | 1 | 0 | 2 | 0 | 2 | 25 | 30 | 6 | 22 | 9 | 17 | 2 | 19 | 9 | 14 | 2 | 5 | 1 | 5 |
19,102 | iterative/dvc | dvc/commands/status.py | dvc.commands.status.CmdDataStatus | from dvc.utils import format_link
from dvc.ui import ui
from dvc.log import logger
from dvc.exceptions import DvcException
from dvc.commands.data_sync import CmdDataBase
class CmdDataStatus(CmdDataBase):
STATUS_LEN = 20
STATUS_INDENT = '\t'
UP_TO_DATE_MSG = 'Data and pipelines are up to date.'
IN_SYNC_... |
class CmdDataStatus(CmdDataBase):
def _normalize(self, s):
pass
def _show(self, status, indent=0):
pass
def run(self):
pass | 4 | 0 | 23 | 4 | 19 | 0 | 5 | 0.02 | 1 | 5 | 1 | 0 | 3 | 0 | 3 | 27 | 80 | 14 | 65 | 16 | 60 | 1 | 48 | 16 | 43 | 8 | 6 | 2 | 16 |
19,103 | iterative/dvc | dvc/commands/studio.py | dvc.commands.studio.CmdStudioLogin | from dvc.commands.config import CmdConfig
from dvc.exceptions import DvcException
import os
class CmdStudioLogin(CmdConfig):
def run(self):
from dvc.env import DVC_STUDIO_URL
from dvc.ui import ui
from dvc.utils.studio import STUDIO_URL
from dvc_studio_client.auth import StudioAuth... |
class CmdStudioLogin(CmdConfig):
def run(self):
pass
def save_config(self, hostname, token):
pass | 3 | 0 | 28 | 4 | 25 | 0 | 3 | 0 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 37 | 58 | 8 | 50 | 17 | 42 | 0 | 31 | 15 | 23 | 4 | 7 | 2 | 6 |
19,104 | iterative/dvc | dvc/commands/studio.py | dvc.commands.studio.CmdStudioLogout | from funcy import get_in
from dvc.commands.config import CmdConfig
class CmdStudioLogout(CmdConfig):
def run(self):
from dvc.ui import ui
with self.config.edit('global') as conf:
if not get_in(conf, ['studio', 'token']):
ui.error_write("Not logged in to Studio. Log in w... |
class CmdStudioLogout(CmdConfig):
def run(self):
pass | 2 | 0 | 14 | 3 | 11 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 36 | 15 | 3 | 12 | 4 | 9 | 0 | 10 | 3 | 7 | 2 | 7 | 2 | 2 |
19,105 | iterative/dvc | dvc/commands/studio.py | dvc.commands.studio.CmdStudioToken | from funcy import get_in
from dvc.commands.config import CmdConfig
class CmdStudioToken(CmdConfig):
def run(self):
from dvc.ui import ui
conf = self.config.read('global')
token = get_in(conf, ['studio', 'token'])
if not token:
ui.error_write('Not logged in to Studio.')
... |
class CmdStudioToken(CmdConfig):
def run(self):
pass | 2 | 0 | 11 | 2 | 9 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 36 | 12 | 2 | 10 | 5 | 7 | 0 | 10 | 5 | 7 | 2 | 7 | 1 | 2 |
19,106 | iterative/dvc | dvc/commands/unprotect.py | dvc.commands.unprotect.CmdUnprotect | from dvc.exceptions import DvcException
from dvc.cli.command import CmdBase
from dvc.log import logger
class CmdUnprotect(CmdBase):
def run(self):
for target in self.args.targets:
try:
self.repo.unprotect(target)
except DvcException:
msg = f"failed t... |
class CmdUnprotect(CmdBase):
def run(self):
pass | 2 | 0 | 9 | 0 | 9 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 24 | 10 | 0 | 10 | 4 | 8 | 0 | 10 | 4 | 8 | 3 | 5 | 2 | 3 |
19,107 | iterative/dvc | dvc/commands/update.py | dvc.commands.update.CmdUpdate | from dvc.cli.command import CmdBase
from dvc.log import logger
from dvc.exceptions import DvcException
class CmdUpdate(CmdBase):
def run(self):
ret = 0
try:
self.repo.update(targets=self.args.targets, rev=self.args.rev, recursive=self.args.recursive, to_remote=self.args.to_remote, no_d... |
class CmdUpdate(CmdBase):
def run(self):
pass | 2 | 0 | 16 | 0 | 16 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 24 | 17 | 0 | 17 | 3 | 15 | 0 | 9 | 3 | 7 | 2 | 5 | 1 | 2 |
19,108 | iterative/dvc | dvc/commands/version.py | dvc.commands.version.CmdVersion | from dvc.ui import ui
from dvc.cli.command import CmdBaseNoRepo
class CmdVersion(CmdBaseNoRepo):
def run(self):
from dvc.info import get_dvc_info
from dvc.updater import notify_updates
dvc_info = get_dvc_info()
ui.write(dvc_info, force=True)
notify_updates()
return ... |
class CmdVersion(CmdBaseNoRepo):
def run(self):
pass | 2 | 0 | 9 | 2 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 26 | 10 | 2 | 8 | 5 | 4 | 0 | 8 | 5 | 4 | 1 | 6 | 0 | 1 |
19,109 | iterative/dvc | dvc/compare.py | dvc.compare.Column | class Column(list['CellT']):
pass | class Column(list['CellT']):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
19,110 | iterative/dvc | dvc/compare.py | dvc.compare.TabularData | from collections.abc import ItemsView, Iterable, Iterator, Mapping, MutableSequence, Sequence
from typing import TYPE_CHECKING, Any, Optional, Union, overload
from itertools import chain, repeat, zip_longest
from funcy import reraise
from operator import itemgetter
class TabularData(MutableSequence[Sequence['CellT']])... |
class TabularData(MutableSequence[Sequence['CellT']]):
def __init__(self, columns: Sequence[str], fill_value: Optional[str]=''):
pass
@property
def columns(self) -> list[Column]:
pass
def is_protected(self, col_name) -> bool:
pass
def protect(self, *col_names: str):
... | 37 | 0 | 7 | 0 | 6 | 0 | 2 | 0.03 | 1 | 23 | 1 | 0 | 32 | 4 | 32 | 77 | 247 | 44 | 200 | 93 | 150 | 5 | 161 | 75 | 125 | 13 | 7 | 4 | 72 |
19,111 | iterative/dvc | dvc/config.py | dvc.config.Config | from contextlib import contextmanager
import re
from dvc.exceptions import DvcException, NotDvcRepoError
import posixpath
from dvc.log import logger
from .utils.objects import cached_property
from typing import TYPE_CHECKING, Optional
import os
from functools import partial
import ntpath
class Config(dict):
"""Cla... |
class Config(dict):
'''Class that manages configuration files for a DVC repo.
Args:
dvc_dir (str): optional path to `.dvc` directory, that is used to
access repo-specific configs like .dvc/config and
.dvc/config.local.
validate (bool): optional flag to tell dvc if it sho... | 34 | 3 | 13 | 3 | 10 | 1 | 3 | 0.13 | 1 | 10 | 4 | 0 | 11 | 4 | 21 | 48 | 330 | 79 | 223 | 96 | 162 | 28 | 172 | 65 | 138 | 7 | 2 | 2 | 57 |
19,112 | iterative/dvc | dvc/config.py | dvc.config.ConfigError | from dvc.exceptions import DvcException, NotDvcRepoError
class ConfigError(DvcException):
"""DVC config exception."""
def __init__(self, msg):
super().__init__(f'config file error: {msg}') |
class ConfigError(DvcException):
'''DVC config exception.'''
def __init__(self, msg):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 1 | 1 | 0 | 2 | 1 | 0 | 1 | 1 | 5 | 1 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
19,113 | iterative/dvc | dvc/config.py | dvc.config.MachineConfigError | class MachineConfigError(ConfigError):
pass | class MachineConfigError(ConfigError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
19,114 | iterative/dvc | dvc/config.py | dvc.config.MachineNotFoundError | class MachineNotFoundError(MachineConfigError):
pass | class MachineNotFoundError(MachineConfigError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
19,115 | iterative/dvc | dvc/config.py | dvc.config.NoMachineError | class NoMachineError(MachineConfigError):
pass | class NoMachineError(MachineConfigError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
19,116 | iterative/dvc | dvc/config.py | dvc.config.NoRemoteError | class NoRemoteError(RemoteConfigError):
pass | class NoRemoteError(RemoteConfigError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
19,117 | iterative/dvc | dvc/config.py | dvc.config.RemoteConfigError | class RemoteConfigError(ConfigError):
pass | class RemoteConfigError(ConfigError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
19,118 | iterative/dvc | dvc/config.py | dvc.config.RemoteNotFoundError | class RemoteNotFoundError(RemoteConfigError):
pass | class RemoteNotFoundError(RemoteConfigError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
19,119 | iterative/dvc | dvc/config_schema.py | dvc.config_schema.ExpPath | class ExpPath(str):
__slots__ = ('def_path',)
def_path: str
def __new__(cls, string, def_path):
ret = super().__new__(cls, string)
ret.def_path = def_path
return ret | class ExpPath(str):
def __new__(cls, string, def_path):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 67 | 9 | 2 | 7 | 4 | 5 | 0 | 7 | 4 | 5 | 1 | 2 | 0 | 1 |
19,120 | iterative/dvc | dvc/config_schema.py | dvc.config_schema.FeatureSchema | from dvc.log import logger
from funcy import once, walk_values
from voluptuous import REMOVE_EXTRA, All, Any, Coerce, Exclusive, Invalid, Lower, Marker, Optional, Range, Schema
class FeatureSchema(Schema):
def __init__(self, schema, required=False):
super().__init__(schema, required=required, extra=REMOVE... |
class FeatureSchema(Schema):
def __init__(self, schema, required=False):
pass
@staticmethod
@once
def _log_deprecated(keys):
pass
def __call__(self, data):
pass | 6 | 0 | 5 | 0 | 4 | 0 | 2 | 0.06 | 1 | 1 | 0 | 0 | 2 | 0 | 3 | 3 | 19 | 2 | 16 | 10 | 10 | 1 | 14 | 9 | 10 | 2 | 1 | 1 | 5 |
19,121 | iterative/dvc | dvc/config_schema.py | dvc.config_schema.RelPath | class RelPath(str):
__slots__ = () | class RelPath(str):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
19,122 | iterative/dvc | dvc/dagascii.py | dvc.dagascii.AsciiCanvas | import os
class AsciiCanvas:
"""Class for drawing in ASCII.
Args:
cols (int): number of columns in the canvas. Should be > 1.
lines (int): number of lines in the canvas. Should be > 1.
"""
TIMEOUT = 10
def __init__(self, cols, lines):
assert cols > 1
assert lines >... |
class AsciiCanvas:
'''Class for drawing in ASCII.
Args:
cols (int): number of columns in the canvas. Should be > 1.
lines (int): number of lines in the canvas. Should be > 1.
'''
def __init__(self, cols, lines):
pass
def draw(self):
'''Draws ASCII canvas on the scr... | 7 | 6 | 18 | 2 | 11 | 5 | 3 | 0.57 | 0 | 5 | 0 | 0 | 6 | 3 | 6 | 6 | 122 | 21 | 65 | 19 | 58 | 37 | 59 | 19 | 52 | 11 | 0 | 3 | 19 |
19,123 | iterative/dvc | dvc/dagascii.py | dvc.dagascii.VertexViewer | class VertexViewer:
"""Class to define vertex box boundaries that will be accounted for during
graph building by grandalf.
Args:
name (str): name of the vertex.
"""
HEIGHT = 3
def __init__(self, name):
self._h = self.HEIGHT
self._w = len(name) + 2
@property
def... | class VertexViewer:
'''Class to define vertex box boundaries that will be accounted for during
graph building by grandalf.
Args:
name (str): name of the vertex.
'''
def __init__(self, name):
pass
@property
def h(self):
'''Height of the box.'''
pass
@prope... | 6 | 3 | 3 | 0 | 2 | 1 | 1 | 0.91 | 0 | 0 | 0 | 0 | 3 | 2 | 3 | 3 | 23 | 5 | 11 | 9 | 5 | 10 | 9 | 7 | 5 | 1 | 0 | 0 | 3 |
19,124 | iterative/dvc | dvc/data_cloud.py | dvc.data_cloud.DataCloud | from dvc_data.hashfile.db import get_index
from dvc.config import NoRemoteError, RemoteConfigError
from collections.abc import Iterable
from dvc_data.hashfile.transfer import TransferResult
from typing import TYPE_CHECKING, Optional
from dvc.log import logger
class DataCloud:
"""Class that manages dvc remotes.
... |
class DataCloud:
'''Class that manages dvc remotes.
Args:
repo (dvc.repo.Repo): repo instance that belongs to the repo that
we are working on.
Raises:
config.ConfigError: thrown when config has invalid format.
'''
def __init__(self, repo):
pass
def get_remo... | 13 | 4 | 22 | 1 | 19 | 2 | 3 | 0.14 | 0 | 9 | 4 | 0 | 12 | 1 | 12 | 12 | 289 | 29 | 228 | 94 | 157 | 32 | 119 | 41 | 99 | 8 | 0 | 3 | 34 |
19,125 | iterative/dvc | dvc/data_cloud.py | dvc.data_cloud.Remote | from dvc.utils.objects import cached_property
class Remote:
def __init__(self, name: str, path: str, fs: 'FileSystem', *, index=None, **config):
self.path = path
self.fs = fs
self.name = name
self.index = index
self.worktree: bool = config.pop('worktree', False)
sel... |
class Remote:
def __init__(self, name: str, path: str, fs: 'FileSystem', *, index=None, **config):
pass
@cached_property
def odb(self) -> 'HashFileDB':
pass
@cached_property
def legacy_odb(self) -> 'HashFileDB':
pass | 6 | 0 | 8 | 1 | 7 | 0 | 1 | 0 | 0 | 3 | 1 | 0 | 3 | 6 | 3 | 3 | 29 | 5 | 24 | 18 | 14 | 0 | 21 | 16 | 13 | 2 | 0 | 1 | 4 |
19,126 | iterative/dvc | dvc/database.py | dvc.database.Client | from dataclasses import dataclass
from dvc.log import logger
from dvc.exceptions import DvcException
from dvc.types import StrOrBytesPath
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
@dataclass
class Client:
engine: 'Engine'
def test_connection(self, onerror: Optional[Callable[[], Any]]=No... | @dataclass
class Client:
def test_connection(self, onerror: Optional[Callable[[], Any]]=None) -> None:
pass
def export(self, sql: 'Union[str, Selectable]', file: StrOrBytesPath, format: str='csv', progress=noop) -> None:
pass | 4 | 0 | 14 | 1 | 13 | 1 | 3 | 0.07 | 0 | 5 | 2 | 0 | 2 | 0 | 2 | 2 | 31 | 3 | 28 | 13 | 19 | 2 | 18 | 5 | 15 | 3 | 0 | 2 | 5 |
19,127 | iterative/dvc | dvc/database.py | dvc.database.Serializer | from dataclasses import dataclass
from dvc.types import StrOrBytesPath
@dataclass
class Serializer:
sql: 'Union[str, Selectable]'
con: 'Union[str, Connectable]'
chunksize: int = 10000
def to_csv(self, file: StrOrBytesPath, progress=noop):
import pandas as pd
idfs = pd.read_sql(self.sql... | @dataclass
class Serializer:
def to_csv(self, file: StrOrBytesPath, progress=noop):
pass
def to_json(self, file: StrOrBytesPath, progress=noop):
pass
def export(self, file: StrOrBytesPath, format: str='csv', progress=noop):
pass | 5 | 0 | 6 | 1 | 5 | 1 | 2 | 0.1 | 0 | 2 | 0 | 0 | 3 | 0 | 3 | 3 | 25 | 5 | 20 | 12 | 14 | 2 | 20 | 10 | 14 | 2 | 0 | 2 | 5 |
19,128 | iterative/dvc | dvc/dependency/base.py | dvc.dependency.base.Dependency | from dvc.exceptions import DvcException
from dvc.fs import download as fs_download
from dvc.output import Output
class Dependency(Output):
IS_DEPENDENCY = True
DoesNotExistError: type[DvcException] = DependencyDoesNotExistError
IsNotFileOrDirError: type[DvcException] = DependencyIsNotFileOrDirError
IsS... |
class Dependency(Output):
def workspace_status(self) -> dict[str, str]:
pass
def update(self, rev=None):
pass
def download(self, to, jobs=None):
pass
def save(self):
pass
def dumpd(self, **kwargs):
pass | 6 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 3 | 0 | 3 | 5 | 3 | 5 | 5 | 36 | 6 | 30 | 14 | 24 | 0 | 29 | 13 | 23 | 3 | 1 | 3 | 10 |
19,129 | iterative/dvc | dvc/dependency/base.py | dvc.dependency.base.DependencyDoesNotExistError | from dvc.exceptions import DvcException
class DependencyDoesNotExistError(DvcException):
def __init__(self, path):
msg = f"dependency '{path}' does not exist"
super().__init__(msg) |
class DependencyDoesNotExistError(DvcException):
def __init__(self, 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,130 | iterative/dvc | dvc/dependency/base.py | dvc.dependency.base.DependencyIsNotFileOrDirError | from dvc.exceptions import DvcException
class DependencyIsNotFileOrDirError(DvcException):
def __init__(self, path):
msg = f"dependency '{path}' is not a file or directory"
super().__init__(msg) |
class DependencyIsNotFileOrDirError(DvcException):
def __init__(self, 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,131 | iterative/dvc | dvc/dependency/base.py | dvc.dependency.base.DependencyIsStageFileError | from dvc.exceptions import DvcException
class DependencyIsStageFileError(DvcException):
def __init__(self, path):
super().__init__(f"DVC file '{path}' cannot be a dependency.") |
class DependencyIsStageFileError(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,132 | iterative/dvc | dvc/dependency/dataset.py | dvc.dependency.dataset.DatasetDependency | from dvc_data.hashfile.hash_info import HashInfo
from urllib.parse import urlparse
from .db import AbstractDependency
from funcy import compact, merge
from typing import TYPE_CHECKING, Any, ClassVar
from dvc.exceptions import DvcException
class DatasetDependency(AbstractDependency):
PARAM_DATASET = 'dataset'
D... |
class DatasetDependency(AbstractDependency):
def __init__(self, stage: 'Stage', p, info, *args, **kwargs):
pass
def __repr__(self):
pass
def __str__(self):
pass
@classmethod
def is_dataset(cls, p: str):
pass
@property
def protocol(self):
pass
... | 16 | 1 | 4 | 0 | 4 | 0 | 1 | 0.07 | 1 | 5 | 0 | 0 | 12 | 4 | 13 | 20 | 70 | 14 | 55 | 27 | 39 | 4 | 48 | 25 | 34 | 5 | 3 | 2 | 19 |
19,133 | iterative/dvc | dvc/dependency/db.py | dvc.dependency.db.AbstractDependency | from .base import Dependency
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional
class AbstractDependency(Dependency):
"""Dependency without workspace/fs/fs_path"""
def __init__(self, stage: 'Stage', info: dict[str, Any], *args, **kwargs):
self.repo: Repo = stage.repo
self.stag... |
class AbstractDependency(Dependency):
'''Dependency without workspace/fs/fs_path'''
def __init__(self, stage: 'Stage', info: dict[str, Any], *args, **kwargs):
pass
@property
def is_in_repo(self):
pass | 4 | 1 | 5 | 0 | 5 | 1 | 1 | 0.18 | 1 | 4 | 1 | 2 | 2 | 6 | 2 | 7 | 14 | 2 | 11 | 10 | 7 | 2 | 10 | 9 | 7 | 1 | 2 | 0 | 2 |
19,134 | iterative/dvc | dvc/dependency/db.py | dvc.dependency.db.DbDependency | from funcy import compact, log_durations
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional
from dvc.exceptions import DvcException
from dvc.log import logger
class DbDependency(AbstractDependency):
PARAM_CONNECTION = 'connection'
PARAM_DB = 'db'
PARAM_QUERY = 'query'
PARAM_TABLE = 'ta... |
class DbDependency(AbstractDependency):
def __init__(self, stage: 'Stage', info, *args, **kwargs):
pass
@property
def sql(self) -> Optional[str]:
pass
def __repr__(self):
pass
def __str__(self):
pass
def workspace_status(self):
pass
def status(se... | 12 | 2 | 5 | 0 | 5 | 0 | 1 | 0.07 | 1 | 5 | 0 | 0 | 10 | 2 | 10 | 17 | 77 | 14 | 61 | 37 | 40 | 4 | 45 | 27 | 31 | 3 | 3 | 2 | 13 |
19,135 | iterative/dvc | dvc/dependency/param.py | dvc.dependency.param.BadParamFileError | from dvc.exceptions import DvcException
class BadParamFileError(DvcException):
pass |
class BadParamFileError(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,136 | iterative/dvc | dvc/dependency/param.py | dvc.dependency.param.MissingParamsError | from dvc.exceptions import DvcException
class MissingParamsError(DvcException):
pass |
class MissingParamsError(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,137 | iterative/dvc | dvc/dependency/param.py | dvc.dependency.param.MissingParamsFile | from dvc.exceptions import DvcException
class MissingParamsFile(DvcException):
pass |
class MissingParamsFile(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,138 | iterative/dvc | dvc/dependency/param.py | dvc.dependency.param.ParamsDependency | from typing import TYPE_CHECKING, Any, Optional
import typing
from collections import defaultdict
from .base import Dependency
from dvc.utils.serialize import ParseError, load_path
import os
from dvc_data.hashfile.hash_info import HashInfo
class ParamsDependency(Dependency):
PARAM_PARAMS = 'params'
DEFAULT_PAR... |
class ParamsDependency(Dependency):
def __init__(self, stage, path, params=None, repo=None):
pass
def dumpd(self, **kwargs):
pass
def fill_values(self, values=None):
'''Load params values dynamically.'''
pass
def read_params(self, flatten: bool=True, **kwargs: typing... | 10 | 1 | 12 | 1 | 10 | 1 | 4 | 0.08 | 1 | 12 | 4 | 0 | 9 | 4 | 9 | 14 | 122 | 20 | 97 | 32 | 84 | 8 | 78 | 28 | 67 | 9 | 2 | 3 | 32 |
19,139 | iterative/dvc | dvc/dependency/param.py | dvc.dependency.param.ParamsIsADirectoryError | from dvc.exceptions import DvcException
class ParamsIsADirectoryError(DvcException):
pass |
class ParamsIsADirectoryError(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,140 | iterative/dvc | dvc/dependency/repo.py | dvc.dependency.repo.RepoDependency | from dvc.utils import as_posix
from copy import deepcopy
from typing import TYPE_CHECKING, Any, ClassVar, Optional, Union
from .base import Dependency
import voluptuous as vol
class RepoDependency(Dependency):
PARAM_REPO = 'repo'
PARAM_URL = 'url'
PARAM_REV = 'rev'
PARAM_REV_LOCK = 'rev_lock'
PARAM... |
class RepoDependency(Dependency):
def __init__(self, def_repo: dict[str, Any], stage: 'Stage', *args, **kwargs):
pass
def _parse_path(self, fs, fs_path):
pass
@property
def is_in_repo(self):
pass
def __str__(self):
pass
def workspace_status(self):
pas... | 17 | 0 | 8 | 1 | 7 | 0 | 2 | 0.04 | 1 | 12 | 2 | 0 | 13 | 3 | 14 | 19 | 147 | 28 | 115 | 53 | 93 | 5 | 91 | 49 | 73 | 6 | 2 | 2 | 29 |
19,141 | iterative/dvc | dvc/dvcfile.py | dvc.dvcfile.FileIsGitIgnored | from dvc.exceptions import DvcException
class FileIsGitIgnored(DvcException):
def __init__(self, path, pipeline_file=False):
super().__init__("{}'{}' is git-ignored.".format('bad DVC file name ' if pipeline_file else '', path)) |
class FileIsGitIgnored(DvcException):
def __init__(self, path, pipeline_file=False):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 7 | 0 | 7 | 2 | 5 | 0 | 3 | 2 | 1 | 2 | 1 | 0 | 2 |
19,142 | iterative/dvc | dvc/dvcfile.py | dvc.dvcfile.FileMixin | from dvc.utils import relpath
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Union
from dvc.stage.exceptions import StageFileBadNameError, StageFileDoesNotExistError, StageFileIsNotDvcFileError
import contextlib
import os
class FileMixin:
SCHEMA: Callable[[_T], _T]
def __init__(... |
class FileMixin:
def __init__(self, repo, path, verify=True, **kwargs):
pass
def __repr__(self):
pass
def __hash__(self):
pass
def __eq__(self, other):
pass
def __str__(self):
pass
@property
def relpath(self):
pass
def exists(self):
... | 21 | 0 | 4 | 0 | 3 | 0 | 1 | 0.13 | 0 | 9 | 3 | 3 | 16 | 3 | 17 | 17 | 87 | 21 | 61 | 28 | 39 | 8 | 52 | 26 | 32 | 3 | 0 | 1 | 21 |
19,143 | iterative/dvc | dvc/dvcfile.py | dvc.dvcfile.Lockfile | from dvc.stage import serialize
from dvc.utils.serialize import dump_yaml, modify_yaml
from dvc.stage.exceptions import StageFileBadNameError, StageFileDoesNotExistError, StageFileIsNotDvcFileError
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Union
from dvc.log import logger
class Lock... |
class Lockfile(FileMixin):
def _verify_filename(self):
pass
def _load(self, **kwargs: Any):
pass
def dump_dataset(self, dataset: dict):
pass
def dump_stages(self, stages, **kwargs):
pass
def dump_dataset(self, dataset: dict):
pass
def remove_stage(s... | 8 | 0 | 11 | 1 | 9 | 1 | 3 | 0.07 | 1 | 7 | 1 | 0 | 6 | 1 | 6 | 23 | 73 | 14 | 56 | 17 | 48 | 4 | 49 | 14 | 41 | 4 | 1 | 2 | 15 |
19,144 | iterative/dvc | dvc/dvcfile.py | dvc.dvcfile.ParametrizedDumpError | from dvc.exceptions import DvcException
class ParametrizedDumpError(DvcException):
pass |
class ParametrizedDumpError(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,145 | iterative/dvc | dvc/dvcfile.py | dvc.dvcfile.ProjectFile | from dvc.log import logger
from dvc.stage import serialize
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Union
from dvc.utils.collections import apply_diff
from dvc.utils.serialize import dump_yaml, modify_yaml
from dvc.utils.objects import cached_property
from dvc.exceptions import DvcE... |
class ProjectFile(FileMixin):
'''Abstraction for pipelines file, .yaml + .lock combined.'''
@property
def _lockfile(self):
pass
def _reset(self):
pass
def dump(self, stage, update_pipeline=True, update_lock=True, **kwargs):
'''Dumps given stage appropriately in the dvcfile... | 36 | 2 | 5 | 1 | 5 | 0 | 2 | 0.03 | 1 | 11 | 4 | 0 | 20 | 1 | 21 | 38 | 154 | 35 | 117 | 51 | 78 | 3 | 96 | 35 | 70 | 4 | 1 | 3 | 35 |
19,146 | iterative/dvc | dvc/dvcfile.py | dvc.dvcfile.SingleStageFile | from dvc.stage import serialize
from dvc.utils import relpath
from dvc.log import logger
from dvc.utils.serialize import dump_yaml, modify_yaml
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Union
class SingleStageFile(FileMixin):
from dvc.schema import COMPILED_SINGLE_STAGE_SCHEMA a... |
class SingleStageFile(FileMixin):
@property
def stage(self) -> 'Stage':
pass
@property
def stages(self) -> LOADER:
pass
def dump(self, stage, **kwargs) -> None:
'''Dumps given stage appropriately in the dvcfile.'''
pass
def dump_stages(self, stages, **kwargs) ... | 9 | 1 | 5 | 0 | 4 | 0 | 1 | 0.09 | 1 | 1 | 1 | 0 | 5 | 0 | 5 | 22 | 42 | 8 | 33 | 20 | 22 | 3 | 31 | 18 | 22 | 2 | 1 | 1 | 6 |
19,147 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.ArgumentDuplicationError | class ArgumentDuplicationError(DvcException):
"""Thrown if a file/directory is specified as a dependency/output more
than once.
Args:
path (str): path to the file/directory.
"""
def __init__(self, path):
assert isinstance(path, str)
super().__init__(f"file '{path}' is speci... | class ArgumentDuplicationError(DvcException):
'''Thrown if a file/directory is specified as a dependency/output more
than once.
Args:
path (str): path to the file/directory.
'''
def __init__(self, path):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1.25 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 12 | 11 | 2 | 4 | 2 | 2 | 5 | 4 | 2 | 2 | 1 | 4 | 0 | 1 |
19,148 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.ArtifactNotFoundError | from typing import TYPE_CHECKING, Optional
class ArtifactNotFoundError(DvcException):
"""Thrown if an artifact is not found in the DVC repo.
Args:
name (str): artifact name.
"""
def __init__(self, name: str, version: Optional[str]=None, stage: Optional[str]=None):
self.name = name
... |
class ArtifactNotFoundError(DvcException):
'''Thrown if an artifact is not found in the DVC repo.
Args:
name (str): artifact name.
'''
def __init__(self, name: str, version: Optional[str]=None, stage: Optional[str]=None):
pass | 2 | 1 | 12 | 1 | 11 | 0 | 2 | 0.33 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 12 | 19 | 3 | 12 | 11 | 5 | 4 | 7 | 6 | 5 | 2 | 4 | 0 | 2 |
19,149 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.BadMetricError | class BadMetricError(DvcException):
def __init__(self, paths):
super().__init__('the following metrics do not exist, are not metrics files or are malformed: {paths}'.format(paths=', '.join((f"'{path}'" for path in paths)))) | class BadMetricError(DvcException):
def __init__(self, paths):
pass | 2 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 8 | 0 | 8 | 2 | 6 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
19,150 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.CacheLinkError | from dvc.utils import format_link
class CacheLinkError(DvcException):
SUPPORT_LINK = 'See {} for more information.'.format(format_link('https://dvc.org/doc/user-guide/troubleshooting#cache-types'))
def __init__(self, fs_paths):
msg = "No possible cache link types for '{}'. {}".format(', '.join(fs_path... |
class CacheLinkError(DvcException):
def __init__(self, fs_paths):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0.1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 12 | 11 | 1 | 10 | 5 | 8 | 1 | 6 | 5 | 4 | 1 | 4 | 0 | 1 |
19,151 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.CheckoutError | class CheckoutError(DvcException):
def __init__(self, target_infos: list[str], result: dict):
from dvc.utils import error_link
self.target_infos = target_infos
self.result = result
targets = [str(t) for t in target_infos]
m = 'Checkout failed for following targets:\n{}\nIs y... | class CheckoutError(DvcException):
def __init__(self, target_infos: list[str], result: dict):
pass | 2 | 0 | 13 | 1 | 12 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 1 | 2 | 1 | 12 | 14 | 1 | 13 | 7 | 10 | 0 | 8 | 7 | 5 | 1 | 4 | 0 | 1 |
19,152 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.CheckoutErrorSuggestGit | class CheckoutErrorSuggestGit(DvcException):
def __init__(self, target):
super().__init__(f'Did you mean `git checkout {target}`?') | class CheckoutErrorSuggestGit(DvcException):
def __init__(self, target):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
19,153 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.CircularDependencyError | class CircularDependencyError(DvcException):
"""Thrown if a file/directory specified both as an output and as a
dependency.
Args:
dependency (str): path to the dependency.
"""
def __init__(self, dependency):
assert isinstance(dependency, str)
msg = "'{}' is specified as an ... | class CircularDependencyError(DvcException):
'''Thrown if a file/directory specified both as an output and as a
dependency.
Args:
dependency (str): path to the dependency.
'''
def __init__(self, dependency):
pass | 2 | 1 | 5 | 1 | 4 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 12 | 13 | 3 | 5 | 3 | 3 | 5 | 5 | 3 | 3 | 1 | 4 | 0 | 1 |
19,154 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.CollectCacheError | class CollectCacheError(DvcException):
pass | class CollectCacheError(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,155 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.ConfirmRemoveError | class ConfirmRemoveError(DvcException):
def __init__(self, path):
super().__init__(f'unable to remove {path!r} without a confirmation. Use `-f` to force.') | class ConfirmRemoveError(DvcException):
def __init__(self, path):
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,156 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.CyclicGraphError | class CyclicGraphError(DvcException):
def __init__(self, stages):
assert isinstance(stages, list)
stage_part = 'stage' if len(stages) == 1 else 'stages'
msg = 'Same item(s) are defined as both a dependency and an output in {stage_part}: {stage}.'
super().__init__(msg.format(stage_pa... | class CyclicGraphError(DvcException):
def __init__(self, stages):
pass | 2 | 0 | 13 | 0 | 13 | 0 | 2 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 12 | 14 | 0 | 14 | 4 | 12 | 0 | 6 | 4 | 4 | 2 | 4 | 0 | 2 |
19,157 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.DownloadError | class DownloadError(FileTransferError):
_METHOD = 'download' | class DownloadError(FileTransferError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
19,158 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.DvcException | class DvcException(Exception):
"""Base class for all dvc exceptions."""
def __init__(self, msg, *args):
assert msg
self.msg = msg
super().__init__(msg, *args) | class DvcException(Exception):
'''Base class for all dvc exceptions.'''
def __init__(self, msg, *args):
pass | 2 | 1 | 4 | 0 | 4 | 0 | 1 | 0.2 | 1 | 1 | 0 | 41 | 1 | 1 | 1 | 11 | 7 | 1 | 5 | 3 | 3 | 1 | 5 | 3 | 3 | 1 | 3 | 0 | 1 |
19,159 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.ETagMismatchError | class ETagMismatchError(DvcException):
def __init__(self, etag, cached_etag):
super().__init__(f"ETag mismatch detected when copying file to cache! (expected: '{etag}', actual: '{cached_etag}')") | class ETagMismatchError(DvcException):
def __init__(self, etag, cached_etag):
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,160 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.FileExistsLocallyError | import errno
class FileExistsLocallyError(FileExistsError, DvcException):
def __init__(self, path, hint=None):
import os.path
self.path = path
hint = '' if hint is None else f'. {hint}'
path_typ = 'directory' if os.path.isdir(path) else 'file'
msg = f"The {path_typ} '{path}... |
class FileExistsLocallyError(FileExistsError, DvcException):
def __init__(self, path, hint=None):
pass | 2 | 0 | 9 | 1 | 8 | 0 | 3 | 0 | 2 | 1 | 0 | 0 | 1 | 2 | 1 | 16 | 10 | 1 | 9 | 7 | 6 | 0 | 9 | 7 | 6 | 3 | 5 | 0 | 3 |
19,161 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.FileMissingError | class FileMissingError(DvcException):
def __init__(self, path, hint=None):
self.path = path
hint = '' if hint is None else f'. {hint}'
super().__init__(f"Can't find '{path}' neither locally nor on remote{hint}") | class FileMissingError(DvcException):
def __init__(self, path, hint=None):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 12 | 5 | 0 | 5 | 3 | 3 | 0 | 5 | 3 | 3 | 2 | 4 | 0 | 2 |
19,162 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.FileTransferError | class FileTransferError(DvcException):
_METHOD = 'transfer'
def __init__(self, amount):
self.amount = amount
super().__init__(f'{amount} files failed to {self._METHOD}') | class FileTransferError(DvcException):
def __init__(self, amount):
pass | 2 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 1 | 12 | 7 | 2 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 4 | 0 | 1 |
19,163 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.HTTPError | class HTTPError(DvcException):
def __init__(self, code, reason):
super().__init__(f"'{code} {reason}'") | class HTTPError(DvcException):
def __init__(self, code, reason):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
19,164 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.InitError | class InitError(DvcException):
pass | class InitError(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,165 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.InvalidArgumentError | class InvalidArgumentError(ValueError, DvcException):
"""Thrown if arguments are invalid."""
def __init__(self, msg, *args):
self.msg = msg
super().__init__(msg, *args) | class InvalidArgumentError(ValueError, DvcException):
'''Thrown if arguments are invalid.'''
def __init__(self, msg, *args):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.25 | 2 | 1 | 0 | 0 | 1 | 1 | 1 | 13 | 6 | 1 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
19,166 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.IsADirectoryError | class IsADirectoryError(DvcException):
"""Raised when a file operation is requested on a directory.""" | class IsADirectoryError(DvcException):
'''Raised when a file operation is requested on a directory.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
19,167 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.MergeError | class MergeError(DvcException):
pass | class MergeError(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,168 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.MoveNotDataSourceError | class MoveNotDataSourceError(DvcException):
"""Thrown when trying to move a file/directory that is not an output
in a data source stage.
Args:
path (str): path to the file/directory.
"""
def __init__(self, path):
msg = f'move is not permitted for stages that are not data sources. Y... | class MoveNotDataSourceError(DvcException):
'''Thrown when trying to move a file/directory that is not an output
in a data source stage.
Args:
path (str): path to the file/directory.
'''
def __init__(self, path):
pass | 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.56 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 16 | 2 | 9 | 3 | 7 | 5 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
19,169 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.NoOutputInExternalRepoError | class NoOutputInExternalRepoError(DvcException):
def __init__(self, path, external_repo_path, external_repo_url):
from dvc.utils import relpath
super().__init__(f"Output {relpath(path, external_repo_path)!r} not found in target repository '{external_repo_url}'") | class NoOutputInExternalRepoError(DvcException):
def __init__(self, path, external_repo_path, external_repo_url):
pass | 2 | 0 | 7 | 1 | 6 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 8 | 1 | 7 | 3 | 4 | 0 | 4 | 3 | 1 | 1 | 4 | 0 | 1 |
19,170 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.NoOutputOrStageError | class NoOutputOrStageError(DvcException):
"""
Raised when the target is neither an output nor a stage name in dvc.yaml
"""
def __init__(self, target, file):
super().__init__(f"'{target}' does not exist as an output or a stage name in '{file}'") | class NoOutputOrStageError(DvcException):
'''
Raised when the target is neither an output nor a stage name in dvc.yaml
'''
def __init__(self, target, file):
pass | 2 | 1 | 4 | 0 | 4 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 9 | 1 | 5 | 2 | 3 | 3 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
19,171 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.NoRemoteInExternalRepoError | class NoRemoteInExternalRepoError(DvcException):
def __init__(self, url):
super().__init__(f"No DVC remote is specified in target repository '{url}'.") | class NoRemoteInExternalRepoError(DvcException):
def __init__(self, url):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
19,172 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.NotDvcRepoError | class NotDvcRepoError(DvcException):
"""Thrown if a directory is not a DVC repo""" | class NotDvcRepoError(DvcException):
'''Thrown if a directory is not a DVC repo'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
19,173 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.OutputDuplicationError | class OutputDuplicationError(DvcException):
"""Thrown if a file/directory is specified as an output in more than one
stage.
Args:
output (unicode): path to the file/directory.
stages (list): list of paths to stages.
"""
def __init__(self, output: str, stages: set['Stage']):
... | class OutputDuplicationError(DvcException):
'''Thrown if a file/directory is specified as an output in more than one
stage.
Args:
output (unicode): path to the file/directory.
stages (list): list of paths to stages.
'''
def __init__(self, output: str, stages: set['Stage']):
... | 2 | 1 | 22 | 1 | 21 | 0 | 2 | 0.27 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 12 | 31 | 3 | 22 | 8 | 19 | 6 | 13 | 7 | 10 | 2 | 4 | 1 | 2 |
19,174 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.OutputNotFoundError | class OutputNotFoundError(DvcException):
"""Thrown if a file/directory is not found as an output in any pipeline.
Args:
output (unicode): path to the file/directory.
"""
def __init__(self, output, repo=None):
from dvc.utils import relpath
self.output = output
self.repo ... | class OutputNotFoundError(DvcException):
'''Thrown if a file/directory is not found as an output in any pipeline.
Args:
output (unicode): path to the file/directory.
'''
def __init__(self, output, repo=None):
pass | 2 | 1 | 8 | 1 | 7 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 12 | 15 | 3 | 8 | 5 | 5 | 4 | 6 | 5 | 3 | 1 | 4 | 0 | 1 |
19,175 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.OverlappingOutputPathsError | class OverlappingOutputPathsError(DvcException):
def __init__(self, parent, overlapping_out, message):
self.parent = parent
self.overlapping_out = overlapping_out
super().__init__(message) | class OverlappingOutputPathsError(DvcException):
def __init__(self, parent, overlapping_out, message):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 12 | 5 | 0 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 4 | 0 | 1 |
19,176 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.PathMissingError | class PathMissingError(DvcException):
default_msg = "The path '{}' does not exist in the target repository '{}' neither as a DVC output nor as a Git-tracked file."
default_msg_dvc_only = "The path '{}' does not exist in the target repository '{}' as an DVC output."
def __init__(self, path, repo, dvc_only=F... | class PathMissingError(DvcException):
def __init__(self, path, repo, dvc_only=False):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 12 | 13 | 1 | 12 | 6 | 10 | 0 | 7 | 6 | 5 | 2 | 4 | 0 | 2 |
19,177 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.PrettyDvcException | class PrettyDvcException(DvcException):
def __pretty_exc__(self, **kwargs):
"""Print prettier exception message.""" | class PrettyDvcException(DvcException):
def __pretty_exc__(self, **kwargs):
'''Print prettier exception message.'''
pass | 2 | 1 | 2 | 0 | 1 | 1 | 1 | 0.5 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 12 | 3 | 0 | 2 | 2 | 0 | 1 | 2 | 2 | 0 | 1 | 4 | 0 | 1 |
19,178 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.ReproductionError | class ReproductionError(DvcException):
pass | class ReproductionError(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,179 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.RevCollectionError | class RevCollectionError(DvcException):
"""Thrown if a revision failed to be collected.
Args:
rev (str): revision that failed (or "workspace").
"""
def __init__(self, rev):
self.rev = rev
super().__init__(f"Failed to collect '{rev}'") | class RevCollectionError(DvcException):
'''Thrown if a revision failed to be collected.
Args:
rev (str): revision that failed (or "workspace").
'''
def __init__(self, rev):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 12 | 10 | 2 | 4 | 3 | 2 | 4 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
19,180 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.StageNotFoundError | class StageNotFoundError(DvcException):
pass | class StageNotFoundError(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,181 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.StagePathAsOutputError | class StagePathAsOutputError(DvcException):
"""Thrown if directory that stage is going to be saved in is specified as
an output of another stage.
Args:
stage (Stage): a stage that is in some other stages output
output (str): an output covering the stage above
"""
def __init__(self,... | class StagePathAsOutputError(DvcException):
'''Thrown if directory that stage is going to be saved in is specified as
an output of another stage.
Args:
stage (Stage): a stage that is in some other stages output
output (str): an output covering the stage above
'''
def __init__(self, ... | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1.5 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 12 | 12 | 2 | 4 | 2 | 2 | 6 | 4 | 2 | 2 | 1 | 4 | 0 | 1 |
19,182 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.URLMissingError | class URLMissingError(DvcException):
def __init__(self, url):
super().__init__(f"The path '{url}' does not exist") | class URLMissingError(DvcException):
def __init__(self, url):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
19,183 | iterative/dvc | dvc/exceptions.py | dvc.exceptions.UploadError | class UploadError(FileTransferError):
_METHOD = 'upload' | class UploadError(FileTransferError):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
19,184 | iterative/dvc | dvc/fs/callbacks.py | dvc.fs.callbacks.RichCallback | from contextlib import ExitStack
from fsspec.callbacks import DEFAULT_CALLBACK, Callback
from dvc.utils.objects import cached_property
from typing import TYPE_CHECKING, BinaryIO, Optional, Union
class RichCallback(Callback):
def __init__(self, size: Optional[int]=None, value: int=0, progress: Optional['RichTransf... |
class RichCallback(Callback):
def __init__(self, size: Optional[int]=None, value: int=0, progress: Optional['RichTransferProgress']=None, desc: Optional[str]=None, bytes: bool=False, unit: Optional[str]=None, disable: bool=False, transient: bool=True) -> None:
pass
@cached_property
def progress(se... | 9 | 0 | 10 | 0 | 9 | 1 | 2 | 0.05 | 1 | 7 | 1 | 0 | 6 | 7 | 6 | 21 | 66 | 7 | 59 | 29 | 38 | 3 | 26 | 15 | 17 | 2 | 1 | 1 | 10 |
19,185 | iterative/dvc | dvc/fs/callbacks.py | dvc.fs.callbacks.TqdmCallback | from dvc.progress import Tqdm
from fsspec.callbacks import TqdmCallback as _TqdmCallback
from typing import TYPE_CHECKING, BinaryIO, Optional, Union
class TqdmCallback(_TqdmCallback):
def __init__(self, size: Optional[int]=None, value: int=0, progress_bar: Optional['tqdm']=None, tqdm_cls: Optional[type['tqdm']]=N... |
class TqdmCallback(_TqdmCallback):
def __init__(self, size: Optional[int]=None, value: int=0, progress_bar: Optional['tqdm']=None, tqdm_cls: Optional[type['tqdm']]=None, **tqdm_kwargs):
pass
def branched(self, path_1: 'Union[str, BinaryIO]', path_2: str, **kwargs):
pass | 3 | 0 | 9 | 0 | 9 | 0 | 2 | 0 | 1 | 4 | 0 | 1 | 2 | 1 | 2 | 2 | 19 | 1 | 18 | 12 | 8 | 0 | 9 | 5 | 6 | 2 | 1 | 1 | 4 |
19,186 | iterative/dvc | dvc/fs/data.py | dvc.fs.data.DataFileSystem | import os
from dvc.utils import as_posix
import functools
from dvc_objects.fs.base import FileSystem
class DataFileSystem(FileSystem):
protocol = 'local'
PARAM_CHECKSUM = 'md5'
def _prepare_credentials(self, **config):
return config
@functools.cached_property
def fs(self) -> '_DataFileSys... |
class DataFileSystem(FileSystem):
def _prepare_credentials(self, **config):
pass
@functools.cached_property
def fs(self) -> '_DataFileSystem':
pass
def getcwd(self):
pass
def isdvc(self, path, **kwargs):
pass
def from_os_path(self, path):
pass | 7 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 5 | 0 | 5 | 5 | 25 | 8 | 17 | 10 | 9 | 0 | 16 | 9 | 9 | 2 | 1 | 1 | 6 |
19,187 | iterative/dvc | dvc/fs/dvc.py | dvc.fs.dvc.DVCFileSystem | import functools
import os
from fsspec.spec import DEFAULT_CALLBACK, AbstractFileSystem
import posixpath
from dvc_objects.fs.base import AnyFSPath, FileSystem
import ntpath
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
class DVCFileSystem(FileSystem):
protocol = 'local'
PARAM_CHECKSUM = 'md5... |
class DVCFileSystem(FileSystem):
def _prepare_credentials(self, **config) -> dict[str, Any]:
pass
@functools.cached_property
def fs(self) -> '_DVCFileSystem':
pass
@property
def immutable(self):
pass
def getcwd(self):
pass
def _get(self, from_info: Union[A... | 18 | 0 | 6 | 0 | 5 | 0 | 1 | 0.03 | 1 | 8 | 1 | 0 | 12 | 0 | 12 | 12 | 87 | 14 | 71 | 37 | 36 | 2 | 34 | 16 | 20 | 2 | 1 | 1 | 15 |
19,188 | iterative/dvc | dvc/fs/dvc.py | dvc.fs.dvc._DVCFileSystem | from dvc_objects.fs.base import AnyFSPath, FileSystem
from fsspec.spec import DEFAULT_CALLBACK, AbstractFileSystem
from .data import DataFileSystem
from funcy import wrap_with
import posixpath
import functools
from collections import defaultdict, deque
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
fr... | null | 44 | 8 | 16 | 2 | 13 | 2 | 3 | 0.13 | 1 | 21 | 2 | 0 | 29 | 5 | 32 | 127 | 574 | 101 | 425 | 181 | 339 | 55 | 327 | 133 | 287 | 14 | 4 | 4 | 100 |
19,189 | iterative/dvc | dvc/fs/dvc_path.py | dvc.fs.dvc_path.DVCPath | from upath import UPath
from urllib.parse import urlsplit
class DVCPath(UPath):
@classmethod
def _transform_init_args(cls, args, protocol, storage_options):
if not args:
args = ('/',)
elif args and 'url' not in storage_options and (protocol in {'dvc+http', 'dvc+https', 'dvc+ssh'}):... |
class DVCPath(UPath):
@classmethod
def _transform_init_args(cls, args, protocol, storage_options):
pass
def __str__(self):
pass
def with_segments(self, *pathsegments):
pass | 5 | 0 | 10 | 0 | 9 | 1 | 2 | 0.1 | 1 | 2 | 0 | 0 | 2 | 0 | 3 | 3 | 34 | 2 | 29 | 11 | 24 | 3 | 22 | 9 | 18 | 4 | 1 | 2 | 7 |
19,190 | iterative/dvc | dvc/fs/git.py | dvc.fs.git.GitFileSystem | from . import FileSystem
from typing import TYPE_CHECKING, Any, Optional
import functools
class GitFileSystem(FileSystem):
"""Proxies the repo file access methods to Git objects"""
protocol = 'local'
PARAM_CHECKSUM = 'md5'
def __init__(self, path: Optional[str]=None, rev: Optional[str]=None, scm: Opti... |
class GitFileSystem(FileSystem):
'''Proxies the repo file access methods to Git objects'''
def __init__(self, path: Optional[str]=None, rev: Optional[str]=None, scm: Optional['Git']=None, trie: Optional['GitTrie']=None, **kwargs: Any) -> None:
pass
@functools.cached_property
def fs(self) -> 'F... | 9 | 1 | 6 | 0 | 5 | 0 | 1 | 0.03 | 1 | 3 | 0 | 0 | 6 | 0 | 6 | 6 | 46 | 9 | 36 | 20 | 18 | 1 | 18 | 11 | 9 | 1 | 1 | 0 | 6 |
19,191 | iterative/dvc | dvc/ignore.py | dvc.ignore.DvcIgnore | class DvcIgnore:
DVCIGNORE_FILE = '.dvcignore'
def __call__(self, root: str, dirs: list[str], files: list[str]) -> tuple[list[str], list[str]]:
raise NotImplementedError | class DvcIgnore:
def __call__(self, root: str, dirs: list[str], files: list[str]) -> tuple[list[str], list[str]]:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 0 | 0 | 1 |
19,192 | iterative/dvc | dvc/ignore.py | dvc.ignore.DvcIgnoreFilter | from itertools import chain, groupby, takewhile
from typing import TYPE_CHECKING, Any, Literal, NamedTuple, Optional, Union, overload
from dvc.fs import Schemes, localfs
from dvc.pathspec_math import PatternInfo, merge_patterns
from collections.abc import Iterable, Iterator
import os
from pygtrie import Trie
class Dvc... |
class DvcIgnoreFilter:
def __init__(self, fs: 'FileSystem', root_dir: str) -> None:
pass
def _get_key(self, path: str) -> tuple[str, ...]:
pass
def _update_trie(self, dirname: str, trie: Trie) -> None:
pass
def _update_trie(self, dirname: str, trie: Trie) -> None:
pa... | 23 | 0 | 16 | 1 | 14 | 1 | 3 | 0.04 | 0 | 11 | 3 | 0 | 16 | 4 | 16 | 16 | 265 | 37 | 220 | 81 | 189 | 8 | 151 | 69 | 132 | 5 | 0 | 3 | 50 |
19,193 | iterative/dvc | dvc/ignore.py | dvc.ignore.DvcIgnorePatterns | from typing import TYPE_CHECKING, Any, Literal, NamedTuple, Optional, Union, overload
from pathspec.patterns import GitWildMatchPattern
from itertools import chain, groupby, takewhile
from pathspec.util import normalize_file
from collections.abc import Iterable, Iterator
import re
from dvc.pathspec_math import PatternI... |
class DvcIgnorePatterns(DvcIgnore):
def __init__(self, pattern_list: Iterable[Union[PatternInfo, str]], dirname: str, sep: str) -> None:
pass
def keyfunc(item: tuple[str, bool, bool, PatternInfo]) -> tuple[bool, bool]:
pass
@classmethod
def from_file(cls, path: str, fs: 'F... | 19 | 0 | 11 | 2 | 8 | 0 | 2 | 0.06 | 1 | 7 | 0 | 0 | 9 | 5 | 10 | 11 | 121 | 27 | 90 | 35 | 76 | 5 | 74 | 32 | 61 | 5 | 1 | 2 | 27 |
19,194 | iterative/dvc | dvc/lock.py | dvc.lock.HardlinkLock | import os
from typing import Optional, Union
from datetime import timedelta
import flufl.lock
import hashlib
from dvc.progress import Tqdm
class HardlinkLock(flufl.lock.Lock, LockBase):
"""Class for DVC repo lock.
Args:
lockfile (str): the lock filename
in.
tmp_dir (str): a directo... |
class HardlinkLock(flufl.lock.Lock, LockBase):
'''Class for DVC repo lock.
Args:
lockfile (str): the lock filename
in.
tmp_dir (str): a directory to store claim files.
'''
def __init__(self, lockfile, tmp_dir=None, wait=False, **kwargs):
pass
def lock(self, tim... | 4 | 1 | 12 | 1 | 7 | 5 | 2 | 0.95 | 2 | 4 | 1 | 0 | 3 | 7 | 3 | 30 | 48 | 8 | 22 | 14 | 17 | 21 | 22 | 14 | 17 | 2 | 5 | 1 | 5 |
19,195 | iterative/dvc | dvc/lock.py | dvc.lock.Lock | import zc.lockfile
from dvc.progress import Tqdm
import time
from dvc.utils import format_link
from dvc.exceptions import DvcException
class Lock(LockBase):
"""Class for DVC repo lock.
Uses zc.lockfile as backend.
"""
def __init__(self, lockfile, friendly=False, wait=False, **kwargs):
super()... |
class Lock(LockBase):
'''Class for DVC repo lock.
Uses zc.lockfile as backend.
'''
def __init__(self, lockfile, friendly=False, wait=False, **kwargs):
pass
@property
def files(self):
pass
def _do_lock(self):
pass
def lock(self):
'''Acquire the lock, ei... | 11 | 2 | 5 | 0 | 5 | 0 | 1 | 0.11 | 1 | 3 | 1 | 0 | 8 | 3 | 8 | 35 | 57 | 10 | 44 | 17 | 33 | 5 | 36 | 15 | 27 | 3 | 5 | 2 | 11 |
19,196 | iterative/dvc | dvc/lock.py | dvc.lock.LockBase | from abc import ABC, abstractmethod
class LockBase(ABC):
@abstractmethod
def __init__(self, lockfile):
self._lockfile = lockfile
@property
def lockfile(self):
return self._lockfile
@abstractmethod
def lock(self):
pass
@abstractmethod
def unlock(self):
... |
class LockBase(ABC):
@abstractmethod
def __init__(self, lockfile):
pass
@property
def lockfile(self):
pass
@abstractmethod
def lockfile(self):
pass
@abstractmethod
def unlock(self):
pass
@property
@abstractmethod
def is_locked(self):
... | 16 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 3 | 7 | 1 | 7 | 27 | 29 | 6 | 23 | 16 | 7 | 0 | 15 | 9 | 7 | 1 | 4 | 0 | 7 |
19,197 | iterative/dvc | dvc/lock.py | dvc.lock.LockError | from dvc.exceptions import DvcException
class LockError(DvcException):
"""Thrown when unable to acquire the lock for DVC repo.""" |
class LockError(DvcException):
'''Thrown when unable to acquire the lock for DVC repo.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
19,198 | iterative/dvc | dvc/lock.py | dvc.lock.LockNoop | from dvc.exceptions import DvcException
class LockNoop(LockBase):
def __init__(self, *args, **kwargs):
self._lock = False
def lock(self):
self._lock = True
def unlock(self):
if not self.is_locked:
raise DvcException('Unlock called on an unlocked lock')
self._l... |
class LockNoop(LockBase):
def __init__(self, *args, **kwargs):
pass
def lock(self):
pass
def unlock(self):
pass
@property
def is_locked(self):
pass
def __enter__(self):
pass
def __exit__(self, typ, value, tbck):
pass | 8 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 1 | 6 | 33 | 21 | 5 | 16 | 9 | 8 | 0 | 15 | 8 | 8 | 2 | 5 | 1 | 7 |
19,199 | iterative/dvc | dvc/log.py | dvc.log.LoggerWithTrace | import logging
class LoggerWithTrace(logging.Logger):
trace = logging.debug |
class LoggerWithTrace(logging.Logger):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 3 | 0 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 3 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.