Skip to content

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Aug 27, 2023

Thank you for contributing to Pipenv!

Some code simplifications made by ruff --select=SIM --fix .

The issue

What is the thing you want to fix? Is it associated with an issue on GitHub? Please mention it.

Always consider opening an issue first to describe your problem, so we can discuss what is the best way to amend it. Note that if you do not describe the goal of this change or link to a related issue, the maintainers may close the PR without further review.

If your pull request makes a non-insignificant change to Pipenv, such as the user interface or intended functionality, please file a PEEP.

https://github.com/pypa/pipenv/blob/master/peeps/PEEP-000.md

The fix

How does this pull request fix your problem? Did you consider any alternatives? Why is this the best solution, in your opinion?

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@matteius
Copy link
Member

@cclauss I think things are in a much more stable state now from my recent refactor, but I did introduce a conflict fixing things with this PR. If that can be resolved I think this can be merged.

p = os.path.join(c, "Pipfile")
if os.path.isfile(p):
return p
if i < max_depth and "Pipfile":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one bugs me in both the current code and in this PR... if "Pipfile": is ALWAYS True.

Copy link
Member

Choose a reason for hiding this comment

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

We should reduce stuff like that -- I've been trying to when I come across it.

@matteius matteius merged commit 16334c9 into pypa:main Aug 30, 2023
@cclauss cclauss deleted the ruff-rules-SIM branch August 31, 2023 03:26
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