Skip to content

Commit caa1b51

Browse files
committed
drop unneeded Union
1 parent dc27351 commit caa1b51

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

httptools/parser/parser.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from typing import Union
21
from array import array
32
from .protocol import HTTPProtocol
43

@@ -36,7 +35,7 @@ class HttpParser:
3635
The method exposes a flag set just before on_headers_complete.
3736
Calling this method earlier will only yield `False`."""
3837

39-
def feed_data(self, data: Union[bytes, bytearray, memoryview, array[int]]) -> None:
38+
def feed_data(self, data: bytes | bytearray | memoryview | array[int]) -> None:
4039
"""Feed data to the parser.
4140
4241
Will eventually trigger callbacks on the ``protocol`` object.

httptools/parser/url_parser.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from typing import Union
21
from array import array
32

43
class URL:
@@ -10,5 +9,5 @@ class URL:
109
fragment: bytes
1110
userinfo: bytes
1211

13-
def parse_url(url: Union[bytes, bytearray, memoryview, array[int]]) -> URL:
12+
def parse_url(url: bytes | bytearray | memoryview | array[int]) -> URL:
1413
"""Parse a URL string into a structured Python object."""

0 commit comments

Comments
 (0)