3232 # noinspection PyPackageRequirements
3333 import simplejson as json
3434except ImportError :
35- import json
35+ import json # type: ignore
3636
3737logger : logging .Logger = logging .getLogger (__name__ )
3838_T = TypeVar ("_T" )
@@ -93,7 +93,7 @@ def get(self) -> Optional[_T]:
9393 self .__items = self .__items [:- 1 ]
9494 return result
9595
96- def last (self ) -> _T :
96+ def last (self ) -> Optional [ _T ] :
9797 """Return the last element from the queue, but does not remove it.
9898
9999 :return: The last element in the queue.
@@ -186,7 +186,7 @@ def gen_attributes(rp_attributes: Iterable[str]) -> list[dict[str, str]]:
186186 return attributes
187187
188188
189- def get_launch_sys_attrs () -> dict [str , str ]:
189+ def get_launch_sys_attrs () -> dict [str , Any ]:
190190 """Generate attributes for the launch containing system information.
191191
192192 :return: dict {'os': 'Windows',
@@ -201,14 +201,14 @@ def get_launch_sys_attrs() -> dict[str, str]:
201201 }
202202
203203
204- def get_package_parameters (package_name : str , parameters : list [str ] = None ) -> list [Optional [str ]]:
204+ def get_package_parameters (package_name : str , parameters : Optional [ list [str ] ] = None ) -> list [Optional [str ]]:
205205 """Get parameters of the given package.
206206
207207 :param package_name: Name of the package.
208208 :param parameters: Wanted parameters.
209209 :return: Parameter List.
210210 """
211- result = []
211+ result : list [ Optional [ str ]] = []
212212 if not parameters :
213213 return result
214214
0 commit comments