Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-132983: Style improvements forcompression.zstd#133547

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AA-Turner merged 10 commits intopython:mainfromemmatyping:zstd-pep8
May 14, 2025

Conversation

emmatyping
Copy link
Member

@emmatypingemmatyping commentedMay 7, 2025
edited
Loading

Mostly just make both files consistently use single vs double quotes and add spacing as suggested in PEP 8.

  • consistently uses single vs double quotes per PEP 8
  • makes spacing consistent per PEP 8
  • adds a missing space in a multi-line string
  • Moves compression packages that don't have multiple files to modules
  • Adds a missing trailing comma intarfile

Mostly just make both files consistently use single vs double quotes.Also add a missing space in a multi-line string.
pythonGH-133479 removed the logic to check for libzstd outside of pkg-config.This commit adds that logic back with a check for the version so thatusers can provide their own libzstd. This is to bring parity with lzma,bz2, and zlib detection.
Copy link
Contributor

@RogdhamRogdham left a comment

Choose a reason for hiding this comment

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

I am confirming you did not miss any', except maybe in the docstring ofZstdFile.readline which mentionsb''

@emmatyping
Copy link
MemberAuthor

I am confirming you did not miss any ', except maybe in the docstring of ZstdFile.readline which mentions b''

Yeah I left that one intentionally as docs seem to useb'' when talking about empty bytes objects.

Rogdham reacted with thumbs up emoji

@emmatyping
Copy link
MemberAuthor

@AA-Turner@gpshead pinging just to follow up on the request for review on this one.

@merwok
Copy link
Member

I would argue that the (C)Python house style is to use single quotes, as that matches the output of repr and thus the REPL.

Formatters like black took position for double quotes for various reasons (I think arguing that it’s more common to have apostrophes inside the quotes, and something about qwerty layout), but that’s not universally liked.

So this change could be done (the files already have a non-small git history!), or not done.

AA-Turner reacted with thumbs up emoji

@merwok
Copy link
Member

Bringing here a suggestion from a closed PR: avoid unnecessary packages for the re-exported compression sub-modules (renameLib/compression/bzip2/__init__.pyLib/compression/bzip2.py)

@emmatypingemmatyping removed the request for review fromethanfurmanMay 13, 2025 23:53
@emmatyping
Copy link
MemberAuthor

Moved the modules and changed to single quotes! I also added a trailing comma that@merwok noted in an already-merged PR. I also updated the PR description to cover these points.

merwok reacted with thumbs up emoji

@emmatypingemmatyping requested a review frommerwokMay 14, 2025 00:21
@AA-TurnerAA-Turner added the needs backport to 3.14bugs and security fixes labelMay 14, 2025
@AA-TurnerAA-Turnerenabled auto-merge (squash)May 14, 2025 10:53
@AA-TurnerAA-Turner merged commitb44c824 intopython:mainMay 14, 2025
44 checks passed
@miss-islington-app
Copy link

Thanks@emmatyping for the PR, and@AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 14, 2025
…133547)(cherry picked from commitb44c824)Co-authored-by: Emma Smith <emma@emmatyping.dev>Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app
Copy link

GH-134001 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 14, 2025
AA-Turner added a commit that referenced this pull requestMay 14, 2025
… (#134001)gh-132983: Style improvements for `compression.zstd` (GH-133547)(cherry picked from commitb44c824)Co-authored-by: Emma Smith <emma@emmatyping.dev>Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@merwokmerwokmerwok left review comments

@RogdhamRogdhamRogdham approved these changes

@AA-TurnerAA-TurnerAA-Turner approved these changes

@gpsheadgpsheadAwaiting requested review from gpshead

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@emmatyping@merwok@Rogdham@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp