From 30ca4014be5a0205890a347034818b2aef258b8d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 10 Jul 2022 20:55:05 +0200 Subject: [PATCH] :art: Format Python code with psf/black (#13) Co-authored-by: gcattan --- git_quality_check/utils/common.py | 4 ++++ tests/utils/test_common.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/git_quality_check/utils/common.py b/git_quality_check/utils/common.py index 256408e..86988f0 100644 --- a/git_quality_check/utils/common.py +++ b/git_quality_check/utils/common.py @@ -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 = [] @@ -44,6 +46,8 @@ def get_date(): " " Returns the tuple (sample, ) """ + + def sample(li: list[str], n: int): count = len(li) if count > n: diff --git a/tests/utils/test_common.py b/tests/utils/test_common.py index 750f47c..9f3799f 100644 --- a/tests/utils/test_common.py +++ b/tests/utils/test_common.py @@ -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) @@ -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