From e81656ae12dbf4870f280452d75d21eefcf6a67f Mon Sep 17 00:00:00 2001 From: Shane Maloney Date: Tue, 9 Jul 2024 16:11:27 +0100 Subject: [PATCH] Fix pre-commit issues add isort config --- chimerapy/chimera.py | 2 +- chimerapy/chimera_legacy.py | 2 +- chimerapy/tests/test_chimera.py | 60 ++++++++++++++++++++++++++++----- pyproject.toml | 13 +++++++ 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/chimerapy/chimera.py b/chimerapy/chimera.py index 3c92eba..18c8141 100644 --- a/chimerapy/chimera.py +++ b/chimerapy/chimera.py @@ -1,7 +1,7 @@ """Package for Coronal Hole Identification Algorithm""" -import glob import sys +import glob import astropy.units as u import cv2 diff --git a/chimerapy/chimera_legacy.py b/chimerapy/chimera_legacy.py index 8d1a828..1592dbf 100644 --- a/chimerapy/chimera_legacy.py +++ b/chimerapy/chimera_legacy.py @@ -1,7 +1,7 @@ """ """ -import glob import sys +import glob import astropy.units as u import cv2 diff --git a/chimerapy/tests/test_chimera.py b/chimerapy/tests/test_chimera.py index 518ab50..4d32658 100644 --- a/chimerapy/tests/test_chimera.py +++ b/chimerapy/tests/test_chimera.py @@ -1,5 +1,5 @@ -import glob import os +import glob import warnings import mahotas @@ -7,14 +7,56 @@ from astropy.io import fits from astropy.modeling.models import Gaussian2D -from chimerapy.chimera import (Bounds, Xeb, Xnb, Xsb, Xwb, Yeb, Ynb, Ysb, Ywb, - ang, arcar, arccent, area, cent, centlat, - centlon, chpts, cont, coords, csys, data, datb, - datc, datm, dist, eastl, extent, filter, hg, - ins_prop, mB, mBneg, mBpos, npix, pos, - remove_neg, rescale_aia, rescale_hmi, - set_contour, sort, threshold, truarcar, trummar, - trupixar, westl, width, xpos, ypos) +from chimerapy.chimera import ( + Bounds, + Xeb, + Xnb, + Xsb, + Xwb, + Yeb, + Ynb, + Ysb, + Ywb, + ang, + arcar, + arccent, + area, + cent, + centlat, + centlon, + chpts, + cont, + coords, + csys, + data, + datb, + datc, + datm, + dist, + eastl, + extent, + filter, + hg, + ins_prop, + mB, + mBneg, + mBpos, + npix, + pos, + remove_neg, + rescale_aia, + rescale_hmi, + set_contour, + sort, + threshold, + truarcar, + trummar, + trupixar, + westl, + width, + xpos, + ypos, +) file_path = "./" diff --git a/pyproject.toml b/pyproject.toml index d2295f6..8b1f6bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,19 @@ omit = [ "*/chimerapy/version*", ] +[tool.isort] +balanced_wrapping = true +extend_skip = ["docs/conf.py", "chimerapy/__init__.py"] +default_section = "THIRDPARTY" +include_trailing_comma = true +known_first_party = "stixpy" +length_sort = false +length_sort_sections = "stdlib" +line_length = 120 +multi_line_output = 3 +no_lines_before = "LOCALFOLDER" +sections = ["STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] + [tool.coverage.report] exclude_lines = [ # Have to re-enable the standard pragma