MCPcopy Index your code
hub / github.com/python/mypy / check_decorated_function_is_method

Method check_decorated_function_is_method

mypy/semanal.py:1823–1825  ·  view source on GitHub ↗
(self, decorator: str, context: Context)

Source from the content-addressed store, hash-verified

1821 self.fail(message_registry.CLASS_PATTERN_CLASS_OR_STATIC_METHOD, dec)
1822
1823 def check_decorated_function_is_method(self, decorator: str, context: Context) -> None:
1824 if not self.type or self.is_func_scope():
1825 self.fail(f'"{decorator}" used with a non-method', context)
1826
1827 #
1828 # Classes

Callers 1

visit_decoratorMethod · 0.95

Calls 2

is_func_scopeMethod · 0.95
failMethod · 0.95

Tested by

no test coverage detected