Skip to content

Commit 1a879de

Browse files
data sources class updated
1 parent 8c05453 commit 1a879de

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/ansys/dpf/core/data_sources.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
if TYPE_CHECKING:
5050
from ansys.dpf import core as dpf
5151
from ansys.dpf.core import server_types
52-
from ansys.grpc.dpf import data_sources_pb2 as DataSourcesPB2
52+
from ansys.grpc.dpf import data_sources_pb2
5353

5454

5555
class DataSources:
@@ -63,9 +63,9 @@ class DataSources:
6363
6464
Parameters
6565
----------
66-
result_path : str or os.PathLike object, optional
66+
result_path
6767
Path of the result. The default is ``None``.
68-
data_sources : ansys.grpc.dpf.data_sources_pb2.DataSources
68+
data_sources
6969
gRPC data sources message. The default is ``None``.
7070
server
7171
Server with the channel connected to the remote or local instance. The
@@ -85,7 +85,12 @@ class DataSources:
8585
8686
"""
8787

88-
def __init__(self, result_path=None, data_sources=None, server: Optional[type[server_types.BaseServer]] = None):
88+
def __init__(
89+
self,
90+
result_path: Optional[str, os.PathLike] = None,
91+
data_sources: Optional[dpf.DataSources, int, data_sources_pb2.DataSources] = None,
92+
server: Optional[type[server_types.BaseServer]] = None,
93+
):
8994
"""Initialize a connection with the server."""
9095
# step 1: get server
9196
self._server = server_module.get_or_create_server(

0 commit comments

Comments
 (0)