7
7
8
8
from collections .abc import AsyncGenerator
9
9
from dataclasses import dataclass
10
+ from typing import Any
10
11
11
12
from nodestream .pipeline import Extractor
12
13
19
20
logger = get_plugin_logger (__name__ )
20
21
21
22
22
- def _dict_val_to_bool (d : dict [str , any ], key : str ) -> bool :
23
+ def _dict_val_to_bool (d : dict [str , Any ], key : str ) -> bool :
23
24
value = d .get (key )
24
25
if value is None :
25
26
return False
@@ -46,7 +47,7 @@ def user_any(self) -> bool:
46
47
return self .user_public or self .user_private
47
48
48
49
@staticmethod
49
- def from_dict (raw_dict : dict [str , any ]) -> "CollectWhichRepos" :
50
+ def from_dict (raw_dict : dict [str , Any ]) -> "CollectWhichRepos" :
50
51
org_all = _dict_val_to_bool (raw_dict , "org_all" )
51
52
user_all = _dict_val_to_bool (raw_dict , "user_all" )
52
53
@@ -62,8 +63,8 @@ def from_dict(raw_dict: dict[str, any]) -> "CollectWhichRepos":
62
63
class GithubReposExtractor (Extractor ):
63
64
def __init__ (
64
65
self ,
65
- collecting : CollectWhichRepos | dict [str , any ] | None = None ,
66
- ** kwargs : any ,
66
+ collecting : CollectWhichRepos | dict [str , Any ] | None = None ,
67
+ ** kwargs : dict [ str , Any ] ,
67
68
):
68
69
if isinstance (collecting , CollectWhichRepos ):
69
70
self .collecting = collecting
0 commit comments