use Self type
This commit is contained in:
parent
1463535676
commit
4482ede3a7
17 changed files with 142 additions and 205 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Callable, TypeVar, TYPE_CHECKING
|
||||
from typing import Callable, Self, TYPE_CHECKING
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
import numpy
|
||||
|
|
@ -26,9 +26,6 @@ normalized_shape_tuple = tuple[
|
|||
DEFAULT_POLY_NUM_VERTICES = 24
|
||||
|
||||
|
||||
T = TypeVar('T', bound='Shape')
|
||||
|
||||
|
||||
class Shape(PositionableImpl, LayerableImpl, Rotatable, Mirrorable, Copyable, Scalable,
|
||||
PivotableImpl, RepeatableImpl, AnnotatableImpl, metaclass=ABCMeta):
|
||||
"""
|
||||
|
|
@ -68,7 +65,7 @@ class Shape(PositionableImpl, LayerableImpl, Rotatable, Mirrorable, Copyable, Sc
|
|||
pass
|
||||
|
||||
@abstractmethod
|
||||
def normalized_form(self: T, norm_value: int) -> normalized_shape_tuple:
|
||||
def normalized_form(self, norm_value: int) -> normalized_shape_tuple:
|
||||
"""
|
||||
Writes the shape in a standardized notation, with offset, scale, and rotation
|
||||
information separated out from the remaining values.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue