Skip to content

Commit 9e03604

Browse files
authored
feat: enable isort ruff rule (#2021)
* feat: enabling isort ruff rule * feat: fix circular import issue * fix: codacy issue
1 parent 4f18158 commit 9e03604

File tree

177 files changed

+614
-666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+614
-666
lines changed

.ci/build_wheel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
# Input can be one of ["any", "win", "manylinux1", "manylinux_2_17"]
33

44
import argparse
5-
import subprocess
6-
from pathlib import Path
75
import os
8-
import sys
6+
from pathlib import Path
97
import shutil
8+
import subprocess
9+
import sys
1010
import tempfile
1111

12-
1312
supported_platforms = {
1413
"any": "any",
1514
"win": "win_amd64",

.ci/code_generation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# import subprocess
22

3-
from ansys.dpf import core
4-
from ansys.dpf.core.operators import build
5-
import os
63
import glob
4+
import os
75
from pathlib import Path
86
import shutil
97

8+
from ansys.dpf import core
9+
from ansys.dpf.core.operators import build
1010

1111
local_dir = Path(__file__).parent
1212
TARGET_PATH = local_dir.parent / "src" / "ansys" / "dpf" / "core" / "operators"

.ci/run_examples.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import os
21
import glob
2+
import os
33
from pathlib import Path
44
import subprocess
55
import sys
66

77
import ansys.dpf.core as dpf
88
from ansys.dpf.core.examples import get_example_required_minimum_dpf_version
99

10-
1110
os.environ["PYVISTA_OFF_SCREEN"] = "true"
1211
os.environ["MPLBACKEND"] = "Agg"
1312

.ci/run_non_regression_examples.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import os
21
import glob
3-
from ansys.dpf import core
2+
import os
43
import pathlib
54
import subprocess
65
import sys
76

7+
from ansys.dpf import core
8+
89
os.environ["PYVISTA_OFF_SCREEN"] = "true"
910
os.environ["MPLBACKEND"] = "Agg"
1011

.ci/update_dpf_dependencies.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists.
1414
"""
1515

16-
import os
1716
import glob
17+
import os
1818
from pathlib import Path
1919
import platform
2020
import shutil
2121
import zipfile
2222

23-
2423
grpc_path_key = "DPFDV_ROOT"
2524
gate_path_key = "ANSYSDPFPYGATE_ROOT"
2625
core_path = Path(__file__).parent.parent

examples/00-basic/05-use_local_data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636

3737
# Import necessary modules
3838
from ansys.dpf import core as dpf
39-
from ansys.dpf.core import examples
40-
from ansys.dpf.core import operators as ops
41-
39+
from ansys.dpf.core import examples, operators as ops
4240

4341
###############################################################################
4442
# Create a model object to establish a connection with an

examples/00-basic/11-server_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"""
5454

5555
import os
56+
5657
from ansys.dpf import core as dpf
5758

5859
###############################################################################

examples/01-transient_analyses/00-basic_transient.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
import numpy as np
3838

3939
from ansys.dpf import core as dpf
40-
from ansys.dpf.core import examples
41-
from ansys.dpf.core import operators as ops
40+
from ansys.dpf.core import examples, operators as ops
4241

4342
###############################################################################
4443
# Download the transient result example. This example is

examples/01-transient_analyses/01-transient_easy_time_scoping.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
import matplotlib.pyplot as plt
3535

3636
from ansys.dpf import core as dpf
37-
from ansys.dpf.core import examples
38-
from ansys.dpf.core import operators as ops
37+
from ansys.dpf.core import examples, operators as ops
3938

4039
###############################################################################
4140
# Create the model and display the state of the result. This transient result

examples/02-modal_analyses/01-plot_and_animate_modes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"""
3333

3434
from ansys.dpf import core as dpf
35-
from ansys.dpf.core import animation
36-
from ansys.dpf.core import examples
35+
from ansys.dpf.core import animation, examples
3736

3837
###############################################################################
3938
# Retrieve mode shapes

0 commit comments

Comments
 (0)