forked from Mirror/pmbootstrap
pmb: Annotate args (MR 2337)
Checking if TYPE_CHECKING avoids the circular dependency.
This commit is contained in:
parent
235d25618f
commit
d50ce1c59b
1 changed files with 5 additions and 3 deletions
|
@ -4,10 +4,13 @@
|
|||
import sys
|
||||
import os
|
||||
import traceback
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Optional, TYPE_CHECKING
|
||||
|
||||
from pmb.helpers.exceptions import BuildFailedError, NonBugError
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pmb.types import PmbArgs
|
||||
|
||||
from . import config
|
||||
from . import parse
|
||||
from . import types
|
||||
|
@ -48,8 +51,7 @@ def print_log_hint() -> None:
|
|||
def main() -> int:
|
||||
# Wrap everything to display nice error messages
|
||||
|
||||
# FIXME: can't use PmbArgs here because it creates a circular import
|
||||
args: Any
|
||||
args: PmbArgs
|
||||
try:
|
||||
# Parse arguments, set up logging
|
||||
args = parse.arguments()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue