Skip to content

Commit

Permalink
Fix tuple expression in type annotation
Browse files Browse the repository at this point in the history
Fix error thrown byu VSCode: 

"Tuple expression not allowed in type annotation
Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type"
  • Loading branch information
LunaPrau authored May 15, 2024
1 parent 552d00f commit 22c84cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aposteriori/data_prep/create_frame_data_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def encode_atom(self, atom_label: str) -> np.ndarray:

def encode_gaussian_atom(
self, atom_label: str, modifiers_triple: t.Tuple[float, float, float]
) -> (np.ndarray, int):
) -> tuple[np.ndarray, int]:
"""
Encodes atom as a 3x3 gaussian with length of encoder length. Only the
C, N and O atoms are represented in gaussian form. If Ca and Cb are
Expand Down Expand Up @@ -1255,7 +1255,7 @@ def _select_pdb_chain(
verbosity: int,
return_chain_path: bool = True,
nmr_state: int = None,
) -> (pathlib.Path, ampal.Assembly):
) -> tuple[pathlib.Path, ampal.Assembly]:
"""
Select a chain from a pdb file. The chain will remove the original pdb file.
At the moment we only support the selection of one chain at the time, meaning
Expand Down

0 comments on commit 22c84cd

Please sign in to comment.