Add new ruff rules and fix their fallout:
future-annotations = true
select = [ "TC", # type-checking import placement rules "FA", # future annotations rules ]This comprises:
- Streamline imports and exports in cmds.xxx.Cmd
- Import base class as "Base"- Export types Cmd and Parent via __all__- Move all types imported only for annotation below TYPE_CHECKING
- Use "from __future__ import annotations" all over the place
Signed-off-by: Jan Lindemann <jan@janware.com>
8 lines
278 B
Python
8 lines
278 B
Python
from .BaseCmdPkgRelations import BaseCmdPkgRelations as Base, Parent
|
|
|
|
class CmdPkgRequires(Base): # export
|
|
|
|
def __init__(self, parent: Parent) -> None:
|
|
super().__init__(
|
|
parent, 'requires', help = 'Print packages required for a given package'
|
|
)
|