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

Refactored PyPaYamlFile #155

Merged
merged 2 commits into from
Oct 20, 2023
Merged

Refactored PyPaYamlFile #155

merged 2 commits into from
Oct 20, 2023

Conversation

ctevse
Copy link
Contributor

@ctevse ctevse commented Sep 22, 2023

  • Moved initialization into a static from method
    • This separates how the object is created from what medium it can be created from
  • Changed get's to getOrDefaults
    • This allows nullpointers to be eaten and replaced with a default value
  • Removed affected and references
    • These are not used outside of parsing, so they should be removed
    • If they are needed in the future, we should parse them into proper objects, not the generic Object
  • Added tests to support the refactor

Closes #152

@ctevse ctevse self-assigned this Sep 22, 2023
- Moved initialization into a static from method
  - This separates how the object is created from what medium it can be created from
- Changed get's to getOrDefaults
  - This allows nullpointers to be eaten and replaced with a default value
- Removed affected and references
  - These are not used outside of parsing, so they should be removed
  - If they are needed in the future, we should parse them into proper objects, not the generic Object
- Added tests to support the refactor
- This test needs to be rewritten since it performs querying of the actual webpage which changed and caused the assert to fail
@ctevse ctevse merged commit b87b527 into main Oct 20, 2023
16 checks passed
@ctevse ctevse deleted the pypa-null-fix branch October 20, 2023 15:33
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.

PyPA Parser Bugs
1 participant