Skip to content

Commit

Permalink
Fix typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JimMadge committed Oct 19, 2023
1 parent a025bfc commit a6580e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
9 changes: 5 additions & 4 deletions data_safe_haven/external/api/azure_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ class AzureCliAccount:
class AzureCli:
"""Interface to the Azure CLI"""

def __init__(self):
def __init__(self) -> None:
self.logger = LoggingSingleton()

self.path = which("az")
if self.path is None:
path = which("az")
if path is None:
msg = "Unable to find Azure CLI executable in your path.\nPlease ensure that Azure CLI is installed"
raise DataSafeHavenAzureError(msg)
self.path = path

self._account = None
self._account: AzureCliAccount | None = None

@property
def account(self) -> AzureCliAccount:
Expand Down
5 changes: 3 additions & 2 deletions data_safe_haven/infrastructure/stack_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def __init__(self, config: Config):
self.cfg = config
self.env_: dict[str, Any] | None = None
self.logger = LoggingSingleton()
self.path = which("pulumi")
if self.path is None:
path = which("pulumi")
if path is None:
msg = "Unable to find Pulumi CLI executable in your path.\nPlease ensure that Pulumi is installed"
raise DataSafeHavenPulumiError(msg)
self.path = path

# Ensure Azure CLI account is correct
# This will be needed to populate env
Expand Down
2 changes: 2 additions & 0 deletions typings/typer/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from click.exceptions import BadParameter, Exit
from click.termui import confirm

from .main import Typer
from .params import Argument
Expand All @@ -10,4 +11,5 @@ __all__ = [
"Exit",
"Option",
"Typer",
"confirm",
]

0 comments on commit a6580e6

Please sign in to comment.