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

Remove explicit base object inheritance #185

Conversation

blablatdinov
Copy link

PEP695 adds new syntax to define classes: class Some[T]: which is equivalent to: class Some(Generic[T]):. If object is added to class Some[T](object): it will be a runtime error: it won’t be possible to create a proper MRO.

ref:

wemake-python-styleguide
useless-object-inheritance

@blablatdinov
Copy link
Author

@r1chardj0n3s take a look please

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.49%. Comparing base (334db14) to head (ccf0b95).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #185   +/-   ##
=======================================
  Coverage   94.49%   94.49%           
=======================================
  Files           1        1           
  Lines         545      545           
  Branches      133      128    -5     
=======================================
  Hits          515      515           
  Misses         19       19           
  Partials       11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wimglenn
Copy link
Collaborator

wimglenn commented Jun 28, 2024

This change fails the test suite in Python 2.7. Appeasing a linter or style-guide is not a sufficiently good reason to break 2.7 support for parse. If the change to remove object inheritance can be done without breaking 2.x, I will consider it.

Explicitly inheriting from object does not change anything in Python 3.x as far as I am aware, can you make a reproducible example of this "won’t be possible to create a proper MRO" mentioned?

@wimglenn wimglenn closed this Aug 2, 2024
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.

3 participants