Skip to content

Commit 4ef809a

Browse files
committed
fix ruff lints
1 parent c1c2041 commit 4ef809a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@
8686
# -- linkcode
8787

8888
def linkcode_resolve(domain, info):
89-
import pigwig, os.path
89+
import os.path
90+
91+
import pigwig
9092
if domain != 'py' or not info['module']:
9193
return None
9294
module = info['module']

pigwig/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
from .request_response import Request, Response
33

44
__all__ = [
5-
'PigWig', 'default_exception_handler', 'default_http_exception_handler',
6-
'Request', 'Response',
5+
'PigWig', 'Request', 'Response',
6+
'default_exception_handler', 'default_http_exception_handler',
77
]

pigwig/pigwig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ def build_request(self, environ: dict) -> tuple[Request, Exception | None]:
186186
if http_cookie:
187187
cookies.load(http_cookie)
188188

189-
for key in environ:
189+
for key, val in environ.items():
190190
if key.startswith('HTTP_'):
191-
headers[key[5:].replace('_', '-')] = environ[key]
191+
headers[key[5:].replace('_', '-')] = val
192192
except Exception as e:
193193
err = e
194194

0 commit comments

Comments
 (0)