25
25
26
26
27
27
def uri_reference (
28
- uri : t .Union [str , bytes , bytearray ],
28
+ uri : t .Union [str , bytes ],
29
29
encoding : str = "utf-8" ,
30
30
) -> URIReference :
31
31
"""Parse a URI string into a URIReference.
@@ -42,7 +42,7 @@ def uri_reference(
42
42
43
43
44
44
def iri_reference (
45
- iri : t .Union [str , bytes , bytearray ],
45
+ iri : t .Union [str , bytes ],
46
46
encoding : str = "utf-8" ,
47
47
) -> IRIReference :
48
48
"""Parse a IRI string into an IRIReference.
@@ -59,7 +59,7 @@ def iri_reference(
59
59
60
60
61
61
def is_valid_uri (
62
- uri : t .Union [str , bytes , bytearray ],
62
+ uri : t .Union [str , bytes ],
63
63
encoding : str = "utf-8" ,
64
64
** kwargs : bool ,
65
65
) -> bool :
@@ -87,10 +87,7 @@ def is_valid_uri(
87
87
return URIReference .from_string (uri , encoding ).is_valid (** kwargs )
88
88
89
89
90
- def normalize_uri (
91
- uri : t .Union [str , bytes , bytearray ],
92
- encoding : str = "utf-8" ,
93
- ) -> str :
90
+ def normalize_uri (uri : t .Union [str , bytes ], encoding : str = "utf-8" ) -> str :
94
91
"""Normalize the given URI.
95
92
96
93
This is a convenience function. You could use either
@@ -106,10 +103,7 @@ def normalize_uri(
106
103
return normalized_reference .unsplit ()
107
104
108
105
109
- def urlparse (
110
- uri : t .Union [str , bytes , bytearray ],
111
- encoding : str = "utf-8" ,
112
- ) -> ParseResult :
106
+ def urlparse (uri : t .Union [str , bytes ], encoding : str = "utf-8" ) -> ParseResult :
113
107
"""Parse a given URI and return a ParseResult.
114
108
115
109
This is a partial replacement of the standard library's urlparse function.
0 commit comments