We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#pragma: no cover
1 parent 6a4daf3 commit 1443cd1Copy full SHA for 1443cd1
src/rfc3986/validators.py
@@ -443,7 +443,11 @@ def subauthority_component_is_valid(
443
return True
444
445
# We know it has to have fewer than 6 digits if it exists.
446
- if not (port.isdigit() and len(port) < 6):
+ if not (port.isdigit() and len(port) < 6): # pragma: no cover
447
+ # This branch can only execute when this function is called directly
448
+ # with a URI reference manually constructed with an invalid port.
449
+ # Such a use case is unsupported, since this function isn't part of
450
+ # the public API.
451
return False
452
453
return 0 <= int(port) <= 65535
0 commit comments