parse icon indicating copy to clipboard operation
parse copied to clipboard

Remove explicit base object inheritance

Open blablatdinov opened this issue 1 year ago • 3 comments

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 avatar Jun 27 '24 21:06 blablatdinov

@r1chardj0n3s take a look please

blablatdinov avatar Jun 27 '24 21:06 blablatdinov

:warning: 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 :white_check_mark:

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

:exclamation: 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           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jun 28 '24 15:06 codecov-commenter

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 avatar Jun 28 '24 16:06 wimglenn