From a76333cbf455266c0947eb615209871a4e7f847a Mon Sep 17 00:00:00 2001 From: Artur Chakhvadze Date: Thu, 27 Jun 2024 03:18:41 +0400 Subject: [PATCH] Make linter happy. --- tests/test_schema.py | 17 ++++++++++++----- wanga/schema/normalize.py | 2 +- wanga/templates/__init__.py | 1 - 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/test_schema.py b/tests/test_schema.py index f6a91b5..bbdd7b7 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -4,9 +4,16 @@ from attrs import frozen -from wanga.schema.extract import * -from wanga.schema.normalize import * -from wanga.schema.schema import * +from wanga.schema.extract import extract_schema +from wanga.schema.normalize import normalize_annotation, unpack_optional +from wanga.schema.schema import ( + CallableSchema, + ObjectField, + ObjectNode, + PrimitiveNode, + SequenceNode, + UndefinedNode, +) def test_normalize_schema(): @@ -45,7 +52,7 @@ def test_concretize_schema(): def test_extract_schema(): - def foo(x: int, y: str = "hello"): + def foo(x: int, y: str = "hello"): # noqa pass foo_schema = CallableSchema( @@ -72,7 +79,7 @@ def foo(x: int, y: str = "hello"): assert extract_schema(foo) == foo_schema - def bar(x: typing.List[int]) -> int: + def bar(x: typing.List[int]) -> int: # noqa r"""Bar. Blah blah blah. diff --git a/wanga/schema/normalize.py b/wanga/schema/normalize.py index 2c34474..4fa2506 100644 --- a/wanga/schema/normalize.py +++ b/wanga/schema/normalize.py @@ -1,6 +1,6 @@ import collections import collections.abc -import typing +import typing # noqa: F401 from types import NoneType, UnionType from typing import Annotated, Union, get_args, get_origin diff --git a/wanga/templates/__init__.py b/wanga/templates/__init__.py index 55e5f84..e69de29 100644 --- a/wanga/templates/__init__.py +++ b/wanga/templates/__init__.py @@ -1 +0,0 @@ -from .common import *