Skip to content

chore(versions): update remaining f-strings #1477

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

Merged
merged 1 commit into from
Sep 30, 2024
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
4 changes: 2 additions & 2 deletions tableauserverclient/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=
return None, None
else:
if verbose:
print("unable to find command, tried {}".format(commands))
print(f"unable to find command, tried {commands}")
return None, None
stdout = p.communicate()[0].strip()
if sys.version_info[0] >= 3:
Expand Down Expand Up @@ -131,7 +131,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose):
root = os.path.dirname(root) # up a level

if verbose:
print("Tried directories {} but none started with prefix {}".format(str(rootdirs), parentdir_prefix))
print(f"Tried directories {str(rootdirs)} but none started with prefix {parentdir_prefix}")
raise NotThisMethod("rootdir doesn't start with parentdir_prefix")


Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/server/endpoint/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _make_request(
self._check_status(server_response, url)

loggable_response = self.log_response_safely(server_response)
logger.debug("Server response from {0}".format(url))
logger.debug(f"Server response from {url}")
# uncomment the following to log full responses in debug mode
# BE CAREFUL WHEN SHARING THESE RESULTS - MAY CONTAIN YOUR SENSITIVE DATA
# logger.debug(loggable_response)
Expand Down
2 changes: 1 addition & 1 deletion test/test_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def test_get_monthly_by_id_2(self) -> None:
response_xml = f.read().decode("utf-8")
with requests_mock.mock() as m:
schedule_id = "8c5caf33-6223-4724-83c3-ccdc1e730a07"
baseurl = "{}/schedules/{}".format(self.server.baseurl, schedule_id)
baseurl = f"{self.server.baseurl}/schedules/{schedule_id}"
m.get(baseurl, text=response_xml)
schedule = self.server.schedules.get_by_id(schedule_id)
self.assertIsNotNone(schedule)
Expand Down
Loading