Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Nov 3, 2023
1 parent 94aefc2 commit 2f98b58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gitbark/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ def get_bark_rules(project: Project, commit: Optional[Commit] = None) -> BarkRul

commit = commit or get_bark_rules_commit(project)
if not commit:
return BarkRules([], [])
return BarkRules([])

try:
bark_rules_blob = commit.read_file(BARK_RULES)
except FileNotFoundError:
return BarkRules([], [])
return BarkRules([])

bark_rules_object = yaml.safe_load(bark_rules_blob)
return BarkRules.parse(bark_rules_object)
4 changes: 2 additions & 2 deletions gitbark/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from abc import ABC, abstractmethod
from pygit2 import Repository
from typing import Any, Optional, ClassVar, Callable
from typing import Any, Optional, ClassVar, Callable, Union
from importlib.metadata import entry_points


Expand All @@ -31,7 +31,7 @@ def __init__(


class _Rule(ABC):
setup: ClassVar[Optional[Callable[[], dict]]] = None
setup: ClassVar[Optional[Callable[[], Union[dict, str]]]] = None

def __init__(
self,
Expand Down

0 comments on commit 2f98b58

Please sign in to comment.