From 6907929f18d3354d9af921f85f83ec18c4166768 Mon Sep 17 00:00:00 2001 From: James Prior Date: Sun, 9 Jul 2023 07:33:59 +0100 Subject: [PATCH] chore: no relative imports --- jsonpath/function_extensions/arguments.py | 6 +++--- jsonpath/function_extensions/count.py | 12 ++++++------ jsonpath/function_extensions/is_instance.py | 4 ++-- jsonpath/function_extensions/match.py | 10 +++++----- jsonpath/function_extensions/search.py | 10 +++++----- jsonpath/function_extensions/typeof.py | 4 ++-- jsonpath/function_extensions/value.py | 2 +- pyproject.toml | 1 + 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/jsonpath/function_extensions/arguments.py b/jsonpath/function_extensions/arguments.py index 8020be2..4bd97ec 100644 --- a/jsonpath/function_extensions/arguments.py +++ b/jsonpath/function_extensions/arguments.py @@ -6,10 +6,10 @@ from typing import List if TYPE_CHECKING: - from ..env import JSONPathEnvironment - from ..token import Token + from jsonpath.env import JSONPathEnvironment + from jsonpath.token import Token -from ..exceptions import JSONPathTypeError +from jsonpath.exceptions import JSONPathTypeError def validate( diff --git a/jsonpath/function_extensions/count.py b/jsonpath/function_extensions/count.py index 7cd994d..875bfa8 100644 --- a/jsonpath/function_extensions/count.py +++ b/jsonpath/function_extensions/count.py @@ -4,14 +4,14 @@ from typing import TYPE_CHECKING from typing import List -from ..exceptions import JSONPathTypeError -from ..filter import Literal -from ..filter import Nil +from jsonpath.exceptions import JSONPathTypeError +from jsonpath.filter import Literal +from jsonpath.filter import Nil if TYPE_CHECKING: - from ..env import JSONPathEnvironment - from ..match import NodeList - from ..token import Token + from jsonpath.env import JSONPathEnvironment + from jsonpath.match import NodeList + from jsonpath.token import Token class Count: diff --git a/jsonpath/function_extensions/is_instance.py b/jsonpath/function_extensions/is_instance.py index 8b3181a..568c670 100644 --- a/jsonpath/function_extensions/is_instance.py +++ b/jsonpath/function_extensions/is_instance.py @@ -3,8 +3,8 @@ from typing import Mapping from typing import Sequence -from ..filter import UNDEFINED -from ..filter import UNDEFINED_LITERAL +from jsonpath.filter import UNDEFINED +from jsonpath.filter import UNDEFINED_LITERAL class IsInstance: diff --git a/jsonpath/function_extensions/match.py b/jsonpath/function_extensions/match.py index 6e01882..8fd2fbd 100644 --- a/jsonpath/function_extensions/match.py +++ b/jsonpath/function_extensions/match.py @@ -6,13 +6,13 @@ from typing import Pattern from typing import Union -from ..exceptions import JSONPathTypeError -from ..filter import RegexArgument -from ..filter import StringLiteral +from jsonpath.exceptions import JSONPathTypeError +from jsonpath.filter import RegexArgument +from jsonpath.filter import StringLiteral if TYPE_CHECKING: - from ..env import JSONPathEnvironment - from ..token import Token + from jsonpath.env import JSONPathEnvironment + from jsonpath.token import Token class Match: diff --git a/jsonpath/function_extensions/search.py b/jsonpath/function_extensions/search.py index 2d7e8e9..8ecc8b7 100644 --- a/jsonpath/function_extensions/search.py +++ b/jsonpath/function_extensions/search.py @@ -6,13 +6,13 @@ from typing import Pattern from typing import Union -from ..exceptions import JSONPathTypeError -from ..filter import RegexArgument -from ..filter import StringLiteral +from jsonpath.exceptions import JSONPathTypeError +from jsonpath.filter import RegexArgument +from jsonpath.filter import StringLiteral if TYPE_CHECKING: - from ..env import JSONPathEnvironment - from ..token import Token + from jsonpath.env import JSONPathEnvironment + from jsonpath.token import Token class Search: diff --git a/jsonpath/function_extensions/typeof.py b/jsonpath/function_extensions/typeof.py index da9630a..16f7eec 100644 --- a/jsonpath/function_extensions/typeof.py +++ b/jsonpath/function_extensions/typeof.py @@ -3,8 +3,8 @@ from typing import Mapping from typing import Sequence -from ..filter import UNDEFINED -from ..filter import UNDEFINED_LITERAL +from jsonpath.filter import UNDEFINED +from jsonpath.filter import UNDEFINED_LITERAL class TypeOf: diff --git a/jsonpath/function_extensions/value.py b/jsonpath/function_extensions/value.py index 3743234..fa33db4 100644 --- a/jsonpath/function_extensions/value.py +++ b/jsonpath/function_extensions/value.py @@ -1,7 +1,7 @@ """The standard `value` function extension.""" from typing import Sequence -from ..filter import UNDEFINED +from jsonpath.filter import UNDEFINED def value(obj: object) -> object: diff --git a/pyproject.toml b/pyproject.toml index 13f2ce8..fb8cc07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,6 +127,7 @@ select = [ "T10", "T20", "TCH", + "TID", "YTT", ] ignore = ["S105", "S101", "D107", "D105", "PLR0913"]