mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
committed by
Matthias Kramm
parent
915a91f80d
commit
0aa7138c4e
@@ -20,6 +20,8 @@ _ArgsType = Union[Tuple[Any, ...], Dict[str, Any]]
|
||||
_FilterType = Union['Filter', Callable[['LogRecord'], int]]
|
||||
_Level = Union[int, Text]
|
||||
|
||||
raiseExceptions: bool
|
||||
|
||||
|
||||
class Logger:
|
||||
name = ... # type: str
|
||||
@@ -111,6 +113,7 @@ class Logger:
|
||||
|
||||
|
||||
CRITICAL = ... # type: int
|
||||
FATAL = ... # type: int
|
||||
ERROR = ... # type: int
|
||||
WARNING = ... # type: int
|
||||
WARN = ... # type: int
|
||||
@@ -323,6 +326,7 @@ else:
|
||||
extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ...
|
||||
def log(lvl: int, msg: Text, *args: Any, exc_info: _ExcInfoType = ...,
|
||||
extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ...
|
||||
fatal = critical
|
||||
|
||||
def disable(lvl: int) -> None: ...
|
||||
def addLevelName(lvl: int, levelName: str) -> None: ...
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
from typing import Any, Callable, Dict, Optional, IO, Union
|
||||
import sys
|
||||
if sys.version_info >= (3,):
|
||||
# from configparser import RawConfigParser
|
||||
# TODO add RawConfigParser to configparser stubs
|
||||
RawConfigParser = Any
|
||||
from configparser import RawConfigParser
|
||||
else:
|
||||
from ConfigParser import RawConfigParser
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ if sys.version_info >= (3,):
|
||||
else:
|
||||
from Queue import Queue
|
||||
# TODO update socket stubs to add SocketKind
|
||||
SocketKind = int
|
||||
_SocketKind = int
|
||||
|
||||
|
||||
class WatchedFileHandler(Handler):
|
||||
@@ -122,7 +122,7 @@ class SysLogHandler(Handler):
|
||||
LOG_LOCAL6 = ... # type: int
|
||||
LOG_LOCAL7 = ... # type: int
|
||||
def __init__(self, address: Union[Tuple[str, int], str] = ...,
|
||||
facility: int = ..., socktype: SocketKind = ...) -> None: ...
|
||||
facility: int = ..., socktype: _SocketKind = ...) -> None: ...
|
||||
def encodePriority(self, facility: Union[int, str],
|
||||
priority: Union[int, str]) -> int: ...
|
||||
def mapPriority(self, levelName: int) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user