Commit 53ca535b authored by Camilla Dodge Koslowsky Harris's avatar Camilla Dodge Koslowsky Harris
Browse files

Completed type annotations

parent b69bc50c
...@@ -26,7 +26,7 @@ import re ...@@ -26,7 +26,7 @@ import re
import numpy as np import numpy as np
import tecplot import tecplot
def apply_equations(eqn_path: str, verbose: bool = False): def apply_equations(eqn_path: str, verbose: bool = False) -> None:
"""Apply an equations file in the Tecplot macro format to the active dataset """Apply an equations file in the Tecplot macro format to the active dataset
Please reference the Tecplot User's Manual for more details on Please reference the Tecplot User's Manual for more details on
...@@ -88,7 +88,7 @@ def apply_equations(eqn_path: str, verbose: bool = False): ...@@ -88,7 +88,7 @@ def apply_equations(eqn_path: str, verbose: bool = False):
print('Successfully applied equations.') print('Successfully applied equations.')
def _shell_geometry(geometry_params): def _shell_geometry(geometry_params:dict) -> dict:
"""Returns a dict containing points for the described shell geometry. """Returns a dict containing points for the described shell geometry.
""" """
npoints = geometry_params['npoints'][0]*geometry_params['npoints'][1] npoints = geometry_params['npoints'][0]*geometry_params['npoints'][1]
...@@ -98,7 +98,7 @@ def _shell_geometry(geometry_params): ...@@ -98,7 +98,7 @@ def _shell_geometry(geometry_params):
return geometry_points return geometry_points
def _line_geometry(geometry_params): def _line_geometry(geometry_params:dict) -> dict:
"""Returns a dict containing points for the described line geometry. """Returns a dict containing points for the described line geometry.
""" """
geometry_points = { geometry_points = {
...@@ -107,7 +107,7 @@ def _line_geometry(geometry_params): ...@@ -107,7 +107,7 @@ def _line_geometry(geometry_params):
return geometry_points return geometry_points
def _rectprism_geometry(geometry_params): def _rectprism_geometry(geometry_params:dict) -> dict:
"""Returns a dict containing points for the described rectprism geometry. """Returns a dict containing points for the described rectprism geometry.
""" """
npoints = (geometry_params['npoints'][0] npoints = (geometry_params['npoints'][0]
...@@ -119,7 +119,7 @@ def _rectprism_geometry(geometry_params): ...@@ -119,7 +119,7 @@ def _rectprism_geometry(geometry_params):
return geometry_points return geometry_points
def _trajectory_geometry(geometry_params): def _trajectory_geometry(geometry_params:dict) -> dict:
"""Returns a dict containing points for the described trajectory geometry. """Returns a dict containing points for the described trajectory geometry.
Assumes format of trajectory file after SWMF SATELLITE command. Assumes format of trajectory file after SWMF SATELLITE command.
...@@ -156,12 +156,12 @@ def _trajectory_geometry(geometry_params): ...@@ -156,12 +156,12 @@ def _trajectory_geometry(geometry_params):
return geometry_points return geometry_points
def _save_hdf5(): def _save_hdf5() -> None:
"""Save the aux data and a subset of the variables in hdf5 format. """Save the aux data and a subset of the variables in hdf5 format.
""" """
def _save_csv(): def _save_csv() -> None:
"""Save the aux data and a subset of the variables in plain-text format. """Save the aux data and a subset of the variables in plain-text format.
""" """
...@@ -175,7 +175,7 @@ def tecplot_interpolate( ...@@ -175,7 +175,7 @@ def tecplot_interpolate(
, tecplot_variable_pattern: str = None , tecplot_variable_pattern: str = None
, verbose: bool = False , verbose: bool = False
, **kwargs , **kwargs
): ) -> None:
"""Interpolates Tecplot binary data onto various geometries. """Interpolates Tecplot binary data onto various geometries.
Args: Args:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment