diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db9d59f..4e5c718 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: args: ["--py36-plus"] - repo: https://github.com/psf/black - rev: "23.12.1" + rev: "24.1.1" hooks: - id: black @@ -58,7 +58,7 @@ repos: args: ["--all"] - repo: https://github.com/PyCQA/flake8 - rev: "6.1.0" + rev: "7.0.0" hooks: - id: flake8 additional_dependencies: [ @@ -70,7 +70,7 @@ repos: args: ["--docstring-convention", "numpy"] # or google, change me - repo: https://github.com/kynan/nbstripout - rev: "0.6.1" + rev: "0.7.1" hooks: - id: nbstripout args: ["--strip-empty-cells", diff --git a/src/legendoptics/fibers.py b/src/legendoptics/fibers.py index 745f614..ff77dce 100644 --- a/src/legendoptics/fibers.py +++ b/src/legendoptics/fibers.py @@ -3,6 +3,7 @@ .. [SaintGobainDataSheet] https://www.crystals.saint-gobain.com/sites/hps-mac3-cma-crystals/files/2021-11/Fiber-Product-Sheet.pdf """ + from __future__ import annotations import logging diff --git a/src/legendoptics/lar.py b/src/legendoptics/lar.py index d62ba4c..28800c6 100644 --- a/src/legendoptics/lar.py +++ b/src/legendoptics/lar.py @@ -22,6 +22,7 @@ from liquid argon and xenon.” In: Phys. Rev. B 27 (9 May 1983), pp. 5279–5285, https://doi.org/10.1103/PhysRevB.27.5279 """ + from __future__ import annotations import logging @@ -96,10 +97,7 @@ def lar_dielectric_constant_cern2020( f"this parametrization holds only between {λ_uv+1*u.nm} and {λ_ir-1*u.nm}" ) - x = 0.334 + ( - (0.100 * λ**2) / (λ**2 - λ_uv**2) - + (0.008 * λ**2) / (λ**2 - λ_ir**2) - ) + x = 0.334 + ((0.100 * λ**2) / (λ**2 - λ_uv**2) + (0.008 * λ**2) / (λ**2 - λ_ir**2)) # solve Clausius-Mossotti return (3 + 2 * x) / (3 - x) diff --git a/src/legendoptics/pen.py b/src/legendoptics/pen.py index 5d389b8..c9eea9a 100644 --- a/src/legendoptics/pen.py +++ b/src/legendoptics/pen.py @@ -10,6 +10,7 @@ .. [Ouchi2006] I. Ouchi et al. “Features of Fluorescence Spectra of Polyethylene 2,6-Naphthalate Films” In: Journal of Applied Polymer Science, Vol. 105, 114–121 (2007), https://doi.org/10.1002/app.26085 """ + from __future__ import annotations import logging diff --git a/src/legendoptics/tetratex.py b/src/legendoptics/tetratex.py index f0e24fd..b87ad7e 100644 --- a/src/legendoptics/tetratex.py +++ b/src/legendoptics/tetratex.py @@ -3,6 +3,7 @@ .. [Janacek2012] M. Janacek, "Reflectivity spectra for commonly used reflectors", https://www.osti.gov/servlets/purl/1184400 """ + from __future__ import annotations import logging diff --git a/tests/test_pyg4.py b/tests/test_pyg4.py index 3f3bb90..ce0622a 100644 --- a/tests/test_pyg4.py +++ b/tests/test_pyg4.py @@ -1,4 +1,5 @@ """Test the attaching of all properties to Geant4 materials.""" + import pint import pyg4ometry.geant4 as g4