@@ -188,7 +188,9 @@ def warn_user(message: str) -> None:
188188# not testing ipv6 right now, because rules are needed for ensuring they
189189# are correct
190190RE_VALID_NETLOC = re .compile (
191- r"(?:" r"(?P<ipv4>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})" r"|" # ...or ipv4
191+ r"(?:"
192+ r"(?P<ipv4>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
193+ r"|" # ...or ipv4
192194 # r'(?P<ipv6>\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6
193195 # r'|'
194196 r"(?P<localhost>localhost)" # localhost...
@@ -1008,9 +1010,9 @@ class ParsedResult(object):
10081010
10091011 metadata : Dict
10101012 soup : Optional [BeautifulSoup ] = None
1011- response_history : Optional [
1012- ResponseHistory
1013- ] = None # only stashing `ResponseHistory` if we have it
1013+ response_history : Optional [ResponseHistory ] = (
1014+ None # only stashing ` ResponseHistory` if we have it
1015+ )
10141016 _version : int = 1 # version tracking
10151017 default_encoder : Optional [Callable ] = None
10161018
@@ -1882,9 +1884,9 @@ def _run_in_session(_requests_session: requests.Session):
18821884 (k .lower (), v ) for k , v in resp .headers .items ()
18831885 )
18841886 # stash this into the url actual too
1885- self .url_actual = self .parsed_result .metadata ["_internal" ][
1886- "url_actual"
1887- ] = resp . url
1887+ self .url_actual = self .parsed_result .metadata ["_internal" ]["url_actual" ] = (
1888+ resp . url
1889+ )
18881890 # stash the encoding
18891891 self .parsed_result .metadata ["_internal" ]["encoding" ] = html_encoding = (
18901892 resp .encoding .lower () if resp .encoding else None
0 commit comments