mirror of
https://github.com/httpie/cli.git
synced 2024-11-28 02:33:27 +01:00
Fix typos (user-facing and non-user-facing) (#1357)
* Fix typos (user-facing and non-user-facing Found via `codespell -q 3 -L datas,medias,warmup` * Fix source typo found in tests/
This commit is contained in:
parent
732878f1b4
commit
d262181bed
2
.github/workflows/release-snap.yml
vendored
2
.github/workflows/release-snap.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
# If any of the stages fail, then we'll stop the action
|
||||
# to give release manager time to investigate the underyling
|
||||
# to give release manager time to investigate the underlying
|
||||
# issue.
|
||||
fail-fast: true
|
||||
matrix:
|
||||
|
@ -23,7 +23,7 @@ contains 2 major methods:
|
||||
|
||||
We use [PyInstaller](https://pyinstaller.readthedocs.io/en/stable/) for the binaries. Normally pyinstaller offers two different modes:
|
||||
|
||||
- Single directory (harder to distribute, low redundancy. Library files are shared accross different executables)
|
||||
- Single directory (harder to distribute, low redundancy. Library files are shared across different executables)
|
||||
- Single binary (easier to distribute, higher redundancy. Same libraries are statically linked to different executables, so higher total size)
|
||||
|
||||
Since our binary size (in total 20 MiBs) is not that big, we have decided to choose the single binary mode for the sake of easier distribution.
|
||||
|
@ -1,7 +1,7 @@
|
||||
# HTTPie Benchmarking Infrastructure
|
||||
|
||||
This directory includes the benchmarks we use for testing HTTPie's speed and the
|
||||
infrastructure to automate this testing accross versions.
|
||||
infrastructure to automate this testing across versions.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -35,5 +35,5 @@ You can customize these branches by passing `--local-repo`/`--target-branch`,
|
||||
and customize the repos by passing `--local-repo`/`--target-repo` (can either
|
||||
take a URL or a path).
|
||||
|
||||
If you want to run a third enviroment with additional dependencies (such as
|
||||
If you want to run a third environment with additional dependencies (such as
|
||||
`pyOpenSSL`), you can pass `--complex`.
|
||||
|
@ -21,7 +21,7 @@ Examples:
|
||||
$ python extras/profiling/benchmarks.py --fast
|
||||
|
||||
# For verify everything works as expected, pass --debug-single-value.
|
||||
# It will only run everything once, so the resuls are not realiable. But
|
||||
# It will only run everything once, so the resuls are not reliable. But
|
||||
# very useful when iterating on a benchmark
|
||||
$ python extras/profiling/benchmarks.py --debug-single-value
|
||||
|
||||
|
@ -205,7 +205,7 @@ class Environment:
|
||||
theme=Theme(theme)
|
||||
)
|
||||
|
||||
# Rich recommends separting the actual console (stdout) from
|
||||
# Rich recommends separating the actual console (stdout) from
|
||||
# the error (stderr) console for better isolation between parts.
|
||||
# https://rich.readthedocs.io/en/stable/console.html#error-console
|
||||
|
||||
|
@ -165,7 +165,7 @@ class PluginInstaller:
|
||||
return self.fail('uninstall', target, 'couldn\'t locate the package')
|
||||
|
||||
# TODO: Consider handling failures here (e.g if it fails,
|
||||
# just rever the operation and leave the site-packages
|
||||
# just revert the operation and leave the site-packages
|
||||
# in a proper shape).
|
||||
for file in files:
|
||||
with suppress(FileNotFoundError):
|
||||
|
@ -70,7 +70,7 @@ class PluginManager(list):
|
||||
plugin = entry_point.load()
|
||||
except BaseException as exc:
|
||||
warnings.warn(
|
||||
f'While loading "{plugin_name}", an error ocurred: {exc}\n'
|
||||
f'While loading "{plugin_name}", an error occurred: {exc}\n'
|
||||
f'For uninstallations, please use either "httpie plugins uninstall {plugin_name}" '
|
||||
f'or "pip uninstall {plugin_name}" (depending on how you installed it in the first '
|
||||
'place).'
|
||||
|
@ -28,7 +28,7 @@ def test_lazy_choices():
|
||||
cache=False # for test purposes
|
||||
)
|
||||
|
||||
# Parser initalization doesn't call it.
|
||||
# Parser initialization doesn't call it.
|
||||
getter.assert_not_called()
|
||||
|
||||
# If we don't use --lazy-option, we don't retrieve it.
|
||||
@ -69,7 +69,7 @@ def test_lazy_choices_help():
|
||||
cache=False # for test purposes
|
||||
)
|
||||
|
||||
# Parser initalization doesn't call it.
|
||||
# Parser initialization doesn't call it.
|
||||
getter.assert_not_called()
|
||||
|
||||
# If we don't use `--help`, we don't use it.
|
||||
|
@ -138,7 +138,7 @@ def test_broken_plugins(httpie_plugins, httpie_plugins_success, dummy_plugin, br
|
||||
UserWarning,
|
||||
match=(
|
||||
f'While loading "{broken_plugin.name}", an error'
|
||||
' ocurred: broken plugin'
|
||||
' occurred: broken plugin'
|
||||
)
|
||||
):
|
||||
data = parse_listing(httpie_plugins_success('list'))
|
||||
|
@ -83,7 +83,7 @@ class Encoder:
|
||||
def __init__(self):
|
||||
self.substitutions = {}
|
||||
|
||||
def subsitute(self, data: bytes) -> str:
|
||||
def substitute(self, data: bytes) -> str:
|
||||
idx = hash(data)
|
||||
self.substitutions[idx] = data
|
||||
return self.TEMPLATE.format(idx)
|
||||
@ -110,7 +110,7 @@ class FakeBytesIOBuffer(BytesIO):
|
||||
try:
|
||||
self.original_buffer.write(data.decode(UTF8))
|
||||
except UnicodeDecodeError:
|
||||
self.original_buffer.write(self.encoder.subsitute(data))
|
||||
self.original_buffer.write(self.encoder.substitute(data))
|
||||
finally:
|
||||
self.original_buffer.flush()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user