MCPcopy Create free account
hub / github.com/python-hyper/uritemplate / reserved_characters

Method reserved_characters

uritemplate/variable.py:71–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 reserved_pipe = "|"
70
71 def reserved_characters(self) -> str:
72 # TODO: Re-enable after un-commenting 3.9
73 # match self:
74 # case Operator.reserved:
75 # return _RESERVED_CHARACTERS + "%"
76 # # case Operator.default | Operator.reserved | Operator.fragment:
77 # case Operator.fragment:
78 # return _RESERVED_CHARACTERS
79 # case _:
80 # return ""
81 if self == Operator.reserved:
82 return _RESERVED_CHARACTERS + "%"
83 if self == Operator.fragment:
84 return _RESERVED_CHARACTERS
85 return ""
86
87 def expansion_separator(self) -> str:
88 """Identify the separator used during expansion.

Callers 3

_query_expansionMethod · 0.80
_label_path_expansionMethod · 0.80
_semi_path_expansionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected