Skip to content

chore: spelling #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions webencodings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def iter_decode(input, fallback_encoding, errors='replace'):
An iterable of byte strings.

The input is first consumed just enough to determine the encoding
based on the precense of a BOM,
based on the presence of a BOM,
then consumed on demand when the return value is.
:param fallback_encoding:
An :class:`Encoding` object or a label string.
Expand All @@ -218,8 +218,8 @@ def _iter_decode_generator(input, decoder):
"""
decode = decoder.decode
input = iter(input)
for chunck in input:
output = decode(chunck)
for chunk in input:
output = decode(chunk)
if output:
assert decoder.encoding is not None
yield decoder.encoding
Expand All @@ -234,8 +234,8 @@ def _iter_decode_generator(input, decoder):
yield output
return

for chunck in input:
output = decode(chunck)
for chunk in input:
output = decode(chunk)
if output:
yield output
output = decode(b'', final=True)
Expand All @@ -260,8 +260,8 @@ def iter_encode(input, encoding=UTF8, errors='strict'):


def _iter_encode_generator(input, encode):
for chunck in input:
output = encode(chunck)
for chunk in input:
output = encode(chunk)
if output:
yield output
output = encode('', final=True)
Expand Down