Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few pylint errors #1124

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions samples/initialize_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ def main():

# Create the site if it doesn't exist
if existing_site is None:
print("Site not found: {0} Creating it...").format(args.site_id)
print("Site not found: {0} Creating it...".format(args.site_id))
new_site = TSC.SiteItem(
name=args.site_id,
content_url=args.site_id.replace(" ", ""),
admin_mode=TSC.SiteItem.AdminMode.ContentAndUsers,
)
server.sites.create(new_site)
else:
print("Site {0} exists. Moving on...").format(args.site_id)
print("Site {0} exists. Moving on...".format(args.site_id))

################################################################################
# Step 3: Sign-in to our target site
Expand All @@ -87,7 +87,7 @@ def main():

# Create our project if it doesn't exist
if project is None:
print("Project not found: {0} Creating it...").format(args.project)
print("Project not found: {0} Creating it...".format(args.project))
new_project = TSC.ProjectItem(name=args.project)
project = server_upload.projects.create(new_project)

Expand Down
4 changes: 0 additions & 4 deletions tableauserverclient/models/flow_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ def description(self, value: str) -> None:
def project_name(self) -> Optional[str]:
return self._project_name

@property
def flow_type(self): # What is this? It doesn't seem to get set anywhere.
return self._flow_type

@property
def updated_at(self) -> Optional["datetime.datetime"]:
return self._updated_at
Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/models/permissions_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def from_response(cls, resp, ns=None) -> List["PermissionsRule"]:
mode = capability_xml.get("mode")

if name is None or mode is None:
logger.error("Capability was not valid: ", capability_xml)
logger.error("Capability was not valid: {}".format(capability_xml))
raise UnpopulatedPropertyError()
else:
capability_dict[name] = mode
Expand Down
5 changes: 3 additions & 2 deletions tableauserverclient/models/revision_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ def user_name(self) -> Optional[str]:

def __repr__(self):
return (
"<RevisionItem# revisionNumber={_revision_number} " "current={_current} deleted={_deleted} user={_user_id}>"
).format(**self.__dict__)
"<RevisionItem# revisionNumber={_revision_number} "
"current={_current} deleted={_deleted} user={_user_id}>".format(**self.__dict__)
)

@classmethod
def from_response(cls, resp: bytes, ns, resource_item) -> List["RevisionItem"]:
Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/models/tableau_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def credentials(self):
+"This method returns values to set as an attribute on the credentials element of the request"

def __repr__(self):
display = "All Credentials types must have a debug display that does not print secrets"
return "All Credentials types must have a debug display that does not print secrets"


def deprecate_site_attribute():
Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/server/endpoint/databases_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def update_table_default_permissions(self, item):

@api(version="3.5")
def delete_table_default_permissions(self, item):
self._default_permissions.delete_default_permissions(item, Resource.Table)
self._default_permissions.delete_default_permission(item, Resource.Table)

@api(version="3.5")
def populate_dqw(self, item):
Expand Down