20
20
"""
21
21
import inspect
22
22
import os
23
- import typing
24
23
from dataclasses import dataclass
24
+ from typing import Any , List , Optional , get_type_hints
25
25
26
26
from robot .api .deco import keyword # noqa F401
27
27
from robot .errors import DataError
@@ -243,7 +243,7 @@ def _get_types(cls, function):
243
243
def _get_typing_hints (cls , function ):
244
244
function = cls .unwrap (function )
245
245
try :
246
- hints = typing . get_type_hints (function )
246
+ hints = get_type_hints (function )
247
247
except Exception :
248
248
hints = function .__annotations__
249
249
arg_spec = cls ._get_arg_spec (function )
@@ -281,10 +281,10 @@ def __init__(self, argument_specification=None, documentation=None, argument_typ
281
281
282
282
283
283
class PluginParser :
284
- def __init__ (self , base_class : typing . Optional [typing . Any ] = None ):
284
+ def __init__ (self , base_class : Optional [Any ] = None ):
285
285
self ._base_class = base_class
286
286
287
- def parse_plugins (self , plugins : str ) -> typing . List :
287
+ def parse_plugins (self , plugins : str ) -> List :
288
288
imported_plugins = []
289
289
importer = Importer ("test library" )
290
290
for parsed_plugin in self ._string_to_modules (plugins ):
@@ -299,7 +299,7 @@ def parse_plugins(self, plugins: str) -> typing.List:
299
299
imported_plugins .append (plugin )
300
300
return imported_plugins
301
301
302
- def get_plugin_keywords (self , plugins : typing . List ):
302
+ def get_plugin_keywords (self , plugins : List ):
303
303
return DynamicCore (plugins ).get_keyword_names ()
304
304
305
305
def _string_to_modules (self , modules ):
0 commit comments