We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9bd6cc commit 2e8c588Copy full SHA for 2e8c588
influxdb/client.py
@@ -131,8 +131,8 @@ def _port(self):
131
def _get_port(self):
132
return self.__port
133
134
- @staticmethod
135
- def from_DSN(dsn, **kwargs):
+ @classmethod
+ def from_DSN(cls, dsn, **kwargs):
136
"""Return an instance of :class:`~.InfluxDBClient` from the provided
137
data source name. Supported schemes are "influxdb", "https+influxdb"
138
and "udp+influxdb". Parameters for the :class:`~.InfluxDBClient`
@@ -169,7 +169,7 @@ def from_DSN(dsn, **kwargs):
169
init_args['port'] = port
170
init_args.update(kwargs)
171
172
- return InfluxDBClient(**init_args)
+ return cls(**init_args)
173
174
def switch_database(self, database):
175
"""Change the client's database.
0 commit comments