Skip to content

Commit

Permalink
STY: disable duplicate code warning
Browse files Browse the repository at this point in the history
No need to reuse this code as it only occurs twice
  • Loading branch information
khalford committed Nov 28, 2024
1 parent a3ad9c1 commit 0a9e726
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions cloud-chatops/tests/test_find_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from pr_dataclass import PR


# pylint: disable=R0801


@pytest.fixture(name="instance", scope="function")
def instance_fixture():
"""Creates a class fixture to use in the tests"""
Expand Down
20 changes: 11 additions & 9 deletions cloud-chatops/tests/test_pr_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
}

MOCK_PR = PR(
title="mock_title #1",
author="mock_author",
url="https://api.github.com/repos/mock_owner/mock_repo/pulls",
stale=False,
draft=False,
labels=["mock_label"],
repository="mock_repo",
created_at=datetime.strptime("2024-11-15T07:33:56Z", "%Y-%m-%dT%H:%M:%SZ"),
)
title="mock_title #1",
author="mock_author",
url="https://api.github.com/repos/mock_owner/mock_repo/pulls",
stale=False,
draft=False,
labels=["mock_label"],
repository="mock_repo",
created_at=datetime.strptime("2024-11-15T07:33:56Z", "%Y-%m-%dT%H:%M:%SZ"),
)

# pylint: disable=R0801


def test_is_stale_false():
Expand Down

0 comments on commit 0a9e726

Please sign in to comment.