Skip to content

Commit

Permalink
🎨 Format Python code with psf/black (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: gcattan <gcattan@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and gcattan authored Jul 10, 2022
1 parent 6567ca2 commit 30ca401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git_quality_check/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
" - bad_words: A list of words that should be avoided in commit messages.
" - main_branches: The list of main branches (e.g. master, main or develop)
"""


def parse_inputs():
bad_words = []
main_branches = []
Expand Down Expand Up @@ -44,6 +46,8 @@ def get_date():
"
" Returns the tuple (sample, )
"""


def sample(li: list[str], n: int):
count = len(li)
if count > n:
Expand Down
2 changes: 2 additions & 0 deletions tests/utils/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def test_sample_same_size_than_list():
for i in range(size):
assert li[i] == sample_list[i]


def test_sample_greater_size_than_list():
li = [3, 10, 6, 15, 20]
size = len(li)
Expand All @@ -28,6 +29,7 @@ def test_sample_greater_size_than_list():
for i in range(size):
assert li[i] == sample_list[i]


def test_sample_lower_size_than_list():
li = [3, 10, 6, 15, 20]
size = len(li) - 1
Expand Down

0 comments on commit 30ca401

Please sign in to comment.