Skip to content

Commit

Permalink
Fix #361 flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Mar 11, 2023
1 parent d7844af commit 70f1b19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion clickhouse_driver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ def query_dataframe(
ClickHouse server will generate it.
:param settings: dictionary of query settings.
Defaults to ``None`` (no additional settings).
:param replace_nonwords: boolean to replace non-words in column names to underscores
:param replace_nonwords: boolean to replace non-words in column names
to underscores. Defaults to ``True``.
:return: pandas DataFrame.
"""

Expand Down
9 changes: 7 additions & 2 deletions tests/columns/test_columns_names.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from tests.testcase import BaseTestCase


class ColumnsNamesTestCase(BaseTestCase):

def test_columns_names_replace_nonwords(self):
Expand All @@ -10,8 +11,12 @@ def test_columns_names_replace_nonwords(self):
'Any%different.Column? Int64'
)

expected_columns = ['regular', 'CamelCase', 'With_Underscores', 'Any%different.Column?']
expected_columns = [
'regular', 'CamelCase', 'With_Underscores', 'Any%different.Column?'
]

with self.create_table(columns):
df = self.client.query_dataframe('SELECT * FROM test', replace_nonwords=False)
df = self.client.query_dataframe(
'SELECT * FROM test', replace_nonwords=False
)
self.assertTrue(expected_columns.equals(list(df.columns)))

0 comments on commit 70f1b19

Please sign in to comment.