From e4ae0fea63c0386c1b3239607fd6a58738d23633 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 9 Mar 2022 16:28:55 -0800 Subject: [PATCH] fix type annotation --- docs/parsers/pidstat_s.md | 2 +- docs/parsers/rsync_s.md | 2 +- jc/parsers/foo_s.py | 4 ++-- jc/parsers/pidstat_s.py | 4 ++-- jc/parsers/rsync_s.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/parsers/pidstat_s.md b/docs/parsers/pidstat_s.md index cc049b34..01118d3f 100644 --- a/docs/parsers/pidstat_s.md +++ b/docs/parsers/pidstat_s.md @@ -63,7 +63,7 @@ Examples: def parse(data: Iterable[str], raw: bool = False, quiet: bool = False, - ignore_exceptions: bool = False) -> Union[Iterable[Dict], tuple] + ignore_exceptions: bool = False) -> Union[Iterable[Dict], NoReturn] ``` Main text parsing generator function. Returns an iterator object. diff --git a/docs/parsers/rsync_s.md b/docs/parsers/rsync_s.md index b3e41c30..810ac37b 100644 --- a/docs/parsers/rsync_s.md +++ b/docs/parsers/rsync_s.md @@ -102,7 +102,7 @@ Examples: def parse(data: Iterable[str], raw: bool = False, quiet: bool = False, - ignore_exceptions: bool = False) -> Union[Iterable[Dict], tuple] + ignore_exceptions: bool = False) -> Union[Iterable[Dict], NoReturn] ``` Main text parsing generator function. Returns an iterator object. diff --git a/jc/parsers/foo_s.py b/jc/parsers/foo_s.py index 1113202d..ae40743c 100644 --- a/jc/parsers/foo_s.py +++ b/jc/parsers/foo_s.py @@ -49,7 +49,7 @@ Examples: {example output} ... """ -from typing import Dict, Iterable, Union +from typing import Dict, Iterable, Union, NoReturn import jc.utils from jc.streaming import ( add_jc_meta, streaming_input_type_check, streaming_line_input_type_check, raise_or_yield @@ -99,7 +99,7 @@ def parse( raw: bool = False, quiet: bool = False, ignore_exceptions: bool = False -) -> Union[Iterable[Dict], tuple]: +) -> Union[Iterable[Dict], NoReturn]: """ Main text parsing generator function. Returns an iterator object. diff --git a/jc/parsers/pidstat_s.py b/jc/parsers/pidstat_s.py index 281f82aa..4c79d612 100644 --- a/jc/parsers/pidstat_s.py +++ b/jc/parsers/pidstat_s.py @@ -49,7 +49,7 @@ Examples: {example output} ... """ -from typing import Dict, Iterable, Union +from typing import Dict, Iterable, Union, NoReturn import jc.utils from jc.streaming import ( add_jc_meta, streaming_input_type_check, streaming_line_input_type_check, raise_or_yield @@ -103,7 +103,7 @@ def parse( raw: bool = False, quiet: bool = False, ignore_exceptions: bool = False -) -> Union[Iterable[Dict], tuple]: +) -> Union[Iterable[Dict], NoReturn]: """ Main text parsing generator function. Returns an iterator object. diff --git a/jc/parsers/rsync_s.py b/jc/parsers/rsync_s.py index 94b874e3..8beec964 100644 --- a/jc/parsers/rsync_s.py +++ b/jc/parsers/rsync_s.py @@ -89,7 +89,7 @@ Examples: ... """ import re -from typing import Dict, Iterable, Union +from typing import Dict, Iterable, Union, NoReturn import jc.utils from jc.streaming import ( add_jc_meta, streaming_input_type_check, streaming_line_input_type_check, raise_or_yield @@ -148,7 +148,7 @@ def parse( raw: bool = False, quiet: bool = False, ignore_exceptions: bool = False -) -> Union[Iterable[Dict], tuple]: +) -> Union[Iterable[Dict], NoReturn]: """ Main text parsing generator function. Returns an iterator object.