Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit 72d562f

Browse files
committed
Add mypy configuration, typing fixes
1 parent df37340 commit 72d562f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ line_length = 119
1818
multi_line_output = 3
1919
use_parentheses = true
2020
include_trailing_comma = true
21+
22+
23+
[tool.mypy]
24+
exclude = "thirdparty"
25+

seleniumwire/request.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def __repr__(self):
1919
class Request:
2020
"""Represents an HTTP request."""
2121

22+
_body: bytes
23+
2224
def __init__(self, *, method: str, url: str, headers: Iterable[Tuple[str, str]], body: bytes = b''):
2325
"""Initialise a new Request object.
2426
@@ -119,7 +121,7 @@ def host(self) -> str:
119121
"""
120122
return urlsplit(self.url).netloc
121123

122-
@path.setter
124+
@path.setter # type: ignore
123125
def path(self, p: str):
124126
parts = list(urlsplit(self.url))
125127
parts[2] = p

0 commit comments

Comments
 (0)