Skip to content

Commit

Permalink
Opt
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Dec 17, 2019
1 parent d71ba4e commit 1398ea5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/matyan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
from shutil import copyfile
from typing import Union, Dict, AnyStr, Type, Any
import git
from git import Git
from git.exc import GitCommandError

from .auto_correct import add_final_dot, capitalize, unslugify
Expand Down Expand Up @@ -76,11 +76,11 @@
IGNORE_COMMITS_EXACT_WORDS = get_ignore_commits_exact_words()


def get_repository(path: str = None):
def get_repository(path: str = None) -> Git:
if not (path and os.path.exists(path) and os.path.isdir(path)):
path = os.getcwd()

return git.Git(path)
return Git(path)


def get_logs(between: str = None, path: str = None) -> Dict[str, Any]:
Expand Down Expand Up @@ -321,9 +321,9 @@ def prepare_changelog(
if commit_message.lower() in IGNORE_COMMITS_EXACT_WORDS:
continue

for ignore_prefix in get_ignore_commits_prefixes():
if commit_message.lower().startswith(ignore_prefix):
continue
ignore_commits_prefixes = tuple(get_ignore_commits_prefixes())
if commit_message.lower().startswith(ignore_commits_prefixes):
continue

commit_hash = commit_message \
if unique_commit_messages \
Expand Down Expand Up @@ -528,9 +528,9 @@ def prepare_releases_changelog(
if commit_message.lower() in IGNORE_COMMITS_EXACT_WORDS:
continue

for ignore_prefix in get_ignore_commits_prefixes():
if commit_message.lower().startswith(ignore_prefix):
continue
ignore_commits_prefixes = tuple(get_ignore_commits_prefixes())
if commit_message.lower().startswith(ignore_commits_prefixes):
continue

commit_hash = commit_message \
if unique_commit_messages \
Expand Down

0 comments on commit 1398ea5

Please sign in to comment.