FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use Final instead of Literal in logging by srittau · Pull Request #7259 · python/typeshed · GitHub

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .pyi  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
18 changes: 9 additions & 9 deletions stdlib/logging/__init__.pyi
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 characters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from string import Template
from time import struct_time
from types import FrameType, TracebackType
from typing import Any, ClassVar, Generic, Optional, Pattern, TextIO, TypeVar, Union, overload
from typing_extensions import Literal
from typing_extensions import Final, Literal

_SysExcInfoType = Union[tuple[type[BaseException], BaseException, Optional[TracebackType]], tuple[None, None, None]]
_ExcInfoType = Union[None, bool, _SysExcInfoType, BaseException]
Expand Down Expand Up @@ -245,14 +245,14 @@ class Logger(Filterer):
def hasHandlers(self) -> bool: ...
def callHandlers(self, record: LogRecord) -> None: ... # undocumented

CRITICAL: Literal[50]
FATAL: Literal[50]
ERROR: Literal[40]
WARNING: Literal[30]
WARN: Literal[30]
INFO: Literal[20]
DEBUG: Literal[10]
NOTSET: Literal[0]
CRITICAL: Final = 50
FATAL: Final = 50
ERROR: Final = 40
WARNING: Final = 30
WARN: Final = 30
INFO: Final = 20
DEBUG: Final = 10
NOTSET: Final = 0

class Handler(Filterer):
level: int # undocumented
Expand Down

Back | FazBrowse Home | New Git URL