Skip to content

Commit

Permalink
Changes typing for logging level to accept str
Browse files Browse the repository at this point in the history
  • Loading branch information
heavelock committed Dec 2, 2020
1 parent 8a8250c commit 0e201ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rich/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime
from logging import Handler, LogRecord
from pathlib import Path
from typing import ClassVar, List, Optional, Type
from typing import ClassVar, List, Optional, Type, Union

from . import get_console
from ._log_render import LogRender
Expand Down Expand Up @@ -55,7 +55,7 @@ class RichHandler(Handler):

def __init__(
self,
level: int = logging.NOTSET,
level: Union[int, str] = logging.NOTSET,
console: Console = None,
*,
show_time: bool = True,
Expand Down

0 comments on commit 0e201ec

Please sign in to comment.