MCPcopy
hub / github.com/powerline/powerline / type

Method type

powerline/lint/spec.py:379–390  ·  view source on GitHub ↗

Describe value that has one of the types given in arguments :param args: List of accepted types. Since :py:class:`Spec` is supposed to describe JSON values only ``dict``, ``list``, ``unicode``, ``bool``, ``float`` and ``NoneType`` types make any sense. :return: self.

(self, *args)

Source from the content-addressed store, hash-verified

377 return self
378
379 def type(self, *args):
380 '''Describe value that has one of the types given in arguments
381
382 :param args:
383 List of accepted types. Since :py:class:`Spec` is supposed to
384 describe JSON values only ``dict``, ``list``, ``unicode``, ``bool``,
385 ``float`` and ``NoneType`` types make any sense.
386
387 :return: self.
388 '''
389 self.checks.append(('check_type', args))
390 return self
391
392 cmp_funcs = {
393 'le': lambda x, y: x <= y,

Callers 9

updateMethod · 0.95
printableMethod · 0.95
cmpMethod · 0.95
unsignedMethod · 0.95
listMethod · 0.95
tupleMethod · 0.95
reMethod · 0.95
__init__.pyFile · 0.80
checks.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected