matejcik @matejcik@octodon.social
Follow

example:

module `transport` has an `__init__.py` that defines base class `Transport`. It also has `TRANSPORTS` which is a list of all subclasses of `Transport`.

In the init, i'm importing FooTransport, BarTransport, etc. All of those also import the base class from init.

so I moved the subclass imports after the main class definition, and it solves the problem! except it's really, really weird

i could also move the superclass definition to a `common.py` or something, but that feels needless

· Web · 0 · 0