1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02: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:
luzpaz
2022-04-15 19:06:34 -04:00
committed by GitHub
parent 732878f1b4
commit d262181bed
10 changed files with 13 additions and 13 deletions

View File

@@ -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.

View File

@@ -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'))

View File

@@ -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()