refactor: remove redundand parenthesis when return tuple

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
Leonidas Spyropoulos 2022-10-27 15:34:52 +01:00
parent d793193fdf
commit 7e06823e58
No known key found for this signature in database
GPG key ID: 59E43E106B247368
11 changed files with 34 additions and 34 deletions

View file

@ -1149,7 +1149,7 @@ def test_packages_post_unknown_action(client: TestClient, user: User, package: P
def test_packages_post_error(client: TestClient, user: User, package: Package):
async def stub_action(request: Request, **kwargs):
return (False, ["Some error."])
return False, ["Some error."]
actions = {"stub": stub_action}
with mock.patch.dict("aurweb.routers.packages.PACKAGE_ACTIONS", actions):
@ -1170,7 +1170,7 @@ def test_packages_post_error(client: TestClient, user: User, package: Package):
def test_packages_post(client: TestClient, user: User, package: Package):
async def stub_action(request: Request, **kwargs):
return (True, ["Some success."])
return True, ["Some success."]
actions = {"stub": stub_action}
with mock.patch.dict("aurweb.routers.packages.PACKAGE_ACTIONS", actions):

View file

@ -1315,7 +1315,7 @@ def test_packages_post_unknown_action(client: TestClient, user: User, package: P
def test_packages_post_error(client: TestClient, user: User, package: Package):
async def stub_action(request: Request, **kwargs):
return (False, ["Some error."])
return False, ["Some error."]
actions = {"stub": stub_action}
with mock.patch.dict("aurweb.routers.packages.PACKAGE_ACTIONS", actions):
@ -1336,7 +1336,7 @@ def test_packages_post_error(client: TestClient, user: User, package: Package):
def test_packages_post(client: TestClient, user: User, package: Package):
async def stub_action(request: Request, **kwargs):
return (True, ["Some success."])
return True, ["Some success."]
actions = {"stub": stub_action}
with mock.patch.dict("aurweb.routers.packages.PACKAGE_ACTIONS", actions):

View file

@ -24,7 +24,7 @@ class FakeProcess:
"""We need this constructor to remain compatible with Popen."""
def communicate(self) -> Tuple[bytes, bytes]:
return (self.stdout, self.stderr)
return self.stdout, self.stderr
def terminate(self) -> None:
raise Exception("Fake termination.")

View file

@ -42,7 +42,7 @@ def email_pieces(voteinfo: TUVoteInfo) -> Tuple[str, str]:
f"[1]. The voting period\nends in less than 48 hours.\n\n"
f"[1] {aur_location}/tu/?id={voteinfo.ID}"
)
return (subject, content)
return subject, content
@pytest.fixture