mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
Fix errors reported by mypy
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f3ba709d21
commit
bfd0544ff8
13 changed files with 68 additions and 71 deletions
|
|
@ -98,7 +98,7 @@ class Stream:
|
|||
self.stream = stream
|
||||
self.flags = flags
|
||||
|
||||
_streams: dict[int, io.IOBase] = dict()
|
||||
_streams: dict[int, Stream] = dict()
|
||||
_stream_descriptors = [reversed(range(1, 16))]
|
||||
|
||||
def add_capture_stream(stream, flags=0x0):
|
||||
|
|
@ -120,7 +120,7 @@ def log_level(s: Optional[str]=None) -> int: # export
|
|||
return _level
|
||||
return parse_log_prio_str(s)
|
||||
|
||||
def get_caller_pos(up: int = 1, kwargs: Optional[dict[str, Any]] = None) -> Tuple[str, int]:
|
||||
def get_caller_pos(up: int = 1, kwargs: Optional[dict[str, Any]] = None) -> Tuple[str, str, int]:
|
||||
if kwargs and 'caller' in kwargs:
|
||||
r = kwargs['caller']
|
||||
del kwargs['caller']
|
||||
|
|
@ -261,10 +261,10 @@ def set_level(level_: str) -> None: # export
|
|||
return
|
||||
_level = level_
|
||||
|
||||
def set_flags(flags: str|None) -> None: # export
|
||||
def set_flags(flags: str|None) -> str: # export
|
||||
global _flags
|
||||
ret = ','.join(_flags)
|
||||
if _flags is not None:
|
||||
if flags is not None:
|
||||
_flags = set(flags.split(','))
|
||||
return ret
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue