-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enable pylint rules 2 #503
base: develop
Are you sure you want to change the base?
Conversation
with open(new_path, "rb") as file: | ||
converted_audiofile = File(file=file, name=Path(new_path)) | ||
converted_audiofile.name = Path(new_path).name | ||
converted_audiofile.content_type = "audio/mpeg" | ||
converted_audiofile.size = os.path.getsize(new_path) | ||
os.remove(new_path) | ||
return converted_audiofile |
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.
@timobrembeck
This was what I've tried. I guess it's the cause of seek of closed file
that converted_audiofile
cannot reffer the file after with
block is left.
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.
Ah ok interesting, I had hoped that File()
would already read the file contents.
I don't have time to have a closer look at this problem, but I'll revisit this later.
Short description
This PR enables pylint rules that are globally deactivated now.
Proposed changes
Resolved issues
Fixes: (partially #499)