MCPcopy
hub / github.com/beeware/toga / NotImplementedWarning

Class NotImplementedWarning

core/src/toga/__init__.py:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35class NotImplementedWarning(RuntimeWarning):
36 # pytest.warns() requires that Warning() subclasses are constructed by passing a
37 # single argument (the warning message). Use a factory method to avoid reproducing
38 # the message format and the warn invocation.
39 @classmethod
40 def warn(cls, platform: str, feature: str) -> None:
41 """Raise a warning that a feature isn't implemented on a platform."""
42 warnings.warn(
43 NotImplementedWarning(f"[{platform}] Not implemented: {feature}"),
44 stacklevel=2,
45 )
46
47
48__version__ = version("toga-core")

Callers 1

warnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected