MCPcopy
hub / github.com/hugapi/hug / doesnt_require

Method doesnt_require

hug/routing.py:99–107  ·  view source on GitHub ↗

Removes individual requirements while keeping all other defined ones within a route

(self, requirements, **overrides)

Source from the content-addressed store, hash-verified

97 )
98
99 def doesnt_require(self, requirements, **overrides):
100 """Removes individual requirements while keeping all other defined ones within a route"""
101 return self.where(
102 requires=tuple(
103 set(self.route.get("requires", ())).difference(
104 requirements if type(requirements) in (list, tuple) else (requirements,)
105 )
106 )
107 )
108
109 def map_params(self, **map_params):
110 """Map interface specific params to an internal name representation"""

Callers 1

test_doesnt_requireMethod · 0.80

Calls 2

whereMethod · 0.95
getMethod · 0.45

Tested by 1

test_doesnt_requireMethod · 0.64