MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Point

Class Point

test/typing/plain_files/orm/composite.py:17–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16
17class Point:
18 def __init__(self, x: int, y: int):
19 self.x = x
20 self.y = y
21
22 def __composite_values__(self) -> Tuple[int, int]:
23 return self.x, self.y
24
25 def __repr__(self) -> str:
26 return "Point(x=%r, y=%r)" % (self.x, self.y)
27
28 def __eq__(self, other: Any) -> bool:
29 return (
30 isinstance(other, Point)
31 and other.x == self.x
32 and other.y == self.y
33 )
34
35 def __ne__(self, other: Any) -> bool:
36 return not self.__eq__(other)
37
38 @classmethod
39 def _generate(cls, x1: int, y1: int) -> "Point":
40 return Point(x1, y1)
41
42
43class Vertex(Base):

Callers 2

_generateMethod · 0.70
composite.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected