lint: tidy up code some more, pylint is enforcing
This commit is contained in:
parent
66b3ccc0f0
commit
61564e8c01
17 changed files with 72 additions and 38 deletions
|
@ -21,9 +21,9 @@ class Activity(db.Model): # type: ignore
|
|||
text: str,
|
||||
added: Optional[datetime.datetime] = None,
|
||||
**kwargs: Any) -> None:
|
||||
if type(activity_type) != str or len(activity_type) > 20 or activity_type == "":
|
||||
if not isinstance(activity_type, str) or len(activity_type) > 20 or activity_type == "":
|
||||
raise TypeError("expected string for activity type between 1 and 20 characters")
|
||||
if type(text) != str:
|
||||
if not isinstance(text, str):
|
||||
raise TypeError("expected string for text")
|
||||
super().__init__(id=id,
|
||||
group_id=group_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue