fix code report issues (#37657)
Co-authored-by: Catalina Peralta <caperal@microsoft.com>
This commit is contained in:
Родитель
c6d4b950d8
Коммит
10bea08627
|
@ -260,6 +260,8 @@ def get_parameter_type(annotation) -> str:
|
|||
if isinstance(annotation, ast.Attribute):
|
||||
return annotation.attr
|
||||
if isinstance(annotation, ast.Constant):
|
||||
if annotation.value is None:
|
||||
return "None"
|
||||
return annotation.value
|
||||
if isinstance(annotation, ast.Subscript):
|
||||
if isinstance(annotation.slice, tuple):
|
||||
|
@ -396,6 +398,7 @@ def create_class_report(cls: Type) -> Dict:
|
|||
m = getattr(cls, method)
|
||||
except AttributeError:
|
||||
_LOGGER.info(f"Skipping method check for {method} on {cls}.")
|
||||
continue
|
||||
|
||||
if inspect.isfunction(m) or inspect.ismethod(m):
|
||||
if inspect.iscoroutinefunction(m):
|
||||
|
|
Загрузка…
Ссылка в новой задаче