From 254524fa38683520714962c844094d6a4769c643 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Wed, 18 May 2022 09:21:32 -0400 Subject: [PATCH] clarified sequence and iterable argument types --- python/damask/_table.py | 8 ++++---- python/damask/_vtk.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/damask/_table.py b/python/damask/_table.py index 2d2c30c00..293f8fb1a 100644 --- a/python/damask/_table.py +++ b/python/damask/_table.py @@ -1,6 +1,6 @@ import re import copy -from typing import Union, Tuple, List +from typing import Union, Tuple, List, Iterable import pandas as pd import numpy as np @@ -14,7 +14,7 @@ class Table: def __init__(self, shapes: dict, data: np.ndarray, - comments: Union[str, list] = None): + comments: Union[str, Iterable] = None): """ New spreadsheet. @@ -434,8 +434,8 @@ class Table: def rename(self, - old: Union[str, List[str]], - new: Union[str, List[str]], + old: Union[str, Iterable[str]], + new: Union[str, Iterable[str]], info: str = None) -> 'Table': """ Rename column data. diff --git a/python/damask/_vtk.py b/python/damask/_vtk.py index 6baa16214..ccbfddd98 100644 --- a/python/damask/_vtk.py +++ b/python/damask/_vtk.py @@ -153,11 +153,11 @@ class VTK: Parameters ---------- - cells : iterable of int, len (3) + cells : sequence of int, len (3) Number of cells along each dimension. - size : iterable of float, len (3) + size : sequence of float, len (3) Physical length along each dimension. - origin : iterable of float, len (3), optional + origin : sequence of float, len (3), optional Coordinates of grid origin. Returns @@ -257,7 +257,7 @@ class VTK: Parameters ---------- - grid : iterables of floats, len (3) + grid : sequence of floats, len (3) Grid coordinates along x, y, and z directions. Returns