2020"""
2121import inspect
2222import os
23- import typing
2423from dataclasses import dataclass
24+ from typing import Any , List , Optional , get_type_hints
2525
2626from robot .api .deco import keyword # noqa F401
2727from robot .errors import DataError
@@ -243,7 +243,7 @@ def _get_types(cls, function):
243243 def _get_typing_hints (cls , function ):
244244 function = cls .unwrap (function )
245245 try :
246- hints = typing . get_type_hints (function )
246+ hints = get_type_hints (function )
247247 except Exception :
248248 hints = function .__annotations__
249249 arg_spec = cls ._get_arg_spec (function )
@@ -281,10 +281,10 @@ def __init__(self, argument_specification=None, documentation=None, argument_typ
281281
282282
283283class PluginParser :
284- def __init__ (self , base_class : typing . Optional [typing . Any ] = None ):
284+ def __init__ (self , base_class : Optional [Any ] = None ):
285285 self ._base_class = base_class
286286
287- def parse_plugins (self , plugins : str ) -> typing . List :
287+ def parse_plugins (self , plugins : str ) -> List :
288288 imported_plugins = []
289289 importer = Importer ("test library" )
290290 for parsed_plugin in self ._string_to_modules (plugins ):
@@ -299,7 +299,7 @@ def parse_plugins(self, plugins: str) -> typing.List:
299299 imported_plugins .append (plugin )
300300 return imported_plugins
301301
302- def get_plugin_keywords (self , plugins : typing . List ):
302+ def get_plugin_keywords (self , plugins : List ):
303303 return DynamicCore (plugins ).get_keyword_names ()
304304
305305 def _string_to_modules (self , modules ):
0 commit comments