File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1
1
import abc
2
2
3
+ def __getattr__ (name ):
4
+ if name == "locations" :
5
+ from ansys .dpf .core .common import locations
6
+ import warnings
7
+ warnings .warn (message = "Use ansys.dpf.core.common.locations" , category = DeprecationWarning )
8
+ return locations
9
+ raise AttributeError (f"module { __name__ !r} has no attribute { name !r} " )
10
+
3
11
elemental_property_type_dict = {
4
12
"eltype" : "ELEMENT_TYPE" ,
5
13
"elshape" : "ELEMENT_SHAPE" ,
Original file line number Diff line number Diff line change @@ -365,3 +365,9 @@ def test_scoping_dont_start_server(server_type):
365
365
assert not dpf .core .server .has_local_server ()
366
366
assert np .allclose (scop .ids , ids )
367
367
dpf .core .SERVER = s
368
+
369
+
370
+ def test_locations_redirect_retro_compatibility (server_type ):
371
+ from ansys .dpf .gate .common import locations
372
+
373
+ _ = locations .faces
You can’t perform that action at this time.
0 commit comments