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

Use __str__ instead of to_string() #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MatthewKhouzam
Copy link
Contributor

Works with str(object) and print(object). It is the more "pythonic" way.

Replace all .format strings with fstrings and remove linter directives.

Works with str(object) and print(object). It is the more "pythonic"
way.

Replace all .format strings with fstrings and remove linter directives.

Signed-off-by: Matthew Khouzam <[email protected]>
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. Do you need to add fstrings to the requirements.txt?

tsp_cli_client Outdated
@@ -428,7 +428,7 @@ if __name__ == "__main__":
if options.type_id is not None:
response = tsp_client.fetch_configuration(options.type_id, options.list_configuration)
if response.status_code == 200:
print(' {0}'.format(response.model.to_string()))
print(f' {response.model}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this leads to an error SyntaxError: unterminated string literal (detected at line 431)
You need to terminate the string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants