chore: upgrade pre-commit hooks (#1735)

* change pep585 hook to pyupgrade

* run pyupgrade + cleanup lint errors
This commit is contained in:
Hayden
2022-10-17 14:37:06 -08:00
committed by GitHub
parent e516a2e801
commit a8f0fb14a7
13 changed files with 79 additions and 83 deletions

View File

@@ -11,7 +11,7 @@ from tests.utils.fixture_schemas import TestUser
def test_recipe_repo_get_by_categories_basic(database: AllRepositories, unique_user: TestUser):
# Bootstrap the database with categories
slug1, slug2, slug3 = [random_string(10) for _ in range(3)]
slug1, slug2, slug3 = (random_string(10) for _ in range(3))
categories: list[CategoryOut | CategorySave] = [
CategorySave(group_id=unique_user.group_id, name=slug1, slug=slug1),
@@ -68,7 +68,7 @@ def test_recipe_repo_get_by_categories_basic(database: AllRepositories, unique_u
def test_recipe_repo_get_by_categories_multi(database: AllRepositories, unique_user: TestUser):
slug1, slug2 = [random_string(10) for _ in range(2)]
slug1, slug2 = (random_string(10) for _ in range(2))
categories = [
CategorySave(group_id=unique_user.group_id, name=slug1, slug=slug1),
@@ -120,7 +120,7 @@ def test_recipe_repo_get_by_categories_multi(database: AllRepositories, unique_u
def test_recipe_repo_pagination_by_categories(database: AllRepositories, unique_user: TestUser):
slug1, slug2 = [random_string(10) for _ in range(2)]
slug1, slug2 = (random_string(10) for _ in range(2))
categories = [
CategorySave(group_id=unique_user.group_id, name=slug1, slug=slug1),
@@ -201,7 +201,7 @@ def test_recipe_repo_pagination_by_categories(database: AllRepositories, unique_
def test_recipe_repo_pagination_by_tags(database: AllRepositories, unique_user: TestUser):
slug1, slug2 = [random_string(10) for _ in range(2)]
slug1, slug2 = (random_string(10) for _ in range(2))
tags = [
TagSave(group_id=unique_user.group_id, name=slug1, slug=slug1),
@@ -280,7 +280,7 @@ def test_recipe_repo_pagination_by_tags(database: AllRepositories, unique_user:
def test_recipe_repo_pagination_by_tools(database: AllRepositories, unique_user: TestUser):
slug1, slug2 = [random_string(10) for _ in range(2)]
slug1, slug2 = (random_string(10) for _ in range(2))
tools = [
RecipeToolSave(group_id=unique_user.group_id, name=slug1, slug=slug1),