MCPcopy Create free account
hub / github.com/python/mypy / protocol_members_cant_be_final

Method protocol_members_cant_be_final

mypy/messages.py:1662–1663  ·  view source on GitHub ↗
(self, ctx: Context)

Source from the content-addressed store, hash-verified

1660 self.fail(f'Cannot assign to final {kind} "{unmangle(name)}"', ctx)
1661
1662 def protocol_members_cant_be_final(self, ctx: Context) -> None:
1663 self.fail("Protocol member cannot be final", ctx)
1664
1665 def final_without_value(self, ctx: Context) -> None:
1666 self.fail("Final name must be initialized with a value", ctx)

Callers 2

visit_decoratorMethod · 0.80
unwrap_finalMethod · 0.80

Calls 1

failMethod · 0.95

Tested by

no test coverage detected