forked from extern/httpie-cli
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:
|
strategy:
|
||||||
# If any of the stages fail, then we'll stop the action
|
# 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.
|
# issue.
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
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:
|
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)
|
- 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.
|
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
|
# HTTPie Benchmarking Infrastructure
|
||||||
|
|
||||||
This directory includes the benchmarks we use for testing HTTPie's speed and the
|
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
|
## 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
|
and customize the repos by passing `--local-repo`/`--target-repo` (can either
|
||||||
take a URL or a path).
|
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`.
|
`pyOpenSSL`), you can pass `--complex`.
|
||||||
|
@ -21,7 +21,7 @@ Examples:
|
|||||||
$ python extras/profiling/benchmarks.py --fast
|
$ python extras/profiling/benchmarks.py --fast
|
||||||
|
|
||||||
# For verify everything works as expected, pass --debug-single-value.
|
# 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
|
# very useful when iterating on a benchmark
|
||||||
$ python extras/profiling/benchmarks.py --debug-single-value
|
$ python extras/profiling/benchmarks.py --debug-single-value
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ class Environment:
|
|||||||
theme=Theme(theme)
|
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.
|
# the error (stderr) console for better isolation between parts.
|
||||||
# https://rich.readthedocs.io/en/stable/console.html#error-console
|
# 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')
|
return self.fail('uninstall', target, 'couldn\'t locate the package')
|
||||||
|
|
||||||
# TODO: Consider handling failures here (e.g if it fails,
|
# 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).
|
# in a proper shape).
|
||||||
for file in files:
|
for file in files:
|
||||||
with suppress(FileNotFoundError):
|
with suppress(FileNotFoundError):
|
||||||
|
@ -70,7 +70,7 @@ class PluginManager(list):
|
|||||||
plugin = entry_point.load()
|
plugin = entry_point.load()
|
||||||
except BaseException as exc:
|
except BaseException as exc:
|
||||||
warnings.warn(
|
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'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 '
|
f'or "pip uninstall {plugin_name}" (depending on how you installed it in the first '
|
||||||
'place).'
|
'place).'
|
||||||
|
@ -28,7 +28,7 @@ def test_lazy_choices():
|
|||||||
cache=False # for test purposes
|
cache=False # for test purposes
|
||||||
)
|
)
|
||||||
|
|
||||||
# Parser initalization doesn't call it.
|
# Parser initialization doesn't call it.
|
||||||
getter.assert_not_called()
|
getter.assert_not_called()
|
||||||
|
|
||||||
# If we don't use --lazy-option, we don't retrieve it.
|
# 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
|
cache=False # for test purposes
|
||||||
)
|
)
|
||||||
|
|
||||||
# Parser initalization doesn't call it.
|
# Parser initialization doesn't call it.
|
||||||
getter.assert_not_called()
|
getter.assert_not_called()
|
||||||
|
|
||||||
# If we don't use `--help`, we don't use it.
|
# 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,
|
UserWarning,
|
||||||
match=(
|
match=(
|
||||||
f'While loading "{broken_plugin.name}", an error'
|
f'While loading "{broken_plugin.name}", an error'
|
||||||
' ocurred: broken plugin'
|
' occurred: broken plugin'
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
data = parse_listing(httpie_plugins_success('list'))
|
data = parse_listing(httpie_plugins_success('list'))
|
||||||
|
@ -83,7 +83,7 @@ class Encoder:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.substitutions = {}
|
self.substitutions = {}
|
||||||
|
|
||||||
def subsitute(self, data: bytes) -> str:
|
def substitute(self, data: bytes) -> str:
|
||||||
idx = hash(data)
|
idx = hash(data)
|
||||||
self.substitutions[idx] = data
|
self.substitutions[idx] = data
|
||||||
return self.TEMPLATE.format(idx)
|
return self.TEMPLATE.format(idx)
|
||||||
@ -110,7 +110,7 @@ class FakeBytesIOBuffer(BytesIO):
|
|||||||
try:
|
try:
|
||||||
self.original_buffer.write(data.decode(UTF8))
|
self.original_buffer.write(data.decode(UTF8))
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
self.original_buffer.write(self.encoder.subsitute(data))
|
self.original_buffer.write(self.encoder.substitute(data))
|
||||||
finally:
|
finally:
|
||||||
self.original_buffer.flush()
|
self.original_buffer.flush()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user