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 f-strings instread str.format() #1793

Merged
merged 1 commit into from
Feb 25, 2020
Merged

Use f-strings instread str.format() #1793

merged 1 commit into from
Feb 25, 2020

Conversation

myusko
Copy link
Contributor

@myusko myusko commented Feb 24, 2020

Hey,

Per a discussion on Sanic's community forum, it will be cool to use f-strings instead of str.format().

  1. It will improve our performance since f-strings are faster than str.format()
  2. A bit easier to read.

That's the first phase and it only applies for tests, if it looks good, next PR will be applied to core functionality.

@myusko myusko requested review from ahopkins, abuckenheimer and harshanarayana and removed request for abuckenheimer February 24, 2020 18:41
@Tronic
Copy link
Member

Tronic commented Feb 25, 2020

LGTM, barring a few overlong lines (but black's line lengths are not enforced on tests).

Copy link
Member

@seemethere seemethere left a comment

Choose a reason for hiding this comment

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

LGTM as long as tests pass

@sjsadowski
Copy link
Contributor

Only issues are windows python 3.8 which probably needs to get yanked back out of appveyor since it makes it look like there's a problem and there is not.

@sjsadowski sjsadowski merged commit 16961fa into sanic-org:master Feb 25, 2020
@myusko myusko deleted the perf/replace-f-string-instead-format branch February 26, 2020 13:39
@ahopkins ahopkins mentioned this pull request Aug 17, 2020
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.

4 participants