Skip to content

Commit 2130d0f

Browse files
author
Christopher Rabotin
committed
Fixes for flake8 complains.
1 parent baa648d commit 2130d0f

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

influxdb/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(self,
110110
@staticmethod
111111
def from_DSN(dsn, **kwargs):
112112
"""
113-
Returns an instance of InfluxDBClient from the provided data source
113+
Returns an instance of InfluxDBClient from the provided data source
114114
name.
115115
:param dsn: data source name
116116
:type dsn: string
@@ -138,7 +138,7 @@ def from_DSN(dsn, **kwargs):
138138
elif modifier == 'https':
139139
init_args['ssl'] = True
140140
else:
141-
raise ValueError('Unknown scheme modifier "{}".'.format(modifier))
141+
raise ValueError('Unknown modifier "{}".'.format(modifier))
142142

143143
if conn_params.hostname:
144144
init_args['host'] = conn_params.hostname

influxdb/influxdb08/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self,
109109
@staticmethod
110110
def from_DSN(dsn, **kwargs):
111111
"""
112-
Returns an instance of InfluxDBClient from the provided data source
112+
Returns an instance of InfluxDBClient from the provided data source
113113
name.
114114
:param dsn: data source name
115115
:type dsn: string
@@ -137,7 +137,7 @@ def from_DSN(dsn, **kwargs):
137137
elif modifier == 'https':
138138
init_args['ssl'] = True
139139
else:
140-
raise ValueError('Unknown scheme modifier "{}".'.format(modifier))
140+
raise ValueError('Unknown modifier "{}".'.format(modifier))
141141

142142
if conn_params.hostname:
143143
init_args['host'] = conn_params.hostname

tests/influxdb/client_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,16 @@ def test_dsn(self):
109109
assert cli._username == 'usr'
110110
assert cli._password == 'pwd'
111111
assert cli._database == 'db'
112-
assert cli.use_udp == False
112+
assert cli.use_udp is False
113113

114114
cli = InfluxDBClient.from_DSN('udp+influxdb://usr:pwd@host:1886/db')
115-
assert cli.use_udp == True
115+
assert cli.use_udp is True
116116

117117
cli = InfluxDBClient.from_DSN('https+influxdb://usr:pwd@host:1886/db')
118118
assert cli._baseurl == 'https://host:1886'
119119

120-
cli = InfluxDBClient.from_DSN('https+influxdb://usr:pwd@host:1886/db', **{'ssl': False})
120+
cli = InfluxDBClient.from_DSN('https+influxdb://usr:pwd@host:1886/db',
121+
**{'ssl': False})
121122
assert cli._baseurl == 'http://host:1886'
122123

123124
def test_switch_database(self):

tests/influxdb/influxdb08/client_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,16 @@ def test_dsn(self):
9494
assert cli._username == 'usr'
9595
assert cli._password == 'pwd'
9696
assert cli._database == 'db'
97-
assert cli.use_udp == False
97+
assert cli.use_udp is False
9898

9999
cli = InfluxDBClient.from_DSN('udp+influxdb://usr:pwd@host:1886/db')
100-
assert cli.use_udp == True
100+
assert cli.use_udp is True
101101

102102
cli = InfluxDBClient.from_DSN('https+influxdb://usr:pwd@host:1886/db')
103103
assert cli._baseurl == 'https://host:1886'
104104

105-
cli = InfluxDBClient.from_DSN('https+influxdb://usr:pwd@host:1886/db', **{'ssl': False})
105+
cli = InfluxDBClient.from_DSN('https+influxdb://usr:pwd@host:1886/db',
106+
**{'ssl': False})
106107
assert cli._baseurl == 'http://host:1886'
107108

108109
def test_switch_database(self):

0 commit comments

Comments
 (0)