initial commit
This commit is contained in:
23
deps/inkex/interfaces/IElement.py
vendored
Normal file
23
deps/inkex/interfaces/IElement.py
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Element abstractions for type comparisons without circular imports
|
||||
|
||||
.. versionadded:: 1.2"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Protocol, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..elements._svg import SvgDocumentElement
|
||||
|
||||
|
||||
class BaseElementProtocol(Protocol):
|
||||
"""Abstraction for BaseElement, to be used as typehint in mixin classes"""
|
||||
|
||||
def get_id(self, as_url=0) -> str:
|
||||
"""Returns the element ID. If not set, generates a unique ID."""
|
||||
...
|
||||
|
||||
@property
|
||||
def root(self) -> "SvgDocumentElement":
|
||||
"""Returns the element's root."""
|
||||
...
|
||||
0
deps/inkex/interfaces/__init__.py
vendored
Normal file
0
deps/inkex/interfaces/__init__.py
vendored
Normal file
BIN
deps/inkex/interfaces/__pycache__/IElement.cpython-312.pyc
vendored
Normal file
BIN
deps/inkex/interfaces/__pycache__/IElement.cpython-312.pyc
vendored
Normal file
Binary file not shown.
BIN
deps/inkex/interfaces/__pycache__/IElement.cpython-313.pyc
vendored
Normal file
BIN
deps/inkex/interfaces/__pycache__/IElement.cpython-313.pyc
vendored
Normal file
Binary file not shown.
BIN
deps/inkex/interfaces/__pycache__/__init__.cpython-312.pyc
vendored
Normal file
BIN
deps/inkex/interfaces/__pycache__/__init__.cpython-312.pyc
vendored
Normal file
Binary file not shown.
BIN
deps/inkex/interfaces/__pycache__/__init__.cpython-313.pyc
vendored
Normal file
BIN
deps/inkex/interfaces/__pycache__/__init__.cpython-313.pyc
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user