Skip to content

Commit

Permalink
Type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Aug 6, 2024
1 parent 00dc905 commit b419845
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dbt_common/exceptions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WorkingDirectoryError(CommandError):
def __init__(self, cwd: str, cmd: List[str], msg: str) -> None:
super().__init__(cwd, cmd, msg)

def __str__(self):
def __str__(self, prefix: str = "! ") -> str:
return f'{self.msg}: "{self.cwd}"'


Expand All @@ -46,5 +46,5 @@ def __init__(
self.stderr = scrub_secrets(stderr.decode("utf-8"), env_secrets())
self.args = (cwd, self.cmd, returncode, self.stdout, self.stderr, msg)

def __str__(self):
def __str__(self, prefix: str = "! ") -> str:
return f"{self.msg} running: {self.cmd}"
4 changes: 2 additions & 2 deletions dbt_common/semver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataclasses import dataclass
import re
from typing import List, Iterable
from typing import Iterable, List, Union

import dbt_common.exceptions.base
from dbt_common.exceptions import VersionsNotCompatibleError
Expand Down Expand Up @@ -378,7 +378,7 @@ def is_exact(self) -> bool:
return False


def reduce_versions(*args):
def reduce_versions(*args: Union[VersionSpecifier, VersionRange, str]) -> VersionRange:
version_specifiers = []

for version in args:
Expand Down

0 comments on commit b419845

Please sign in to comment.