Skip to content

Commit f2710cd

Browse files
committed
style: black
1 parent 78291d6 commit f2710cd

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

tableauserverclient/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
# The maximum size of a file that can be published in a single request is 64MB
1010
FILESIZE_LIMIT_MB = 64
1111

12+
1213
class Config:
13-
# For when a datasource is over 64MB, break it into 5MB(standard chunk size) chunks
14+
# For when a datasource is over 64MB, break it into 5MB(standard chunk size) chunks
1415
@property
1516
def CHUNK_SIZE_MB(self):
1617
return int(os.getenv("TSC_CHUNK_SIZE_MB", 5 * 10)) # 5MB felt too slow, upped it to 50
1718

18-
# Default page size
19+
# Default page size
1920
@property
2021
def PAGE_SIZE(self):
2122
return int(os.getenv("TSC_PAGE_SIZE", 100))
2223

24+
2325
config = Config()

test/test_pager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
GET_XML_PAGE2 = os.path.join(TEST_ASSET_DIR, "workbook_get_page_2.xml")
1414
GET_XML_PAGE3 = os.path.join(TEST_ASSET_DIR, "workbook_get_page_3.xml")
1515

16+
1617
@contextlib.contextmanager
1718
def set_env(**environ):
1819
old_environ = dict(os.environ)
@@ -23,6 +24,7 @@ def set_env(**environ):
2324
os.environ.clear()
2425
os.environ.update(old_environ)
2526

27+
2628
class PagerTests(unittest.TestCase):
2729
def setUp(self):
2830
self.server = TSC.Server("http://test", False)
@@ -100,13 +102,13 @@ def test_pager_with_options(self):
100102
wb3 = workbooks.pop()
101103
self.assertEqual(wb3.name, "Page3Workbook")
102104

103-
def test_pager_with_env_var(self) -> None:
105+
def test_pager_with_env_var(self):
104106
with set_env(TSC_PAGE_SIZE="1000"):
105107
assert config.PAGE_SIZE == 1000
106108
loop = TSC.Pager(self.server.workbooks)
107109
assert loop._options.pagesize == 1000
108110

109-
def test_queryset_with_env_var(self) -> None:
111+
def test_queryset_with_env_var(self):
110112
with set_env(TSC_PAGE_SIZE="1000"):
111113
assert config.PAGE_SIZE == 1000
112114
loop = self.server.workbooks.all()

0 commit comments

Comments
 (0)