From d63644e7d6cfdc05adc8d87f582696f069daf587 Mon Sep 17 00:00:00 2001 From: Siddharth Chaini <40721514+sidchaini@users.noreply.github.com> Date: Sun, 12 May 2024 17:48:21 -0400 Subject: [PATCH] Made project flake8 compatible flake8 --extend-ignore=E203,E701 --max-line-length 88 tests/ distclassipy setup.py --- distclassipy/classifier.py | 6 ++++-- setup.py | 3 ++- tests/test_classifier.py | 7 +++++-- tests/test_distances.py | 5 +++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/distclassipy/classifier.py b/distclassipy/classifier.py index 9a8f73e..c3d39ec 100644 --- a/distclassipy/classifier.py +++ b/distclassipy/classifier.py @@ -19,8 +19,12 @@ along with this program. If not, see . """ +from typing import Callable + import numpy as np + import pandas as pd + import scipy from sklearn.base import BaseEstimator, ClassifierMixin @@ -28,8 +32,6 @@ from sklearn.utils.multiclass import unique_labels from sklearn.utils.validation import check_X_y, check_array, check_is_fitted -from typing import Callable - from .distances import Distance # Hardcoded source packages to check for distance metrics. diff --git a/setup.py b/setup.py index dc019c8..0a301c8 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,8 @@ -from setuptools import setup import codecs import os.path +from setuptools import setup + def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) diff --git a/tests/test_classifier.py b/tests/test_classifier.py index 2b22edd..2005bb4 100644 --- a/tests/test_classifier.py +++ b/tests/test_classifier.py @@ -1,6 +1,9 @@ -import pytest -import numpy as np from distclassipy.classifier import DistanceMetricClassifier + +import numpy as np + +import pytest + from sklearn.utils.estimator_checks import check_estimator diff --git a/tests/test_distances.py b/tests/test_distances.py index 3dc4c56..694193c 100644 --- a/tests/test_distances.py +++ b/tests/test_distances.py @@ -1,7 +1,8 @@ -import pytest -import numpy as np +# import pytest from distclassipy.distances import Distance +import numpy as np + # Initialize the Distance class to use its methods for testing distance = Distance()