output

class svst.output.output_structure_constructor(file_name, line_number, variable_name, variable_scope)[source]

Constructor for dictionary output.

Parameters:
  • file_name (Optional[str]) – Name of the file being analysed. None when parse_code is used on bare str.

  • line_number (int) – int number of the line where the error occurred.

  • variable_name (str) – Name of the variable where the error occurred.

  • variable_scope (str) – Scope of the variable where the error occurred.

Returns:

file_name: Optional[str], line_number: int, variable_name: str, variable_scope: str

Return type:

OutputTypedDict(TypedDict)

class svst.output.output_string_constructor(output_structure)[source]

Constructor for string output.

Parameters:

output_structure (OutputTypedDict) – file_name: Optional[str], line_number: int, variable_name: str, variable_scope: str

Returns:

{file_name}:{line_number}: error: Variable “{variable_name}” is missing a standalone variable type annotation in the scope “{variable_scope}” [no-untyped-var]

Return type:

str

class svst.output.output_string_converter_terminal(output_string)[source]

Converts a plain error string into a colored printable one.

Parameters:

output_string (str) – Plain svst error output string.

Return type:

str

Returns:

Colored printable string.