Skip to content

Convert Common to generic type to allow parametrization of its parent attribute #1372

Open
@happz

Description

@happz

Common.parent is supposed to be one of Common's subclasses, basically, it's parent: Common. But in reality, things are much, much stricter - for example, tmt.steps.execute.internal.ExecuteInternal will never become parent of tmt.base.Test. For vario0us classes in tmt codebase, the list of possible parents is way stricter than Common. Formalizing this situation would give mypy and other linter more knowledge, preventing bugs and helping linters and editors analyzing code.

Metadata

Metadata

Assignees

Labels

code | styleCode style changes not affecting functionalitycode | type annotationsRelated to type annotations and type cleanup

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions