From 327b64aab1d721b792fc2e7d6c33095490395ffa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:32:18 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e60328c7..d3f1bb038 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.2.2 + rev: v0.3.2 hooks: # Run the linter. - id: ruff From 1f6229966275db6563ad88b93156081dbdeeb874 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:32:26 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- exspy/components/__init__.py | 2 +- exspy/components/eels_vignetting.py | 1 - exspy/components/pes_core_line_shape.py | 1 - exspy/docstrings/model.py | 3 +-- exspy/misc/eels/eelsdb.py | 1 + exspy/misc/eels/hartree_slater_gos.py | 1 - exspy/misc/eels/hydrogenic_gos.py | 1 - exspy/models/__init__.py | 2 +- exspy/models/edsmodel.py | 1 - exspy/models/edssemmodel.py | 1 - exspy/models/edstemmodel.py | 1 - exspy/signals/__init__.py | 1 + exspy/signals/dielectric_function.py | 2 -- exspy/signals/eds_sem.py | 2 -- exspy/signals/eds_tem.py | 2 -- exspy/signals/eels.py | 2 -- 16 files changed, 5 insertions(+), 19 deletions(-) diff --git a/exspy/components/__init__.py b/exspy/components/__init__.py index a7dccc8ff..7d97a12fb 100644 --- a/exspy/components/__init__.py +++ b/exspy/components/__init__.py @@ -1,4 +1,4 @@ -"""Components """ +"""Components""" from .eels_arctan import EELSArctan from .eels_cl_edge import EELSCLEdge diff --git a/exspy/components/eels_vignetting.py b/exspy/components/eels_vignetting.py index d3f604955..f52266fe2 100644 --- a/exspy/components/eels_vignetting.py +++ b/exspy/components/eels_vignetting.py @@ -23,7 +23,6 @@ class Vignetting(Component): - """ Model the vignetting of the lens with a cos^4 law multiplied by lines on the edges diff --git a/exspy/components/pes_core_line_shape.py b/exspy/components/pes_core_line_shape.py index 51add6825..e0484c42d 100644 --- a/exspy/components/pes_core_line_shape.py +++ b/exspy/components/pes_core_line_shape.py @@ -32,7 +32,6 @@ def _calculate_shirley_background(values): class PESCoreLineShape(Component): - """ """ def __init__(self, A=1.0, FWHM=1.0, origin=0.0, ab=0.0, shirley=0.0): diff --git a/exspy/docstrings/model.py b/exspy/docstrings/model.py index ad595b26f..30db3d820 100644 --- a/exspy/docstrings/model.py +++ b/exspy/docstrings/model.py @@ -17,9 +17,8 @@ # along with eXSpy. If not, see . -"""Common docstring snippets for model. +"""Common docstring snippets for model.""" -""" from exspy.misc.eels.gosh_gos import _GOSH_DOI GOS_PARAMETER = """GOS : 'hydrogenic', 'gosh', 'Hartree-Slater'. diff --git a/exspy/misc/eels/eelsdb.py b/exspy/misc/eels/eelsdb.py index 8fd0437c2..709399d38 100644 --- a/exspy/misc/eels/eelsdb.py +++ b/exspy/misc/eels/eelsdb.py @@ -18,6 +18,7 @@ """This module provides tools to interact with The EELS Database.""" + import requests import logging diff --git a/exspy/misc/eels/hartree_slater_gos.py b/exspy/misc/eels/hartree_slater_gos.py index c622416fe..8c891afd7 100644 --- a/exspy/misc/eels/hartree_slater_gos.py +++ b/exspy/misc/eels/hartree_slater_gos.py @@ -68,7 +68,6 @@ class HartreeSlaterGOS(TabulatedGOS): - """Read Hartree-Slater Generalized Oscillator Strength parametrized from files. diff --git a/exspy/misc/eels/hydrogenic_gos.py b/exspy/misc/eels/hydrogenic_gos.py index 1980eea87..d7fb2e13e 100644 --- a/exspy/misc/eels/hydrogenic_gos.py +++ b/exspy/misc/eels/hydrogenic_gos.py @@ -64,7 +64,6 @@ class HydrogenicGOS(BaseGOS): - """Computes the K and L GOS using R. Egerton's routines. Parameters diff --git a/exspy/models/__init__.py b/exspy/models/__init__.py index b95558346..0b3bf70c9 100644 --- a/exspy/models/__init__.py +++ b/exspy/models/__init__.py @@ -1,4 +1,4 @@ -"""Models """ +"""Models""" from .edsmodel import EDSModel from .edssemmodel import EDSSEMModel diff --git a/exspy/models/edsmodel.py b/exspy/models/edsmodel.py index f2c08ff28..5ac38552a 100644 --- a/exspy/models/edsmodel.py +++ b/exspy/models/edsmodel.py @@ -97,7 +97,6 @@ def _get_scale(E1, E_ref1, fact): class EDSModel(Model1D): - """Build and fit a model of an EDS Signal1D. Parameters diff --git a/exspy/models/edssemmodel.py b/exspy/models/edssemmodel.py index f05a7ec24..8566a31a2 100644 --- a/exspy/models/edssemmodel.py +++ b/exspy/models/edssemmodel.py @@ -20,7 +20,6 @@ class EDSSEMModel(EDSModel): - """Build and fit a model to EDS data acquired in the SEM. Parameters diff --git a/exspy/models/edstemmodel.py b/exspy/models/edstemmodel.py index d64b69e63..5e9082e61 100644 --- a/exspy/models/edstemmodel.py +++ b/exspy/models/edstemmodel.py @@ -20,7 +20,6 @@ class EDSTEMModel(EDSModel): - """Build and fit a model to EDS data acquired in the TEM. Parameters diff --git a/exspy/signals/__init__.py b/exspy/signals/__init__.py index 6b0d65889..197175725 100644 --- a/exspy/signals/__init__.py +++ b/exspy/signals/__init__.py @@ -16,6 +16,7 @@ For dielectric function data with ``signal_dimension`` equal one. The signal is unbinned by default. """ + from .dielectric_function import DielectricFunction, LazyDielectricFunction from .eds import EDSSpectrum, LazyEDSSpectrum from .eds_sem import EDSSEMSpectrum, LazyEDSSEMSpectrum diff --git a/exspy/signals/dielectric_function.py b/exspy/signals/dielectric_function.py index eb05c45ad..047ea90e1 100644 --- a/exspy/signals/dielectric_function.py +++ b/exspy/signals/dielectric_function.py @@ -29,7 +29,6 @@ class DielectricFunction(ComplexSignal1D): - """Signal class for dielectric functions.""" _signal_type = "DielectricFunction" @@ -172,7 +171,6 @@ def get_electron_energy_loss_spectrum(self, zlp, t): class LazyDielectricFunction(DielectricFunction, LazyComplexSignal1D): - """Lazy signal class for dielectric functions.""" __doc__ += LAZYSIGNAL_DOC.replace("__BASECLASS__", "DielectricFunction") diff --git a/exspy/signals/eds_sem.py b/exspy/signals/eds_sem.py index e345dbafc..b76c50cfe 100644 --- a/exspy/signals/eds_sem.py +++ b/exspy/signals/eds_sem.py @@ -50,7 +50,6 @@ class EDSSEMParametersUI(BaseSetMetadataItems): class EDSSEMSpectrum(EDSSpectrum): - """Signal class for EDS spectra measured in an SEM.""" _signal_type = "EDS_SEM" @@ -316,7 +315,6 @@ def create_model(self, auto_background=True, auto_add_lines=True, *args, **kwarg class LazyEDSSEMSpectrum(EDSSEMSpectrum, LazyEDSSpectrum): - """Lazy signal class for EDS spectra measured in an SEM.""" __doc__ += LAZYSIGNAL_DOC.replace("__BASECLASS__", "EDSSEMSpectrum") diff --git a/exspy/signals/eds_tem.py b/exspy/signals/eds_tem.py index fb9d3d77f..eec7572e3 100755 --- a/exspy/signals/eds_tem.py +++ b/exspy/signals/eds_tem.py @@ -69,7 +69,6 @@ class EDSTEMParametersUI(BaseSetMetadataItems): class EDSTEMSpectrum(EDSSpectrum): - """Signal class for EDS spectra measured in an TEM.""" _signal_type = "EDS_TEM" @@ -984,7 +983,6 @@ def CL_get_mass_thickness(weight_percent, thickness): class LazyEDSTEMSpectrum(EDSTEMSpectrum, LazyEDSSpectrum): - """Lazy signal class for EDS spectra measured in an TEM.""" __doc__ += LAZYSIGNAL_DOC.replace("__BASECLASS__", "EDSTEMSpectrum") diff --git a/exspy/signals/eels.py b/exspy/signals/eels.py index a849b7fa6..cb5286b6a 100644 --- a/exspy/signals/eels.py +++ b/exspy/signals/eels.py @@ -75,7 +75,6 @@ class EELSTEMParametersUI(BaseSetMetadataItems): class EELSSpectrum(Signal1D): - """Signal class for EELS spectra.""" _signal_type = "EELS" @@ -2026,7 +2025,6 @@ def vacuum_mask( class LazyEELSSpectrum(EELSSpectrum, LazySignal1D): - """Lazy signal class for EELS spectra.""" __doc__ += LAZYSIGNAL_DOC.replace("__BASECLASS__", "EELSSpectrum")