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

Enable pylint rules 2 #503

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Enable pylint rules 2 #503

wants to merge 2 commits into from

Conversation

MizukiTemma
Copy link
Member

@MizukiTemma MizukiTemma commented Oct 24, 2023

Short description

This PR enables pylint rules that are globally deactivated now.

Proposed changes

  • Still in progress but comments are welcomed 🙂

Resolved issues

Fixes: (partially #499)

Comment on lines +84 to 90
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
Copy link
Member Author

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.

Copy link
Member

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.

@MizukiTemma MizukiTemma mentioned this pull request Jan 25, 2024
10 tasks
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.

2 participants