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

chore: use fstrings #250

Merged
merged 1 commit into from
Nov 20, 2021
Merged

Conversation

branchvincent
Copy link
Member

@branchvincent branchvincent commented Nov 17, 2021

Towards python-poetry/poetry#4776

  • Added tests for changed code.
  • Updated documentation for changed code.

Copy link
Contributor

@danieleades danieleades left a comment

Choose a reason for hiding this comment

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

there's quite a few places where the f-strings are harder to read than the original syntax. This occurs when the 'structure' of the original message is obscured by the long, inline code.

I commented on the first few, but there's a lot more places here where i think this holds.

In those cases, I would suggest improving clarity by adding intermediate calculations of the message components, and then using the local variables.

the point of this lint is to make things easier to grok, so we need to be careful about cargo-culting in the lint, and missing the point of why we're using it in the first place

poetry/core/json/__init__.py Outdated Show resolved Hide resolved
poetry/core/masonry/builders/sdist.py Outdated Show resolved Hide resolved
poetry/core/packages/constraints/constraint.py Outdated Show resolved Hide resolved
poetry/core/packages/dependency_group.py Outdated Show resolved Hide resolved
@branchvincent
Copy link
Member Author

thanks @danieleades, hopefully this is more readable

danieleades
danieleades previously approved these changes Nov 19, 2021
Copy link
Contributor

@danieleades danieleades left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

LGTM after one tiny correctness fix! Awesome work!

src/poetry/core/packages/utils/link.py Outdated Show resolved Hide resolved
@neersighted neersighted merged commit 8d6b5d6 into python-poetry:master Nov 20, 2021
@branchvincent branchvincent deleted the fstrings branch November 20, 2021 02:48
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.

3 participants