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

Fix AttributeError on hash mismatch #4212

Closed

Conversation

paulmelnikow
Copy link

This replaces the AttributeError reported in #4085 with the proper exception.

Pull Request Check List

Resolves: N/A (related to #4085, however the underlying error is not fixed)

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

@paulmelnikow
Copy link
Author

I'm seeing these test failures locally too, though they do not seem to be related to the changes in this PR.

@paulmelnikow
Copy link
Author

@finswimmer Could I ask you to take a look at this?

If you think a test is needed to merge it, I'd appreciate some guidance on that. If there is some existing coverage of these code paths I'm happy to add some tests of the error case. Though if not I'm probably not quite ready to create tests in an area of the code where there's no test coverage now. In any case if you feel that's needed, would appreciate pointers on where to start! Thanks!

@sdispater
Copy link
Member

@paulmelnikow Thanks for the fix!

Could you rebase your PR on the the latest version of the master branch?

@paulmelnikow paulmelnikow force-pushed the fix-attribute-error branch from 0b4d367 to d7dfc00 Compare July 5, 2021 01:03
This replaces the AttributeError reported in python-poetry#4085 with the proper
exception.
@paulmelnikow paulmelnikow force-pushed the fix-attribute-error branch from d7dfc00 to 403d2ff Compare July 5, 2021 01:04
@paulmelnikow
Copy link
Author

@sdispater Thanks for reviewing! Done!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 5, 2021

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@paulmelnikow
Copy link
Author

I thought I had reduced complexity for Sonar but it looks like not.

I imagine the way to fix this is to break out a helper method from this one. Perhaps lines 655-671 could become a new method? If you agree, could you suggest what that method should be called?

@paulmelnikow
Copy link
Author

I imagine the way to fix this is to break out a helper method from this one. Perhaps lines 655-671 could become a new method? If you agree, could you suggest what that method should be called?

@sdispater Could you offer any guidance on this? I took another look at how to refactor this to satisfy Sonar and it seems more like what's needed is not a second helper function, but to push some of this code complexity into a lower-level abstraction. But I'm happy to execute whatever refactor you suggest.

@paulmelnikow
Copy link
Author

@sdispater gentle nudge

@paulmelnikow
Copy link
Author

@sdispater I'd love to get this merged!

@neersighted
Copy link
Member

@sdispater I'd love to get this merged!

Sorry about the delays here -- does this still reproduce on master?

@neersighted
Copy link
Member

Actually, it looks like #4531 fixed this and I already validated it does not reproduce. Please comment/re-open if that's not the case and we still need to get a fix in.

@neersighted neersighted closed this Jun 4, 2022
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants