Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Oct 17, 2024
1 parent 4d1d67e commit eae0a82
Show file tree
Hide file tree
Showing 35 changed files with 71 additions and 71 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ NOTE: THIS RELEASE WAS BROKEN DUE TO AN ISSUE WITH THE SETUP SCRIPT

### Fixed
* Fixed misspelling in docs
* Fixed misspelled detach kwarg in `ub.cmd` (the old `detatch` argument is now deprecated and will be removed)
* Fixed misspelled detach kwarg in `ub.cmd` (the old `detach` argument is now deprecated and will be removed)


## [Version 0.6.0] - 2018-11-10
Expand Down Expand Up @@ -815,7 +815,7 @@ NOTE: THIS RELEASE WAS BROKEN DUE TO AN ISSUE WITH THE SETUP SCRIPT
## [Version 0.0.43] - 2018-03-09

### Modified
* Spelling: changed the `Timer.ellapsed` attribute to `Timer.elapsed`.
* Spelling: changed the `Timer.elapsed` attribute to `Timer.elapsed`.
* Verbosity of `Timer` and `Timerit` now depends on if a label was specified.
* `Timer.tic` now returns a reference to the `Timer` instance.

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ Ubelt is a migration of the most useful parts of
with minimal dependencies.
The ``utool`` library contains a number of useful utility functions, but it
also contained non-useful functions, as well as the kitchen sink. A number of
also contained useless functions, as well as the kitchen sink. A number of
the functions were too specific or not well documented. The ``ubelt`` is a port
of the simplest and most useful parts of ``utool``.
Expand Down
6 changes: 3 additions & 3 deletions dev/bench/bench_hash_impls.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def _update_hasher_recursive(hasher, data, types=True, extensions=None):
_update_hasher_recursive(hasher, item, types, extensions=extensions)
# !>> WHOOPS: THIS IS A BUG. THERE SHOULD BE A
# !>> hasher.update(_SEP)
# !>> SEPERATOR HERE.
# !>> SEPARATOR HERE.
# !>> BUT FIXING IT WILL BREAK BACKWARDS COMPAT.
# !>> We will need to expose versions of the hasher that can be
# configured, and ideally new versions will have speed improvments.
# configured, and ideally new versions will have speed improvements.
for item in iter_:
# Ensure the items have a spacer between them
_update_hasher_recursive(hasher, item, types, extensions=extensions)
Expand Down Expand Up @@ -194,7 +194,7 @@ def _update_hasher_iterative(hasher, data, types=True, extensions=None):
# BUG: should have a _SEP here.
# !>> WHOOPS: THIS IS A BUG. THERE SHOULD BE A
# !>> hasher.update(_SEP)
# !>> SEPERATOR HERE.
# !>> SEPARATOR HERE.
# !>> BUT FIXING IT WILL BREAK BACKWARDS COMPAT.
# !>> We will need to expose versions of the hasher that can be
stack.append((DAT_TYPE, item))
Expand Down
2 changes: 1 addition & 1 deletion dev/bench/bench_import_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _main():

kwplot.figure(fnum=2, pnum=(2, 1, 1), doclf=True)
ax = sns.lineplot(data=df[df['type'] == 'cummulative'], x='release_index', y='time', hue='stat', style='type', marker='o')
ax.set_title('Ubelt cummulative import time over release history')
ax.set_title('Ubelt cumulative import time over release history')
ax.set_xticks(xticks, labels=xticklabels, rotation='vertical')
ax.set_xlabel('Version')
ax.set_ylabel('Time (μs)')
Expand Down
2 changes: 1 addition & 1 deletion dev/experimental/setdict.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An implemention of a set-enabled dictionary that we might include
An implementation of a set-enabled dictionary that we might include
References:
.. [SetDictRecipe1] https://gist.github.com/rossmacarthur/38fa948b175abb512e12c516cc3b936d
Expand Down
8 changes: 4 additions & 4 deletions dev/maintain/gen_api_for_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def gen_api_for_docs(modname):
name_len = max(len(row[ref_key]) for row in rows) + 1
num_len = 16

gaurd = ('=' * name_len + ' ' + '=' * num_len)
print(gaurd)
guard = ('=' * name_len + ' ' + '=' * num_len)
print(guard)
column_fmt = '{:<' + str(name_len) + '} {:>' + str(num_len) + '}'
print(column_fmt.format(' Function name ', 'Usefulness'))
print(gaurd)
print(guard)
for key, value in usage.items():
infos = attr_to_infos[key]
if len(infos) == 0:
Expand All @@ -194,7 +194,7 @@ def gen_api_for_docs(modname):
raise AssertionError
info = infos[0]
print(column_fmt.format(info[ref_key], value))
print(gaurd)
print(guard)

raw_scores = np.array(list(usage.values()))

Expand Down
4 changes: 2 additions & 2 deletions dev/maintain/gen_typed_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def generate_typed_stubs():
typed stub files.
pyfile mypy.stubgen
# Delete compiled verisons so we can hack it
# Delete compiled versions so we can hack it
# THIS DOES NOT WORK
# MYPY_DPTH=$(python -c "import mypy, pathlib; print(pathlib.Path(mypy.__file__).parent)")
Expand Down Expand Up @@ -199,7 +199,7 @@ def generate_typed_stubs():
# Hack for specific module
# if mod.path.endswith('util_path.py'):
# gen.add_typing_import('TypeVar')
# # hack for variable inheritence
# # hack for variable inheritance
# gen._output = ['import pathlib\nimport os\n', "_PathBase = pathlib.WindowsPath if os.name == 'nt' else pathlib.PosixPath\n"] + gen._output

if mod.path.endswith('util_dict.py'):
Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
level of experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/demo_CacheStamp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"1. The file already exist on disk.\n",
"2. The file has not been tampered with since you wrote it.\n",
"\n",
"Running renew records the size, modification time (mtime), and hash (checksum) of each file registered via product. Running expired checks checks that these attributes match with existing files on disk, which gives you the tamperproof guarentee. This mechanism is similar to how Makefiles and other build systems (e.g. CMake, redo) handle detecting when files are modified. (Note that it is possible to disable the hash checks by specifying `hasher=None` while still retaining size and mtime checks, this is useful when hashing files it too expensive)."
"Running renew records the size, modification time (mtime), and hash (checksum) of each file registered via product. Running expired checks checks that these attributes match with existing files on disk, which gives you the tamperproof guarantee. This mechanism is similar to how Makefiles and other build systems (e.g. CMake, redo) handle detecting when files are modified. (Note that it is possible to disable the hash checks by specifying `hasher=None` while still retaining size and mtime checks, this is useful when hashing files it too expensive)."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/demo_cmd.py.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"\n",
" system (bool, default=False): if True, most other considerations\n",
" are dropped, and :func:`os.system` is used to execute the\n",
" command in a platform dependant way. Other arguments such as\n",
" command in a platform dependent way. Other arguments such as\n",
" env, tee, timeout, and shell are all ignored.\n",
" (new in version 1.1.0)\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ omit = [
skip = ['./docs/build', './*.egg-info', './build', './htmlcov']
count = true
quiet-level = 3
ignore-words-list = ['wont', 'cant', 'ANS', 'doesnt']
ignore-words-list = ['wont', 'cant', 'ANS', 'doesnt', 'arent', 'ans', 'thats', 'datas', 'isnt']
12 changes: 6 additions & 6 deletions tests/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_cmd_tee_thread():
print('existing_threads = {!r}'.format(existing_threads))

if ub.WIN32:
# Windows cant break appart commands consistently
# Windows cant break apart commands consistently
command = [PYEXE, '-c', "for i in range(10): print(str(i))"]
else:
command = '{pyexe} -c "for i in range(10): print(str(i))"'.format(pyexe=PYEXE)
Expand Down Expand Up @@ -143,7 +143,7 @@ def test_cmd_multiline_stdout():
pytest ubelt/tests/test_cmd.py::test_cmd_multiline_stdout
"""
if ub.WIN32:
# Windows cant break appart commands consistently
# Windows cant break apart commands consistently
command = [PYEXE, '-c', "for i in range(10): print(str(i))"]
else:
command = '{pyexe} -c "for i in range(10): print(str(i))"'.format(pyexe=PYEXE)
Expand Down Expand Up @@ -283,7 +283,7 @@ def test_timeout():
''').lstrip().format(pyexe=PYEXE)

# if ub.WIN32:
# # Windows cant break appart commands consistently
# # Windows cant break apart commands consistently
# py_script = [PYEXE, '-c', ub.codeblock(
# r'''
# "
Expand Down Expand Up @@ -421,7 +421,7 @@ def test_cmdoutput_object_with_non_subprocess_backends():
assert info.stderr.strip() == ''
info.check_returncode()

# In this case, when tee=0 the user can stil capture the output
# In this case, when tee=0 the user can still capture the output
info = ub.cmd('echo hello world', detach=True, capture=True, tee=0)
with pytest.raises(KeyError):
info.stdout
Expand All @@ -437,7 +437,7 @@ def test_cmdoutput_object_with_non_subprocess_backends():
info.stderr
assert info['proc'].communicate()[0] is None

# In this case when tee=1, a detatched process will show its output but
# In this case when tee=1, a detached process will show its output but
# capturing will not be possible.
info = ub.cmd('echo hello world', detach=True, capture=False, tee=1)
with pytest.raises(KeyError):
Expand Down Expand Up @@ -465,7 +465,7 @@ def test_cmdoutput_object_with_non_subprocess_backends():

def _dev_debug_timeouts():
"""
Notes used when implementating timeout
Notes used when implementing timeout
Ignore:
# For debugging and development
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_auto_dict_to_dict():


def test_auto_dict_ordered():
# To Dict should repsect ordering
# To Dict should respect ordering
from ubelt.util_dict import AutoOrderedDict, AutoDict
auto = AutoOrderedDict()
auto[0][3] = 3
Expand Down
6 changes: 3 additions & 3 deletions tests/test_editable_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def call_myalgo():

def analyze(self):
"""
For debugging and develoment only, don't run in the tests
For debugging and development only, don't run in the tests
Requires:
rich, xdev
Expand Down Expand Up @@ -378,7 +378,7 @@ def print_egg_path_content(egg_info_dpath, color='blue'):
print(f'other_egg_infos={other_egg_infos}')

if other_egg_infos:
console.print('[red] THERE ARE UNEXEPCTED EGG INFOS')
console.print('[red] THERE ARE UNEXPECTED EGG INFOS')
for egg_info_dpath in other_egg_infos:
print_egg_path_content(egg_info_dpath, color='red')

Expand Down Expand Up @@ -467,7 +467,7 @@ def teardown_module(module):

def test_import_of_editable_install():
_check_skip_editable_module_tests()
print('Testing ediable installs')
print('Testing editable installs')
import ubelt as ub
for PROJ in GLOBAL_PROJECTS:
result = ub.modname_to_modpath(PROJ.mod_name)
Expand Down
14 changes: 7 additions & 7 deletions tests/test_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ def _finalizer():
is_deleted[jobid] = True
return _finalizer

def debug_referers():
def debug_referrers():
if 0:
referers = ub.udict({})
referrers = ub.udict({})
for jobid, ref in weak_futures.items():
fs = ref()
referers[jobid] = 0 if fs is None else len(gc.get_referrers(fs))
referrers[jobid] = 0 if fs is None else len(gc.get_referrers(fs))
print('is_deleted = {}'.format(ub.urepr(is_deleted, nl=1)))
print('referers = {}'.format(ub.urepr(referers, nl=1)))
print('referrers = {}'.format(ub.urepr(referrers, nl=1)))

for jobid in range(10):
fs = jobs.submit(simple_worker, jobid)
Expand All @@ -97,18 +97,18 @@ def debug_referers():
weakref.finalize(fs, make_finalizer(jobid))
del fs

debug_referers()
debug_referrers()
assert not any(is_deleted.values())

for fs in jobs.as_completed():
fs.result()

debug_referers()
debug_referrers()
assert not any(is_deleted.values())

jobs._clear_completed()

debug_referers()
debug_referrers()

import platform
if 'pypy' not in platform.python_implementation().lower():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def test_base32():

def test_compatible_hash_bases():
"""
Ubelt ~1.2.3 has a ~bug~ incompatability with non-hex hash bases. Depending
Ubelt ~1.2.3 has a ~bug~ incompatibility with non-hex hash bases. Depending
on leftover amount of data in the byte stream, our hex reencoding may be
incorrect. It is still correct when the input has correct lengths, but in
general it can produce issues if you were expecting hashes to conform to
Expand Down Expand Up @@ -636,7 +636,7 @@ class MyHexConvertor(baseconv.BaseConverter):
"""
if base == list(base64._b32alphabet.decode()):
# NOTE: This code has an incompatability with standard base encodings
# NOTE: This code has an incompatibility with standard base encodings
# because it does not pad the bytes. I.e. for base 64 3 bytes are
# converted into 4 characters, so we need a input string divisible by
# 3. For base32 5 bytes are converted into 2 characters.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_indexable.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def tree(b, d):
assert list(walker) == list(walker)

import pytest
# Exhausing the current iterator will cause StopIteration
# Exhausting the current iterator will cause StopIteration
list(walker)
with pytest.raises(StopIteration):
item4 = next(walker) # NOQA
Expand Down
4 changes: 2 additions & 2 deletions tests/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_copy_directory_cases():
demo_nested_paths(paths['shallow'])
demo_nested_paths(paths['deep'], depth=3)

# Instead you can always exepct <dst>/<contents> to be the same as
# Instead you can always expect <dst>/<contents> to be the same as
# <src>/<contents>.
for key, src in paths.items():
for meta in ['stats', 'mode', None]:
Expand Down Expand Up @@ -287,7 +287,7 @@ def test_move_directory_cases():
for d in paths.values():
d.ensuredir()

# Instead you can always exepct <dst>/<contents> to be the same as
# Instead you can always expect <dst>/<contents> to be the same as
# <src>/<contents>.
for key, src in paths.items():
for meta in ['stats', 'mode', None]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_progiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_clearline():
before, message, after = prog.format_message_parts()
assert before == ''
assert strip_ansi(message).strip(' ') == '0/?...'
# Clearline=True version should carrage return at the begining and have no
# Clearline=True version should carriage return at the beginning and have no
# newline at the end.
prog = ProgIter(file=file, show_times=False, clearline=True)
before, message, after = prog.format_message_parts()
Expand Down
6 changes: 3 additions & 3 deletions ubelt/_win32_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
For dealing with symlinks, junctions, and hard-links on windows.
Note:
The termonology used here was written before I really understood the
The terminology used here was written before I really understood the
difference between symlinks, hardlinks, and junctions. As such it may be
inconsistent or incorrect in some places. This might be fixed in the
future.
Expand Down Expand Up @@ -230,7 +230,7 @@ def _symlink(path, link, overwrite=0, verbose=0):
def _win32_symlink2(path, link, allow_fallback=True, verbose=0):
"""
Perform a real symbolic link if possible. However, on most versions of
windows you need special privledges to create a real symlink. Therefore, we
windows you need special privileges to create a real symlink. Therefore, we
try to create a symlink, but if that fails we fallback to using a junction.
AFAIK, the main difference between symlinks and junctions are that symlinks
Expand Down Expand Up @@ -288,7 +288,7 @@ def _win32_symlink(path, link, verbose=0):

def _win32_junction(path, link, verbose=0):
"""
On older (pre 10) versions of windows we need admin privledges to make
On older (pre 10) versions of windows we need admin privileges to make
symlinks, however junctions seem to work.
For paths we do a junction (softlink) and for files we use a hard link
Expand Down
8 changes: 4 additions & 4 deletions ubelt/progiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

default_timer = time.perf_counter # type: Callable

# A measurment takes place at a given iteration and posixtime.
# A measurement takes place at a given iteration and posixtime.
Measurement = collections.namedtuple('Measurement', ['idx', 'time'])


Expand Down Expand Up @@ -374,7 +374,7 @@ def __init__(self, iterable=None, desc=None, total=None, freq=1,
show / hide rate, default=True
show_eta (bool):
show / hide estimated time of arival (i.e. time to completion),
show / hide estimated time of arrival (i.e. time to completion),
default=True
show_wall (bool):
Expand Down Expand Up @@ -714,9 +714,9 @@ def _iterate(self):
self.end()

def _homogeneous_check(self, gen):
# NOTE: We could have a more complex heuristic with negligable
# NOTE: We could have a more complex heuristic with negligible
# overhead and more robustness that checks every n iterations
# that such that the time call overhead would be negligable.
# that such that the time call overhead would be negligible.
# To do this we would need a semi-fast mode that does the fast
# mode for a fixed number of iterations and then rechecks the
# slow mode. Or something like that.
Expand Down
Loading

0 comments on commit eae0a82

Please sign in to comment.