diff --git a/src/aspire/classification/averager2d.py b/src/aspire/classification/averager2d.py index 6e03b861b..b447a6d91 100644 --- a/src/aspire/classification/averager2d.py +++ b/src/aspire/classification/averager2d.py @@ -1,10 +1,8 @@ import logging -import warnings from abc import ABC, abstractmethod import numpy as np -from aspire import config from aspire.basis import Coef from aspire.classification.reddy_chatterji import reddy_chatterji_register from aspire.image import Image, ImageStacker, MeanImageStacker diff --git a/src/aspire/classification/rir_class2d.py b/src/aspire/classification/rir_class2d.py index 6927d19bc..19a3479ff 100644 --- a/src/aspire/classification/rir_class2d.py +++ b/src/aspire/classification/rir_class2d.py @@ -195,7 +195,7 @@ def classify(self, diagnostics=False): # Report some information about reflections logger.info( f"Count reflected: {np.sum(self.reflections)}" - f" {100 * np.mean(self.reflections) } %" + f" {100 * np.mean(self.reflections)} %" ) return self.classes, self.reflections, self.distances diff --git a/src/aspire/volume/symmetry_groups.py b/src/aspire/volume/symmetry_groups.py index 6916e27ca..1384b951b 100644 --- a/src/aspire/volume/symmetry_groups.py +++ b/src/aspire/volume/symmetry_groups.py @@ -88,7 +88,7 @@ def parse(symmetry, dtype): } if symmetry_type not in map_to_sym_group.keys(): raise ValueError( - f"Symmetry type {symmetry_type} not supported. Try: {*map_to_sym_group.keys(),}." + f"Symmetry type {symmetry_type} not supported. Try: {*map_to_sym_group.keys(), }." ) symmetry_group = map_to_sym_group[symmetry_type] diff --git a/tests/test_CtfEstimate.py b/tests/test_CtfEstimate.py index b08b9fab9..26cc168d9 100644 --- a/tests/test_CtfEstimate.py +++ b/tests/test_CtfEstimate.py @@ -84,7 +84,7 @@ def test_estimate_CTF(): "Defocus Angle (degrees):" f"\n\tASPIRE= {defocus_ang_degrees:0.2f}*" f'\n\tCTFFIND4= {TEST_OUTPUT["defocus_ang"]:0.2f}*' - f'\n\tError: {abs((TEST_OUTPUT["defocus_ang"]- defocus_ang_degrees)/TEST_OUTPUT["defocus_ang"]) * 100:0.2f}%' + f'\n\tError: {abs((TEST_OUTPUT["defocus_ang"] - defocus_ang_degrees)/TEST_OUTPUT["defocus_ang"]) * 100:0.2f}%' ) for param in ["cs", "amplitude_contrast", "voltage", "pixel_size"]: diff --git a/tests/test_averager2d.py b/tests/test_averager2d.py index 1c1c13326..1bbb7ca18 100644 --- a/tests/test_averager2d.py +++ b/tests/test_averager2d.py @@ -1,13 +1,9 @@ -import importlib import logging import os -import platform -from importlib.metadata import version from unittest import TestCase import numpy as np import pytest -from packaging.version import parse as parse_version from aspire.basis import FFBBasis2D from aspire.classification import (