Skip to content

Commit

Permalink
⚡ Update(settings) resolve_format method type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
MEHRSHAD-MIRSHEKARY committed Aug 18, 2024
1 parent 3fcda2a commit a48af82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_logging/settings/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
log_email_notifier_log_format
)

def _resolve_file_formats(self, log_file_formats):
def _resolve_file_formats(self, log_file_formats: Dict[str, Union[int, str]]) -> Dict:
resolved_formats = {}
for level in self.log_levels:
format_option = log_file_formats.get(level, None)
Expand Down Expand Up @@ -75,7 +75,7 @@ def remove_ansi_escape_sequences(log_message: str) -> str:
return ansi_escape.sub("", log_message)

@staticmethod
def resolve_format(_format: Union[int, str], use_colors: bool = False):
def resolve_format(_format: Union[int, str], use_colors: bool = False) -> str:
if _format:
if isinstance(_format, int):
resolved_format = FORMAT_OPTIONS.get(_format, FORMAT_OPTIONS[1])
Expand Down

0 comments on commit a48af82

Please sign in to comment.