Skip to content

Commit

Permalink
Fix typings and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernricks committed Oct 5, 2023
1 parent 46ec70b commit 4af55bb
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 106 deletions.
12 changes: 10 additions & 2 deletions pontos/git/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
from enum import Enum
from os import PathLike, fspath
from pathlib import Path
from typing import Collection, Iterable, Iterator, List, Optional, Union
from typing import (
Collection,
Iterable,
Iterator,
List,
Optional,
Sequence,
Union,
)

from pontos.errors import PontosError
from pontos.git.status import StatusEntry, parse_git_status
Expand Down Expand Up @@ -384,7 +392,7 @@ def list_tags(

def add(
self,
files: Union[str, PathLike[str], list[Union[PathLike[str], str]]],
files: Union[str, PathLike[str], Sequence[Union[PathLike[str], str]]],
) -> None:
"""
Add files to the git staging area
Expand Down
4 changes: 3 additions & 1 deletion pontos/version/commands/_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ class VersionCommand(ABC):

project_file_name: str

def __init__(self, versioning_scheme: VersioningScheme) -> None:
def __init__(
self, versioning_scheme: Union[VersioningScheme, type[VersioningScheme]]
) -> None:
self.project_file_path = Path.cwd() / self.project_file_name
self.versioning_scheme = versioning_scheme

Expand Down
Loading

0 comments on commit 4af55bb

Please sign in to comment.