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

refactor: eliminate inheritance from object #2339

Merged

Conversation

aucampia
Copy link
Member

@aucampia aucampia commented Apr 9, 2023

This change removes the redundant inheritance from object (i.e. class Foo(object): pass) that is no longer needed in Python 3 and is a relic from Python 2.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

This change removes the redundant inheritance from `object` (i.e. `class
Foo(object): pass`) that is no longer needed in Python 3 and is a relic from
Python 2.
@aucampia aucampia added review wanted This indicates that the PR is ready for review ready to merge The PR will be merged soon if no further feedback is provided. refactor This issue concerns a change that neither fixes a bug nor adds a feature. labels Apr 9, 2023
@aucampia aucampia marked this pull request as ready for review April 9, 2023 19:22
@coveralls
Copy link

Coverage Status

Coverage: 90.831% (-0.0004%) from 90.832% when pulling 1ec08fc on aucampia:iwana-20230409T2118-no_object_inherit into 4940798 on RDFLib:main.

@aucampia
Copy link
Member Author

aucampia commented Apr 9, 2023

/wsp review

@what-the-diff
Copy link

what-the-diff bot commented Apr 9, 2023

PR Summary

  • Updated class definitions to new style
    Changed the way classes are defined to adopt the more modern style for readability and consistency.
  • Removed doc from classes
    Cleaned up unnecessary doc attributes from various classes.
  • Added type hints for better code clarity
    Introduced type hints for certain functions and methods, such as _runtime.
  • Updated test classes for consistency
    Made updates to test classes like SerializerTestBase and test_serializers/test_prettyxml.py, to maintain uniformity across the codebase.

@aucampia aucampia requested a review from a team April 10, 2023 10:07
@aucampia
Copy link
Member Author

Merging without review, as this does not change runtime behaviour.

@aucampia aucampia merged commit 20f1235 into RDFLib:main Apr 10, 2023
@aucampia aucampia deleted the iwana-20230409T2118-no_object_inherit branch June 8, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR will be merged soon if no further feedback is provided. refactor This issue concerns a change that neither fixes a bug nor adds a feature. review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants