diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40628dd..0fcaf4d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: > )$ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.2.0 hooks: - id: ruff args: @@ -18,7 +18,7 @@ repos: args: - --dont-order-by-type - repo: https://github.com/psf/black - rev: "23.12.1" + rev: "24.1.1" hooks: - id: black name: Format code (black) diff --git a/psychrochart/__init__.py b/psychrochart/__init__.py index 3cd2ff3..4522c21 100644 --- a/psychrochart/__init__.py +++ b/psychrochart/__init__.py @@ -1,4 +1,5 @@ """A library to make psychrometric charts and overlay information in them.""" + from psychrochart.chart import PsychroChart from psychrochart.models.annots import ChartAnnots from psychrochart.models.config import ChartConfig, ChartZone, ChartZones diff --git a/psychrochart/__main__.py b/psychrochart/__main__.py index bd6c800..9491971 100644 --- a/psychrochart/__main__.py +++ b/psychrochart/__main__.py @@ -1,4 +1,5 @@ """A library to make psychrometric charts and overlay information in them.""" + import matplotlib.pyplot as plt from psychrochart.chart import PsychroChart diff --git a/psychrochart/chart.py b/psychrochart/chart.py index eb80eaf..f8a50aa 100644 --- a/psychrochart/chart.py +++ b/psychrochart/chart.py @@ -1,4 +1,5 @@ """A library to make psychrometric charts and overlay information in them.""" + import gc from io import StringIO from pathlib import Path @@ -151,9 +152,9 @@ def plot_points_dbt_rh( self, points: dict[str, Any], connectors: list[dict[str, Any]] | None = None, - convex_groups: list[dict[str, Any]] - | list[ConvexGroupTuple] - | None = None, + convex_groups: ( + list[dict[str, Any]] | list[ConvexGroupTuple] | None + ) = None, scatter_style: dict[str, Any] | None = None, ) -> ChartAnnots: """Append individual points, connectors and groups to the plot. diff --git a/psychrochart/chartdata.py b/psychrochart/chartdata.py index d476695..c298472 100644 --- a/psychrochart/chartdata.py +++ b/psychrochart/chartdata.py @@ -1,4 +1,5 @@ """A library to make psychrometric charts and overlay information in them.""" + import logging from typing import Sequence diff --git a/psychrochart/models/curves.py b/psychrochart/models/curves.py index a6dcc38..2dd0b7e 100644 --- a/psychrochart/models/curves.py +++ b/psychrochart/models/curves.py @@ -45,12 +45,12 @@ def curve_id(self) -> str: def dict( self, *, - include: AbstractSet[int | str] - | Mapping[int | str, Any] - | None = None, - exclude: AbstractSet[int | str] - | Mapping[int | str, Any] - | None = None, + include: ( + AbstractSet[int | str] | Mapping[int | str, Any] | None + ) = None, + exclude: ( + AbstractSet[int | str] | Mapping[int | str, Any] | None + ) = None, by_alias: bool = False, skip_defaults: bool | None = None, exclude_unset: bool = False, diff --git a/psychrochart/plot_logic.py b/psychrochart/plot_logic.py index 2c51793..6ab9ec6 100644 --- a/psychrochart/plot_logic.py +++ b/psychrochart/plot_logic.py @@ -1,4 +1,5 @@ """A library to make psychrometric charts and overlay information in them.""" + import logging from math import atan2, degrees from typing import Any, AnyStr diff --git a/tests/conftest.py b/tests/conftest.py index c56e075..46425b0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Common helpers for tests""" + import logging from pathlib import Path import re diff --git a/tests/test_curves_models.py b/tests/test_curves_models.py index 856bf55..56fccc1 100644 --- a/tests/test_curves_models.py +++ b/tests/test_curves_models.py @@ -1,4 +1,5 @@ """Tests objects to handle psychrometric curves.""" + import matplotlib.pyplot as plt import numpy as np import pytest diff --git a/tests/test_overlay_info.py b/tests/test_overlay_info.py index 7624102..223ee69 100644 --- a/tests/test_overlay_info.py +++ b/tests/test_overlay_info.py @@ -1,4 +1,5 @@ """Tests plotting.""" + import numpy as np import pytest diff --git a/tests/test_plot_chart.py b/tests/test_plot_chart.py index dacda7d..77c06bd 100644 --- a/tests/test_plot_chart.py +++ b/tests/test_plot_chart.py @@ -1,4 +1,5 @@ """Tests plotting.""" + import numpy as np from psychrochart import PsychroChart diff --git a/tests/test_psychrometrics.py b/tests/test_psychrometrics.py index ed8ea24..ed8858b 100644 --- a/tests/test_psychrometrics.py +++ b/tests/test_psychrometrics.py @@ -1,4 +1,5 @@ """Test Cases for psychrometric equations.""" + from unittest import TestCase import numpy as np diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 2be0013..31ae193 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -1,4 +1,5 @@ """Test that Psychrochart object is serializable.""" + import pickle from psychrochart import load_config, PsychroChart diff --git a/tests/test_utils.py b/tests/test_utils.py index 5b72c33..3c0010a 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,5 @@ """Tests utilities.""" + import json import logging