-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mvinyard/bug-fix
Fix error-prone logging
- Loading branch information
Showing
1 changed file
with
4 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
__module_name__ = "_abc_parse.py" | ||
__doc__ = """Better abstract base class for auto-parsing inputs.""" | ||
__author__ = ", ".join(["Michael E. Vinyard"]) | ||
__email__ = ", ".join(["[email protected]"]) | ||
|
||
|
||
# -- import packages: --------------------------------------------------------- | ||
import abc | ||
|
||
|
@@ -15,11 +9,14 @@ | |
|
||
# -- Controller class: -------------------------------------------------------- | ||
class ABCParse(abc.ABC): | ||
""" | ||
Better abstract base class for auto-parsing inputs. | ||
""" | ||
_BUILT = False | ||
|
||
def __init__(self, *args, **kwargs) -> None: | ||
""" | ||
we avoid defining things in __init__ because this subsequently | ||
We avoid defining things in __init__ because this subsequently | ||
mandates the use of `super().__init__()` | ||
Example | ||
|
@@ -147,10 +144,6 @@ def __parse__( | |
for key, val in kwargs.items(): | ||
if not key in self._IGNORE: | ||
self.__set__(key, val, public, private) | ||
|
||
# Then log after attributes are set | ||
self._cls_logger.debug(f"Parsing kwargs: {kwargs}") | ||
self._cls_logger.debug(f"Parsed {len(self._PARAMS)} parameters") | ||
|
||
def __update__( | ||
self, | ||
|