Skip to content

Commit bef0cb5

Browse files
committed
Make from_path more of a constructor with classmethod
1 parent 10ca42b commit bef0cb5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,11 @@ def __repr__(self):
203203
ret = f"{self.created_by},{self.created_by_contact},{self.paragraphs}"
204204
return ret
205205

206-
def from_path(fpath: Path) -> Optional[Comment]:
206+
@classmethod
207+
def from_path(cls, fpath: Path) -> Optional[Comment]:
208+
"""
209+
Constructor for Comment, from a comment file.
210+
"""
207211
if not fpath.exists():
208212
return None
209213

0 commit comments

Comments
 (0)