From baa15f6ed69f6b233d29133ba5b38eaaa26bc7cf Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 12 May 2024 15:20:36 +0200 Subject: [PATCH] Setup known first party modules --- build_helpers/freqtrade_client_version_align.py | 3 +-- ft_client/freqtrade_client/ft_client.py | 1 + ft_client/test_client/test_rest_client.py | 3 ++- pyproject.toml | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build_helpers/freqtrade_client_version_align.py b/build_helpers/freqtrade_client_version_align.py index 3e2c32e20..31360facf 100755 --- a/build_helpers/freqtrade_client_version_align.py +++ b/build_helpers/freqtrade_client_version_align.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 -from freqtrade_client import __version__ as client_version - from freqtrade import __version__ as ft_version +from freqtrade_client import __version__ as client_version def main(): diff --git a/ft_client/freqtrade_client/ft_client.py b/ft_client/freqtrade_client/ft_client.py index f76780ed0..ba9a7172d 100644 --- a/ft_client/freqtrade_client/ft_client.py +++ b/ft_client/freqtrade_client/ft_client.py @@ -8,6 +8,7 @@ from pathlib import Path from typing import Any, Dict import rapidjson + from freqtrade_client import __version__ from freqtrade_client.ft_rest_client import FtRestClient diff --git a/ft_client/test_client/test_rest_client.py b/ft_client/test_client/test_rest_client.py index 13e32f1c5..5a86c1b38 100644 --- a/ft_client/test_client/test_rest_client.py +++ b/ft_client/test_client/test_rest_client.py @@ -2,9 +2,10 @@ import re from unittest.mock import MagicMock import pytest +from requests.exceptions import ConnectionError + from freqtrade_client import FtRestClient from freqtrade_client.ft_client import add_arguments, main_exec -from requests.exceptions import ConnectionError def log_has_re(line, logs): diff --git a/pyproject.toml b/pyproject.toml index a1b7a2f7f..405a06917 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ profile = "black" # multi_line_output=3 lines_after_imports=2 skip_glob = ["**/.env*", "**/env/*", "**/.venv/*", "**/docs/*", "**/user_data/*"] +known_first_party = ["freqtrade_client"] [tool.pytest.ini_options] asyncio_mode = "auto" @@ -160,6 +161,7 @@ extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"] [tool.ruff.lint.isort] lines-after-imports = 2 +known-first-party = ["freqtrade_client"] [tool.flake8] # Default from https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore