MCPcopy Create free account
hub / github.com/tox-dev/filelock / __init_subclass__

Method __init_subclass__

src/filelock/_api.py:147–150  ·  view source on GitHub ↗

Setup unique state for lock subclasses.

(cls, **kwargs: dict[str, Any])

Source from the content-addressed store, hash-verified

145 _instances: WeakValueDictionary[str, BaseFileLock]
146
147 def __init_subclass__(cls, **kwargs: dict[str, Any]) -> None:
148 """Setup unique state for lock subclasses."""
149 super().__init_subclass__(**kwargs)
150 cls._instances = WeakValueDictionary()
151
152 def __init__( # noqa: PLR0913
153 self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected