Skip to content

[🚀 Feature]: Replace explicit parent class references using Parent.__init__(...) #10769

@symonk

Description

@symonk

Feature and motivation

I upgraded most things to python 3.7+ however there are still some references using their parent by direct name, this has a few caveats (most importantly gets in the way of MRO and doesn't lend itself to co-operative multi-inheritance, albeit it that is a small potential use case):

  • Update all references using SomeParentClass.__init__(...) to instead use super().__init__(...)

Usage example

Here is one example:

https://github.com/SeleniumHQ/selenium/blob/trunk/py/selenium/webdriver/chromium/remote_connection.py#L23

service.Service.__init__(self, executable_path, port=port, env=env, start_error_message=start_error_message)

Should be able to find using some sort of grep -ir /py .*\.__init__ (or similar)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsE-easyAn easy issue to implement or PR to review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions