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

Code Refactoring for the Dumpulator Package #47

Merged
merged 31 commits into from
Feb 25, 2023
Merged

Code Refactoring for the Dumpulator Package #47

merged 31 commits into from
Feb 25, 2023

Conversation

anthonyprintup
Copy link
Contributor

@anthonyprintup anthonyprintup commented Feb 24, 2023

Currently the project consists of a large codebase which at first glance isn't friendly to new developers. I've made some changes in an attempt to make the code more easily readable/understandable, and correct (in cases where bugs have been found).

Applicable scopes:

  • details
  • dumpulator
  • handles
  • memory
  • modules
  • native

…r reflect the type of `time`, which should be assigned a float
Refactored potentially ambiguous code when setting execute permissions on a page.
Fixed type hints and built-in shadowing.
Removed unused imports, renamed arguments which were shadowing built-in names, simplified chained comparisons, fixed typos.
Converted classes into dataclasses.
Converted classes into dataclasses.
@anthonyprintup
Copy link
Contributor Author

As a note, I think it would be a good idea to get rid of typing imports for standard collections (refer to this and PEP 585).

@anthonyprintup anthonyprintup marked this pull request as ready for review February 24, 2023 05:43
Converting the class into a dataclass introduced a bug which made the class unhashable.
Added a `__hash__` method to avert this issue.
Copy link
Owner

@mrexodia mrexodia left a comment

Choose a reason for hiding this comment

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

Mostly good, appreciate the work. Just some minor things I don't agree with.

src/dumpulator/dumpulator.py Outdated Show resolved Hide resolved
src/dumpulator/dumpulator.py Outdated Show resolved Hide resolved
src/dumpulator/dumpulator.py Outdated Show resolved Hide resolved
src/dumpulator/memory.py Show resolved Hide resolved
src/dumpulator/memory.py Outdated Show resolved Hide resolved
src/dumpulator/memory.py Outdated Show resolved Hide resolved
src/dumpulator/modules.py Show resolved Hide resolved
src/dumpulator/modules.py Show resolved Hide resolved
@mrexodia mrexodia merged commit cb01275 into mrexodia:main Feb 25, 2023
@mrexodia
Copy link
Owner

Thanks a lot!

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