__html__
doesn't contain any code 7 import typing_extensions as te
8
9 class HasHTML(te.Protocol):
10 def __html__(self) -> str: 11 pass
12
13
__call__
doesn't contain any code 9 import typing_extensions as te
10
11 class VisitCallable(te.Protocol):
12 def __call__(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:13 ...
14
15
__call__
doesn't contain any code 32 from .environment import Environment
33
34 class LoopRenderFunc(te.Protocol):
35 def __call__( 36 self,
37 reciter: t.Iterable[V],
38 loop_render_func: "LoopRenderFunc",
__html__
doesn't contain any code 35 from .sandbox import SandboxedEnvironment # noqa: F401
36
37 class HasHTML(te.Protocol):
38 def __html__(self) -> str: 39 pass
40
41
npgettext
doesn't contain any code 34 def pgettext(self, context: str, message: str) -> str:
35 ...
36
37 def npgettext(self, context: str, singular: str, plural: str, n: int) -> str: 38 ...
39
40 _SupportedTranslations = t.Union[_TranslationsBasic, _TranslationsContext]
The function/method has been left empty here, without any comment or docstring. This can cause confusion later on why this was left empty.
def myfunc1(foo="Noncompliant"):
pass
class MyClass:
def mymethod1(self, foo="Noncompliant"):
pass
def myfunc1():
pass # comment explaining why this function is empty
def myfunc2():
raise NotImplementedError()
def myfunc3():
'''
Docstring explaining why this function is empty.
'''
class MyClass:
def mymethod1(self):
pass # comment explaining why this function is empty
def mymethod2(self):
raise NotImplementedError()
def mymethod3(self):
'''
Docstring explaining why this method is empty. Note that this is not recommended for classes
which are meant to be subclassed.
'''