Skip to content

Commit c687b34

Browse files
committed
flake8
1 parent 97b6da4 commit c687b34

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ coverage.xml
1313
.mypy_cache/
1414
/index.txt
1515
.dmypy.json
16+
.hypothesis/

w3lib/http.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from base64 import urlsafe_b64encode
22
from typing import Any, List, MutableMapping, Optional, AnyStr, Sequence, Union, Mapping
3-
from w3lib.encoding import to_unicode
43
from w3lib.util import to_bytes, to_native_str
54

65
HeadersDictInput = Mapping[bytes, Union[Any, Sequence]]

w3lib/url.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626
from urllib.parse import _coerce_args # type: ignore
2727
from urllib.request import pathname2url, url2pathname
28-
from w3lib.util import to_bytes, to_native_str, to_unicode
28+
from w3lib.util import to_unicode
2929
from w3lib._types import AnyUnicodeError, StrOrBytes
3030

3131

@@ -54,10 +54,10 @@ def safe_url_string(url: StrOrBytes, encoding: str = 'utf8', path_encoding: str
5454
as per https://url.spec.whatwg.org/#url-parsing.
5555
5656
If a bytes URL is given, it is first converted to `str` using the given
57-
encoding (which defaults to 'utf-8'). If quote_path is True (default),
57+
encoding (which defaults to 'utf-8'). If quote_path is True (default),
5858
path_encoding ('utf-8' by default) is used to encode URL path component
5959
which is then quoted. Otherwise, if quote_path is False, path component
60-
is not encoded or quoted. Given encoding is used for query string
60+
is not encoded or quoted. Given encoding is used for query string
6161
or form data.
6262
6363
When passing an encoding, you should use the encoding of the
@@ -89,7 +89,7 @@ def safe_url_string(url: StrOrBytes, encoding: str = 'utf8', path_encoding: str
8989
path = quote(parts.path.encode(path_encoding), _path_safe_chars)
9090
else:
9191
path = parts.path
92-
92+
9393
return urlunsplit((
9494
parts.scheme,
9595
netloc.rstrip(':'),
@@ -411,7 +411,7 @@ def parse_data_uri(uri: StrOrBytes) -> _ParseDataURIResult:
411411
]
412412

413413

414-
def _safe_ParseResult(parts: ParseResult, encoding: str = 'utf8', path_encoding: str = 'utf8') -> Tuple[str, str, str, str, str, str]:
414+
def _safe_ParseResult(parts: ParseResult, encoding: str = 'utf8', path_encoding: str = 'utf8') -> Tuple[str, str, str, str, str, str]:
415415
# IDNA encoding can fail for too long labels (>63 characters)
416416
# or missing labels (e.g. http://.example.com)
417417
try:

0 commit comments

Comments
 (0)