mirror of
https://github.com/httpie/cli.git
synced 2025-08-14 05:58:53 +02:00
Uniformize UTF-8 naming (#1115)
* Uniformize UTF-8 naming
Replace `utf8` -> `utf-8` everywhere.
It should have no impact, `utf8` is an alias of `utf-8` [1].
[1] ee03bad25e/Lib/encodings/aliases.py (L534)
* Always specify the encoding
Let's be explicit over implicit. And prevent future warnings from PEP-597 [1].
[1] https://www.python.org/dev/peps/pep-0597/#using-the-default-encoding-is-a-common-mistake
* Update `UTF8` constant (`utf-8` -> `utf_8`)
* Remove default argument from `str.encode()` and `bytes.decode()`
* Clean-up
This commit is contained in:
committed by
GitHub
parent
11399dde76
commit
c6cbc7dfa5
@ -118,7 +118,7 @@ class TestItemParsing:
|
||||
# Parsed file fields
|
||||
assert 'file' in items.files
|
||||
assert (items.files['file'][1].read().strip().
|
||||
decode('utf8') == FILE_CONTENT)
|
||||
decode() == FILE_CONTENT)
|
||||
|
||||
def test_multiple_file_fields_with_same_field_name(self):
|
||||
items = RequestItems.from_args([
|
||||
|
Reference in New Issue
Block a user