@@ -64,17 +64,17 @@ def geturl(self) -> t.AnyStr:
64
64
return self .unsplit ()
65
65
66
66
@property
67
- def hostname (self ) -> t .AnyStr :
67
+ def hostname (self ) -> t .Optional [ t . AnyStr ] :
68
68
"""Shim to match the standard library."""
69
69
return self .host
70
70
71
71
@property
72
- def netloc (self ) -> t .AnyStr :
72
+ def netloc (self ) -> t .Optional [ t . AnyStr ] :
73
73
"""Shim to match the standard library."""
74
74
return self .authority
75
75
76
76
@property
77
- def params (self ) -> t .AnyStr :
77
+ def params (self ) -> t .Optional [ t . AnyStr ] :
78
78
"""Shim to match the standard library."""
79
79
return self .query
80
80
@@ -210,7 +210,7 @@ def copy_with(
210
210
scheme : t .Optional [str ] = misc .UseExisting ,
211
211
userinfo : t .Optional [str ] = misc .UseExisting ,
212
212
host : t .Optional [str ] = misc .UseExisting ,
213
- port : t .Optional [str ] = misc .UseExisting ,
213
+ port : t .Optional [t . Union [ int , str ] ] = misc .UseExisting ,
214
214
path : t .Optional [str ] = misc .UseExisting ,
215
215
query : t .Optional [str ] = misc .UseExisting ,
216
216
fragment : t .Optional [str ] = misc .UseExisting ,
@@ -316,7 +316,7 @@ def from_parts(
316
316
scheme : t .Optional [str ] = None ,
317
317
userinfo : t .Optional [str ] = None ,
318
318
host : t .Optional [str ] = None ,
319
- port : t .Optional [t .Union [str , int ]] = None ,
319
+ port : t .Optional [t .Union [int , str ]] = None ,
320
320
path : t .Optional [str ] = None ,
321
321
query : t .Optional [str ] = None ,
322
322
fragment : t .Optional [str ] = None ,
0 commit comments