8000 Fix pep8 failures · SnarkyPapi/server-client-python@5dfc155 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5dfc155

Browse files
author
Russell Hay
committed
Fix pep8 failures
1 parent 2c8d1a5 commit 5dfc155

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

samples/initialize_server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import logging
1111
import glob
1212

13+
1314
def main():
1415
parser = argparse.ArgumentParser(description='Initialize a server with content.')
1516
parser.add_argument('--server', '-s', required=True, help='server address')
@@ -47,12 +48,12 @@ def main():
4748
# Create the site if it doesn't exist
4849
if existing_site is None:
4950
print("Site not found: {0} Creating it...").format(args.site)
50-
new_site = TSC.SiteItem(name=args.site, content_url=args.site.replace(" ", ""), admin_mode=TSC.SiteItem.AdminMode.ContentAndUsers)
51+
new_site = TSC.SiteItem(name=args.site, content_url=args.site.replace(" ", ""),
52+
admin_mode=TSC.SiteItem.AdminMode.ContentAndUsers)
5153
server.sites.create(new_site)
5254
else:
5355
print("Site {0} exists. Moving on...").format(args.site)
5456

55-
5657
################################################################################
5758
# Step 3: Sign-in to our target site
5859
################################################################################
@@ -82,6 +83,7 @@ def main():
8283
publish_datasources_to_site(server_upload, project, args.datasources_folder)
8384
publish_workbooks_to_site(server_upload, project, args.workbooks_folder)
8485

86+
8587
def publish_datasources_to_site(server_object, project, folder):
8688
path = folder + '/*.tds*'
8789

samples/pagination_sample.py

Lines changed: 1 addition & 0 deletions
< E9D9 /div>
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,6 @@ def main():
6666
# >>> request_options = TSC.RequestOptions(pagesize=1000)
6767
# >>> all_workbooks = list(TSC.Pager(server.workbooks, request_options))
6868

69+
6970
if __name__ == '__main__':
7071
main()

tableauserverclient/datetime_helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
ZERO = datetime.timedelta(0)
99
HOUR = datetime.timedelta(hours=1)
1010

11-
1211
# A UTC class.
1312

1413
class UTC(datetime.tzinfo):
@@ -23,7 +22,6 @@ def tzname(self, dt):
2322
def dst(self, dt):
2423
return ZERO
2524

26-
2725
utc = UTC()
2826

2927
TABLEAU_DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
@@ -34,4 +32,4 @@ def parse_datetime(date):
3432

3533

3634
def format_datetime(date):
37-
return date.astimezone(tz=utc).strftime(TABLEAU_DATE_FORMAT)
35+
return date.astimezone(tz=utc).strftime(TABLEAU_DATE_FORMAT)

0 commit comments

Comments
 (0)
0