1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Enables SIM ruff lint

This commit is contained in:
Jair Henrique
2025-11-19 10:14:34 -03:00
parent 73eed94c47
commit bb690833bc
16 changed files with 84 additions and 75 deletions

View File

@@ -1,5 +1,6 @@
import logging
import warnings
from contextlib import suppress
from io import BytesIO
from urllib.parse import parse_qsl, urlparse
@@ -80,10 +81,9 @@ class Request:
def port(self):
port = self.parsed_uri.port
if port is None:
try:
with suppress(KeyError):
port = {"https": 443, "http": 80}[self.parsed_uri.scheme]
except KeyError:
pass
return port
@property