Skip to content

Commit 8a34a56

Browse files
committed
fix: automatic changes
1 parent 3cc2b57 commit 8a34a56

13 files changed

+13
-18
lines changed

examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# Starting with DPF 2025.1.pre1
6161
cs = dpf.operators.result.coordinate_system()
6262
cs.inputs.data_sources.connect(model)
63-
except (KeyError, DPFServerException) as e:
63+
except (KeyError, DPFServerException):
6464
# For previous DPF versions
6565
cs = model.operator(r"mapdl::rst::CS")
6666

src/ansys/dpf/core/core.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@
3030
import warnings
3131
import weakref
3232

33-
from ansys.dpf.core import errors, misc
33+
from ansys.dpf.core import errors
3434
from ansys.dpf.core import server as server_module
3535
from ansys.dpf.core.check_version import version_requires, server_meet_version
3636
from ansys.dpf.core.runtime_config import (
37-
RuntimeClientConfig,
3837
RuntimeCoreConfig,
3938
)
4039
from ansys.dpf.gate import (

src/ansys/dpf/core/dpf_operator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,6 @@ def _write_output_type_to_type(output_type):
970970
if isinstance(output_type, types):
971971
try:
972972
return types_enum_to_types()[output_type]
973-
except KeyError as e:
973+
except KeyError:
974974
raise TypeError(f"{output_type} is not an implemented Operator's output")
975975
return output_type

src/ansys/dpf/core/geometry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def __str__(self):
9292
"""Print Points information."""
9393
txt = "DPF Points object:\n"
9494
txt += f"Number of points: {self.n_points}\n"
95-
txt += f"Coordinates:\n"
95+
txt += "Coordinates:\n"
9696
for point in self._coordinates.data:
9797
txt += f" {point}\n"
9898
return txt

src/ansys/dpf/core/help.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _sum_oper(oper):
120120
if oper.physics_name:
121121
field._name = f"Sum of {field.physics_name}"
122122
else:
123-
field._name = f"Sum"
123+
field._name = "Sum"
124124
field._unit = field._unit
125125
return field
126126

src/ansys/dpf/core/nodes.py

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import numpy as np
3131
from ansys.dpf.core.common import nodal_properties, locations
3232
from ansys.dpf.core.check_version import version_requires
33-
from ansys.dpf.core.check_version import version_requires
3433

3534

3635
class Node:

src/ansys/dpf/core/result_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def qualifier_label_support(self, label):
590590
def __len__(self):
591591
try:
592592
return self.n_results
593-
except Exception as e:
593+
except Exception:
594594
return 0
595595

596596
def __iter__(self):

src/ansys/dpf/core/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
from ansys import dpf
4242

43-
from ansys.dpf.core.misc import is_ubuntu, get_ansys_path
43+
from ansys.dpf.core.misc import get_ansys_path
4444
from ansys.dpf.core import errors
4545

4646
from ansys.dpf.core.server_factory import (

src/ansys/dpf/core/server_factory.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import io
3636

3737
from ansys.dpf.gate.load_api import (
38-
_get_path_in_install,
3938
_find_outdated_ansys_version,
4039
)
4140

@@ -285,7 +284,7 @@ def __init__(
285284
def __str__(self):
286285
text = f"Server configuration: protocol={self.protocol}"
287286
if self.legacy:
288-
text += f" (legacy gRPC)"
287+
text += " (legacy gRPC)"
289288
return text
290289

291290
def __eq__(self, other: "ServerConfig"):
@@ -336,9 +335,9 @@ def get_default_server_config(
336335
config = AvailableServerConfigs.LegacyGrpcServer
337336
else:
338337
raise NotImplementedError(
339-
f"DPF_SERVER_TYPE environment variable must "
340-
f"be set to one of the following: INPROCESS, "
341-
f"GRPC, LEGACYGRPC."
338+
"DPF_SERVER_TYPE environment variable must "
339+
"be set to one of the following: INPROCESS, "
340+
"GRPC, LEGACYGRPC."
342341
)
343342
elif config is None and docker_config.use_docker:
344343
config = get_default_remote_server_config()

src/ansys/dpf/core/server_types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _get_dll_path(name, ansys_path=None):
7171
ANSYS_INSTALL = core.misc.get_ansys_path(ansys_path)
7272
api_path = load_api._get_path_in_install()
7373
if api_path is None:
74-
raise ImportError(f"Could not find API path in install.")
74+
raise ImportError("Could not find API path in install.")
7575
SUB_FOLDERS = os.path.join(ANSYS_INSTALL, api_path)
7676
if ISPOSIX:
7777
name = "lib" + name

src/ansys/dpf/core/unit_system.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@ class unit_systems:
154154
solver_bft = UnitSystem("solver_bft", ID=7)
155155
solver_bin = UnitSystem("solver_bin", ID=8)
156156
undefined = UnitSystem("undefined", ID=-1)
157-
except dpf_errors.DpfVersionNotSupported as e: # pragma: no cover
157+
except dpf_errors.DpfVersionNotSupported: # pragma: no cover
158158
pass

tests/test_generic_data_container.py

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
from ansys.dpf import core as dpf
2626
from conftest import (
27-
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0,
2827
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0,
2928
raises_for_servers_version_under,
3029
)

tests/test_operator.py

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import gc
2424
import os
2525
import shutil
26-
import types
2726
import weakref
2827

2928
import numpy as np

0 commit comments

Comments
 (0)