Fix typos

This commit is contained in:
Saugat Pachhai
2019-11-26 20:07:20 +05:45
parent 7a678f3322
commit 461a79e1e8
23 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ def get_parent_parser():
"""Create instances of a parser containing common arguments shared among
all the commands.
When overwritting `-q` or `-v`, you need to instantiate a new object
When overwriting `-q` or `-v`, you need to instantiate a new object
in order to prevent some weird behavior.
"""
parent_parser = argparse.ArgumentParser(add_help=False)
+1 -1
View File
@@ -93,7 +93,7 @@ class CmdVersion(CmdBaseNoRepo):
for parent in itertools.chain([path], path.parents):
if parent in partition:
return partition[parent]
return ("unkown", "none")
return ("unknown", "none")
@staticmethod
def get_linktype_support_info(repo):
+1 -1
View File
@@ -39,7 +39,7 @@ def _spawn_windows(cmd, env):
def _spawn_posix(cmd, env):
# NOTE: using os._exit instead of sys.exit, because dvc built
# with PyInstaller has trouble with SystemExit exeption and throws
# with PyInstaller has trouble with SystemExit exception and throws
# errors such as "[26338] Failed to execute script __main__"
try:
pid = os.fork()
+2 -2
View File
@@ -49,7 +49,7 @@ class ColorFormatter(logging.Formatter):
__ https://pypi.python.org/pypi/colorama
For records containing `exc_info`, it will use a custom `_walk_exc` to
retrieve the whole tracebak.
retrieve the whole traceback.
"""
color_code = {
@@ -154,7 +154,7 @@ class LoggerHandler(logging.StreamHandler):
raise LoggingException(record)
def emit(self, record):
"""Write to Tqdm's stream so as to not break progressbars"""
"""Write to Tqdm's stream so as to not break progress-bars"""
try:
msg = self.format(record)
Tqdm.write(
+1 -1
View File
@@ -43,7 +43,7 @@ class PathInfo(pathlib.PurePath):
def as_posix(self):
f = self._flavour
# Unlike original implementation [1] that uses `str()` we actually need
# to use `fspath`, because we've overriden `__str__` method to return
# to use `fspath`, because we've overridden `__str__` method to return
# relative paths, which will break original `as_posix`.
#
# [1] https://github.com/python/cpython/blob/v3.7.0/Lib/pathlib.py#L692
+1 -1
View File
@@ -183,7 +183,7 @@ class RemoteLOCAL(RemoteBASE):
# will get something like: `too many links error`
#
# This is because all those empty files will have the same checksum
# (i.e. 68b329da9893e34099c7d8ad5cb9c940), therfore, they will be
# (i.e. 68b329da9893e34099c7d8ad5cb9c940), therefore, they will be
# linked to the same file in the cache.
#
# From https://en.wikipedia.org/wiki/Hard_link
+1 -1
View File
@@ -23,7 +23,7 @@ def brancher( # noqa: E302
str: the display name for the currently selected tree, it could be:
- a git revision identifier
- empty string it there is no branches to iterate over
- "Working Tree" if there are uncommited changes in the SCM repo
- "Working Tree" if there are uncommitted changes in the SCM repo
"""
if not any([branches, all_branches, tags, all_tags, all_commits]):
yield ""
+1 -1
View File
@@ -220,7 +220,7 @@ def _diff_royal(self, target, diff_dct):
@locked
def diff(self, a_ref, target=None, b_ref=None):
"""Gerenates diff message string output
"""Generates diff message string output
Args:
target(str) - file/directory to check diff of
+1 -1
View File
@@ -137,7 +137,7 @@ def _reproduce_stages(
The derived evaluation of D would be: [A, B, C, D]
In case that `downstream` option is specifed, the desired effect
In case that `downstream` option is specified, the desired effect
is to derive the evaluation starting from the given stage up to the
ancestors. However, the `networkx.ancestors` returns a set, without
any guarantee of any order, so we are going to reverse the graph and
+1 -1
View File
@@ -104,7 +104,7 @@ class Base(object):
return False
def is_dirty(self):
"""Return whether the SCM contains uncommited changes."""
"""Return whether the SCM contains uncommitted changes."""
return False
def active_branch(self): # pylint: disable=no-self-use
+1 -1
View File
@@ -361,7 +361,7 @@ class State(object): # pylint: disable=too-many-instance-attributes
self._execute(cmd, (self._to_sqlite(inode),))
results = self._fetchall()
if results:
# uniquness constrain on inode
# uniqueness constrain on inode
assert len(results) == 1
return results[0]
return None
+1 -1
View File
@@ -26,7 +26,7 @@ def parse_stage(text, path):
def parse_stage_for_update(text, path):
"""Parses text into Python structure.
Unlike `parse_stage()` this returns ordereddicts, values have special
Unlike `parse_stage()` this returns ordered dicts, values have special
attributes to store comments and line breaks. This allows us to preserve
all of those upon dump.
+1 -1
View File
@@ -88,7 +88,7 @@ install_dependencies()
gem install --no-document fpm
print_info "Uprgading pip..."
print_info "Upgrading pip..."
pip install --upgrade pip
print_info "Installing requirements..."
+1 -1
View File
@@ -6,7 +6,7 @@ set -e
scriptdir="$(dirname $0)"
# NOTE: it is not uncommon for pip to hang on travis for what seems to be
# networking issues. Thus, let's retry a few times to see if it will eventially
# networking issues. Thus, let's retry a few times to see if it will eventually
# work or not.
$scriptdir/retry.sh pip install --upgrade pip setuptools wheel
$scriptdir/retry.sh pip install .[all,tests]
+1 -1
View File
@@ -42,7 +42,7 @@ _dvc_commands() {
"unlock:Unlock DVC-file."
"unprotect:Unprotect data file/directory."
"update:Update data artifacts imported from other DVC repositories."
"version:Show DVC version and system/environment informaion."
"version:Show DVC version and system/environment information."
)
_describe 'dvc commands' _commands
+1 -1
View File
@@ -151,7 +151,7 @@ begin
end;
end;
// Split a string into an array using passed delimeter
// Split a string into an array using passed delimiter
procedure MPExplode(var Dest: TArrayOfString; Text: String; Separator: String);
var
i: Integer;
+1 -1
View File
@@ -33,7 +33,7 @@ version = dvc_version.__version__ # noqa: F821
# by your package during runtime, you need to **pin** the build version.
#
# This custom class will replace the version.py module with a **static**
# `__version__` that your package can read at runtime, assuring consistancy.
# `__version__` that your package can read at runtime, assuring consistency.
#
# References:
# - https://docs.python.org/3.7/distutils/extending.html
+1 -1
View File
@@ -59,7 +59,7 @@ class TestAdd(TestDvc):
self.assertTrue(os.path.isfile(stage.path))
class TestAddUnupportedFile(TestDvc):
class TestAddUnSupportedFile(TestDvc):
def test(self):
with self.assertRaises(DvcException):
self.dvc.add("unsupported://unsupported")
+1 -1
View File
@@ -148,7 +148,7 @@ def test_pull_non_workspace(git, dvc_repo, erepo):
dvc_repo.scm.commit("imported branch")
dvc_repo.scm.tag("ref-to-branch")
# Ovewrite via import
# Overwrite via import
dvc_repo.imp(erepo.root_dir, src, dst, rev="master")
os.remove(stage.outs[0].cache_path)
+1 -1
View File
@@ -48,7 +48,7 @@ class TestInstall(object):
dvc_repo.scm.commit("add")
os.unlink(repo_dir.FOO)
dvc_repo.scm.checkout("new_branc", create_new=True)
dvc_repo.scm.checkout("new_branch", create_new=True)
assert os.path.isfile(repo_dir.FOO)
+1 -1
View File
@@ -537,7 +537,7 @@ class TestReproLockedCallback(TestDvc):
file1 = "file1"
file1_stage = file1 + ".dvc"
# NOTE: purposefully not specifying dependencies
# to create a callbacs stage.
# to create a callback stage.
stage = self.dvc.run(
fname=file1_stage,
outs=[file1],
+1 -1
View File
@@ -7,7 +7,7 @@ from dvc.system import System
@pytest.mark.skipif(os.name != "nt", reason="Windows specific")
def test_getdirinfo(tmp_path):
# simulate someone holding an exclussive access
# simulate someone holding an exclusive access
locked = str(tmp_path / "locked")
fd = os.open(locked, os.O_WRONLY | os.O_CREAT | os.O_EXCL)
try:
+1 -1
View File
@@ -67,7 +67,7 @@ class TestGetFilesNumber(TestDvc):
"get_dir_cache",
return_value=[{"md5": "asdf"}, {"md5": "qwe"}],
)
def test_return_mutiple_for_dir(self, mock_get_dir_cache):
def test_return_multiple_for_dir(self, mock_get_dir_cache):
o = self._get_output()
self.assertEqual(2, o.get_files_number())