11from __future__ import annotations
22
33from collections import namedtuple
4- from collections .abc import Mapping , Sequence
4+ from collections .abc import Iterable , Mapping , Sequence
55from copy import deepcopy
66from dataclasses import dataclass , field
77from datetime import datetime , timezone
@@ -82,7 +82,7 @@ class SnubaParams:
8282 environments : Sequence [Environment | None ] = field (default_factory = list )
8383 projects : Sequence [Project ] = field (default_factory = list )
8484 user : RpcUser | None = None
85- teams : Sequence [Team ] = field (default_factory = list )
85+ teams : Iterable [Team ] = field (default_factory = list )
8686 organization : Organization | None = None
8787
8888 def __post_init__ (self ) -> None :
@@ -106,27 +106,27 @@ def parse_stats_period(self) -> None:
106106 self .start = get_datetime_from_stats_period (self .stats_period , self .end )
107107
108108 @property
109- def environment_names (self ) -> Sequence [str ]:
109+ def environment_names (self ) -> list [str ]:
110110 return (
111111 [env .name if env is not None else "" for env in self .environments ]
112112 if self .environments
113113 else []
114114 )
115115
116116 @property
117- def project_ids (self ) -> Sequence [int ]:
117+ def project_ids (self ) -> list [int ]:
118118 return sorted ([proj .id for proj in self .projects ])
119119
120120 @property
121- def project_slug_map (self ) -> Mapping [str , int ]:
121+ def project_slug_map (self ) -> dict [str , int ]:
122122 return {proj .slug : proj .id for proj in self .projects }
123123
124124 @property
125- def project_id_map (self ) -> Mapping [int , str ]:
125+ def project_id_map (self ) -> dict [int , str ]:
126126 return {proj .id : proj .slug for proj in self .projects }
127127
128128 @property
129- def team_ids (self ) -> Sequence [int ]:
129+ def team_ids (self ) -> list [int ]:
130130 return [team .id for team in self .teams ]
131131
132132 @property
0 commit comments