From f0c587d4aa468446201cdf850735a98728547332 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 3 Nov 2021 07:53:38 +0100 Subject: [PATCH] polishing oder of imports is build-in, 3rd party, internal --- .gitlab-ci.yml | 2 +- python/damask/grid_filters.py | 4 +++- python/damask/seeds.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14783263d..165cdc68f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,7 +95,7 @@ mypy: stage: python script: - cd $DAMASKROOT/python - - mypy damask/*.py + - mypy -m damask except: - master - release diff --git a/python/damask/grid_filters.py b/python/damask/grid_filters.py index cb6388f41..42b5a16c4 100644 --- a/python/damask/grid_filters.py +++ b/python/damask/grid_filters.py @@ -11,11 +11,13 @@ the following operations are required for tensorial data: - D1 = D3.reshape(cells+(-1,)).reshape(-1,9,order='F') """ -from scipy import spatial as _spatial + from typing import Sequence, Tuple, Union +from scipy import spatial as _spatial import numpy as _np + def _ks(size: _np.ndarray, cells: Union[_np.ndarray,Sequence[int]], first_order: bool = False) -> _np.ndarray: """ Get wave numbers operator. diff --git a/python/damask/seeds.py b/python/damask/seeds.py index 1d7dfc58e..4d5a8c624 100644 --- a/python/damask/seeds.py +++ b/python/damask/seeds.py @@ -1,8 +1,8 @@ """Functionality for generation of seed points for Voronoi or Laguerre tessellation.""" -from scipy import spatial as _spatial from typing import Sequence,Tuple +from scipy import spatial as _spatial import numpy as _np from . import util as _util