I am trying to create the following type hints in Python, but I has thus far been unable to find a way to actively use my class attributes as type hints: @dataclass class MyClass: x: int y: int def my_method(self) -> np.ndarray([tuple[self.x, self.y], np.float32]): pass Is this possible in Python, or do I have to just write the generic int instead of self.x and self.y in the type hint? Continue reading...