Skip to content

Commit a91a925

Browse files
committed
[DATALAD RUNCMD] run codespell throughout fixing typos automagically (but ignoring overall fail due to ambigous ones)
=== Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent 89a22a1 commit a91a925

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
## Features
3232

33-
- command_runner now has a `command_runner_threaded()` function which allows to run in background, but stil provide live stdout/stderr stream output via queues/callbacks
33+
- command_runner now has a `command_runner_threaded()` function which allows to run in background, but still provide live stdout/stderr stream output via queues/callbacks
3434
- Refactor poller mode to allow multiple stdout / stderr stream redirectors
3535
- Passing a queue.Queue() instance to stdout/stderr arguments will fill queue with live stream output
3636
- Passing a function to stdout/stderr arguments will callback said function with live stream output
@@ -115,7 +115,7 @@
115115
- All tests are done for both capture methods
116116
- Timeout tests are more accurate
117117
- Added missing encoding tests
118-
- 2500 rounds of file reading and comparaison are added to detect rare queue read misses
118+
- 2500 rounds of file reading and comparison are added to detect rare queue read misses
119119

120120
# v0.7.0 (yanked - do not use; see v1.2.0 critical fixes) - The windows GUI
121121

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ It works as wrapper for subprocess.popen and subprocess.communicate that solves:
4343
- Can show command output on the fly without waiting the end of execution (with `live_output=True` argument)
4444
- Can give command output on the fly to application by using queues or callback functions
4545
- Catch all possible exceptions and log them properly with encoding fixes
46-
- Be compatible, and always return the same result regarless of platform
46+
- Be compatible, and always return the same result regardless of platform
4747

4848
command_runner also promises to properly kill commands when timeouts are reached, including spawned subprocesses of such commands.
4949
This specific behavior is achieved via psutil module, which is an optional dependency.
@@ -69,7 +69,7 @@ exit_code, output = command_runner('ping 127.0.0.1', timeout=10)
6969

7070
### Special exit codes
7171

72-
In order to keep the promise to always provide an exit_code, spcial exit codes have been added for the case where none is given.
72+
In order to keep the promise to always provide an exit_code, special exit codes have been added for the case where none is given.
7373
Those exit codes are:
7474

7575
- -250 : command_runner called with incompatible arguments
@@ -208,7 +208,7 @@ command_runner can redirect the command's stdout and/or stderr streams to differ
208208
Unless an output redirector is given for `stderr` argument, stderr will be redirected to `stdout` stream.
209209
Note that both queues and callback function redirectors require `poller` method and will fail if method is not set.
210210

211-
Output redirector descrptions:
211+
Output redirector descriptions:
212212

213213
- subprocess pipes
214214

@@ -240,7 +240,7 @@ exit_code, output = command_runner('dir', stdout='/tmp/stdout.log', stderr='/tmp
240240
- Queue(s) will be filled up by command_runner.
241241
- In order to keep your program "live", we'll use the threaded version of command_runner which is basically the same except it returns a future result instead of a tuple.
242242
- Note: With all the best will, there's no good way to achieve this under Python 2.7 without using more queues, so the threaded version is only compatible with Python 3.3+.
243-
- For Python 2.7, you must create your thread and queue reader yourself (see footnote for a Python 2.7 comaptible example).
243+
- For Python 2.7, you must create your thread and queue reader yourself (see footnote for a Python 2.7 compatible example).
244244
- Threaded command_runner plus queue example:
245245

246246
```python

command_runner/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def to_encoding(
320320
# type: (...) -> str
321321
"""
322322
Convert bytes output to string and handles conversion errors
323-
Varation of ofunctions.string_handling.safe_string_convert
323+
Variation of ofunctions.string_handling.safe_string_convert
324324
"""
325325

326326
if not encoding:
@@ -625,7 +625,7 @@ def _read_pipe(
625625

626626
# We also need to check that stream has readline, in case we're writing to files instead of PIPE
627627

628-
# Another magnificient python 2.7 fix
628+
# Another magnificent python 2.7 fix
629629
# So we need to convert sentinel_char which would be unicode because of unicode_litterals
630630
# to str which is the output format from stream.readline()
631631

@@ -820,7 +820,7 @@ def _timeout_check_thread(
820820
break
821821
if process.poll() is not None:
822822
break
823-
# We definitly need some sleep time here or else we will overload CPU
823+
# We definitely need some sleep time here or else we will overload CPU
824824
sleep(check_interval)
825825

826826
def _monitor_process(

command_runner/elevate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def _check_environment():
146146
# Regardless of the runner (CPython, Nuitka or frozen CPython), sys.argv[0] is the relative path to script,
147147
# sys.argv[1] are the arguments
148148
# The only exception being CPython on Windows where sys.argv[0] contains absolute path to script
149-
# Regarless of OS, sys.executable will contain full path to python binary for CPython and Nuitka,
149+
# Regardless of OS, sys.executable will contain full path to python binary for CPython and Nuitka,
150150
# and full path to frozen executable on frozen CPython
151151

152152
# Recapitulative table create with
@@ -231,7 +231,7 @@ def elevate(callable_function, *args, **kwargs):
231231
callable_function(*args, **kwargs)
232232
else:
233233
command = ["sudo", runner] + arguments
234-
# Optionnaly might also pass a stdout PIPE to command_runner so we get live output
234+
# Optionally might also pass a stdout PIPE to command_runner so we get live output
235235
exit_code, output = command_runner(command, shell=False, timeout=None)
236236

237237
logger.info("Child output: {}".format(output))

tests/test_command_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def test_unix_only_split_command():
265265
if os.name == 'posix':
266266
for method in methods:
267267
exit_code, _ = command_runner(' '.join(PING_CMD), method=method)
268-
assert exit_code == 0, 'Non splitted command should not trigger an error with method {}'.format(method)
268+
assert exit_code == 0, 'Non split command should not trigger an error with method {}'.format(method)
269269

270270

271271
def test_create_no_window():

0 commit comments

Comments
 (0)