-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
python language updates #1922
base: master
Are you sure you want to change the base?
python language updates #1922
Conversation
upgraded a bunch of format strings to f-strings formatted with black afterwards to meet previous style all tests pass (Windows 11)
@marksmayo Thanks for your PR! The Flake8 test seems to be failing due to overly complicated / redundant string concatenation, more info here. If you could fix those, that'd be great. |
I don't know why the black check didn't end up failing for your PR because it did for the most recent previous ones, but either way: it might make sense to update to the latest commit on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these top-level files shouldn't be commited, right?
f"Error in file {self.filename}, " | ||
+ f"Accessing time t={tt[0]:.02f}-{tt[-1]:.02f} seconds, " | ||
+ f"with clip duration={self.duration:f} seconds, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could avoid the +
and as the concatenation will be implicit
https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
f"Error in file {self.filename}, " | ||
+ f"At time t={tt[0]:.02f}-{tt[-1]:.02f} seconds, " | ||
+ "indices wanted: %d-%d, " % (indices.min(), indices.max()) | ||
+ "but len(buffer)=%d\n" % (len(self.buffer)) | ||
+ f"but len(buffer)={len(self.buffer)}\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the +
operators
I'm confused about how someone who isn't a maintainer of the project (as far as I can see) ended up as a reviewer for this PR – and without GitHub providing any meta info on that, no less (normally, it should say something like "X requested a review by Y" or similar, no?) – or why they were allowed to approve the changes. Very curious. To clarify, I'm talking about the review from 1 March. |
upgraded a bunch of format strings to f-strings
formatted with black afterwards to meet previous style
all tests pass (Windows 11)