Created
May 29, 2020 02:51
-
-
Save jamesperes-zz/f4e42022f6a9749ac33f3d0969ee6fcf to your computer and use it in GitHub Desktop.
Revisions
-
jamesperes created this gist
May 29, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ from dataclasses import dataclass @dataclass class UserInfo(): """Entity to establish User info.""" id: int = None type: str = None company_number: int = None phone: int = None name: str = None def __bool__(self): """Validate if attributes are empties. Returns: False if id is empty. True if at least on is not empty. """ return bool(self.id)