Typing/annotation can be simplified and use modern Python versions syntax as we are using from __future__ import annotations:
- Remove unnecessary types such as Dict, List, Tuple, Union, etc from
from typing import ...
- Modify functions/methods to use native types and | instead of Union
For example:
def find_network_by_record_id(
self,
record_keys: List[Tuple[str, str]],
max_degrees: int,
build_out_degrees: int,
build_out_max_entities: int,
flags: int = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS,
) -> str:
becomes:
def find_network_by_record_id(
self,
record_keys: list[tuple[str, str]],
max_degrees: int,
build_out_degrees: int,
build_out_max_entities: int,
flags: int = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS,
) -> str:
Typing/annotation can be simplified and use modern Python versions syntax as we are using
from __future__ import annotations:from typing import ...For example:
becomes: