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

python language updates #1922

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

python language updates #1922

wants to merge 1 commit into from

Conversation

marksmayo
Copy link

upgraded a bunch of format strings to f-strings
formatted with black afterwards to meet previous style

all tests pass (Windows 11)

upgraded a bunch of format strings to f-strings
formatted with black afterwards to meet previous style
all tests pass (Windows 11)
@coveralls
Copy link

coveralls commented Feb 20, 2023

Coverage Status

Coverage: 84.751%. Remained the same when pulling 5039719 on marksmayo:master into 99a9657 on Zulko:master.

@keikoro
Copy link
Collaborator

keikoro commented Feb 21, 2023

@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.

@keikoro
Copy link
Collaborator

keikoro commented Feb 22, 2023

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 master (which fixes that failing check), just in case...

Copy link
Collaborator

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?

Comment on lines +182 to +184
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, "
Copy link
Collaborator

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

Comment on lines +205 to +208
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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove the + operators

@keikoro
Copy link
Collaborator

keikoro commented Apr 12, 2023

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.

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

5 participants