MCPcopy
hub / github.com/RUB-NDS/PRET / set_support

Method set_support

capabilities.py:184–196  ·  view source on GitHub ↗

┌───────────────────────────────────────────────────────┐ │ Experimental -- This might introduce false positives! │ ├───────────────────────────────────────────────────────┤ │ The stripped down version of the model string removes │ │ endings like '-series', '

(self, model)

Source from the content-addressed store, hash-verified

182 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
183 # set language support
184 def set_support(self, model):
185 # model_stripped = re.sub(r'(\d|\s|-)[a-zA-Z]+$', '', model)
186 '''
187 ┌───────────────────────────────────────────────────────┐
188 │ Experimental -- This might introduce false positives! │
189 ├───────────────────────────────────────────────────────┤
190 │ The stripped down version of the model string removes │
191 │ endings like '-series', ' printer' (maybe localized), │
192'd' (duplex), 't' (tray), 'c' (color), 'n' (network). │
193 └───────────────────────────────────────────────────────┘
194 '''
195 self.support = [_f for _f in [re.findall(
196 re.escape(m), model, re.I) for m in self.models] if _f]
197
198 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
199 # open database of supported devices

Callers 3

ippMethod · 0.95
httpMethod · 0.95
httpsMethod · 0.95

Calls 1

escapeMethod · 0.80

Tested by

no test coverage detected