mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 13:05:45 +00:00
chore: release 2.3.3 (#2)
* linting * adding py.typed * adding pyyaml types * workaround #1 * updating latest * updating dev dependencies * adding isort mypy safety * chore: prepare release 2.3.3
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
"""Module containing the version of panaetius."""
|
||||
|
||||
__version__ = "2.3.2"
|
||||
__version__ = "2.3.3"
|
||||
|
||||
@@ -79,9 +79,7 @@ class Config:
|
||||
if self.skip_header_init:
|
||||
config_file_location = self.config_path / "config.yml"
|
||||
else:
|
||||
config_file_location = (
|
||||
self.config_path / self.header_variable / "config.yml"
|
||||
)
|
||||
config_file_location = self.config_path / self.header_variable / "config.yml"
|
||||
try:
|
||||
with open(config_file_location, "r", encoding="utf-8") as config_file:
|
||||
# return dict(toml.load(config_file))
|
||||
|
||||
@@ -106,6 +106,11 @@ class LoggingData(metaclass=ABCMeta):
|
||||
def format(self) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def logging_level(self) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self, logging_level: str):
|
||||
raise NotImplementedError
|
||||
@@ -119,8 +124,12 @@ class SimpleLogger(LoggingData):
|
||||
'"%(levelname)s",\n\t"message": "%(message)s"\n}',
|
||||
)
|
||||
|
||||
@property
|
||||
def logging_level(self) -> str:
|
||||
return self._logging_level
|
||||
|
||||
def __init__(self, logging_level: str = "INFO"):
|
||||
self.logging_level = logging_level
|
||||
self._logging_level = logging_level
|
||||
|
||||
|
||||
class AdvancedLogger(LoggingData):
|
||||
@@ -133,8 +142,12 @@ class AdvancedLogger(LoggingData):
|
||||
'"%(levelname)s",\n\t"message": "%(message)s"\n}',
|
||||
)
|
||||
|
||||
@property
|
||||
def logging_level(self) -> str:
|
||||
return self._logging_level
|
||||
|
||||
def __init__(self, logging_level: str = "INFO"):
|
||||
self.logging_level = logging_level
|
||||
self._logging_level = logging_level
|
||||
|
||||
|
||||
class CustomLogger(LoggingData):
|
||||
@@ -142,6 +155,10 @@ class CustomLogger(LoggingData):
|
||||
def format(self) -> str:
|
||||
return str(self._format)
|
||||
|
||||
@property
|
||||
def logging_level(self) -> str:
|
||||
return self._logging_level
|
||||
|
||||
def __init__(self, logging_format: str, logging_level: str = "INFO"):
|
||||
self.logging_level = logging_level
|
||||
self._logging_level = logging_level
|
||||
self._format = logging_format
|
||||
|
||||
0
panaetius/py.typed
Normal file
0
panaetius/py.typed
Normal file
Reference in New Issue
Block a user