Skip to content

Commit 3881d67

Browse files
committed
Fix linter check
1 parent 9b45ea3 commit 3881d67

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

python-class/point.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33

44
# Point with slots
5-
class Point:
6-
__slots__ = ("x", "y")
5+
# class Point:
6+
# __slots__ = ("x", "y")
77

8-
def __init__(self, x, y):
9-
self.x = x
10-
self.y = y
8+
# def __init__(self, x, y):
9+
# self.x = x
10+
# self.y = y
1111

1212

1313
# Regular class
@@ -33,16 +33,16 @@ def __init__(self, x, y):
3333

3434

3535
# Dataclass
36-
# @dataclass
37-
# class ThreeDPoint:
38-
# x: int | float
39-
# y: int | float
40-
# z: int | float
41-
42-
# @classmethod
43-
# def from_sequence(cls, sequence):
44-
# return cls(*sequence)
45-
46-
# @staticmethod
47-
# def show_intro_message(name):
48-
# print(f"Hey {name}! This is your 3D Point!")
36+
@dataclass
37+
class ThreeDPoint:
38+
x: int | float
39+
y: int | float
40+
z: int | float
41+
42+
@classmethod
43+
def from_sequence(cls, sequence):
44+
return cls(*sequence)
45+
46+
@staticmethod
47+
def show_intro_message(name):
48+
print(f"Hey {name}! This is your 3D Point!")

0 commit comments

Comments
 (0)