Skip to content

Commit

Permalink
Update pre-commit hooks (#213)
Browse files Browse the repository at this point in the history
* pre-commit autoupdate

* Update pre-commit config black versions etc

* Run pre-commit run --all-files

* Ignore files that start with .#
  • Loading branch information
namurphy authored Feb 1, 2024
1 parent 9fe0b6d commit 2b6bf76
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ dmypy.json
version.py
.idea
.vscode
.\#*

#ignore mac files
.DS_store
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ repos:
- id: check-yaml

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.5.3
rev: 1.7.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.15
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort
Expand All @@ -43,7 +43,7 @@ repos:
- python

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.1.1
hooks:
- id: black

Expand All @@ -52,7 +52,7 @@ repos:
hooks:
- id: nbqa-black
additional_dependencies:
- black==23.3.0
- black==24.1.1
args:
- --nbqa-mutate
- id: nbqa-isort
Expand All @@ -62,7 +62,7 @@ repos:
- --nbqa-mutate

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
rev: v2.12.0
hooks:
- id: pretty-format-ini
args: [--autofix]
Expand Down
1 change: 0 additions & 1 deletion xrtpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Hinode_.
"""


import warnings

from xrtpy import response
Expand Down
1 change: 1 addition & 0 deletions xrtpy/image_correction/deconvolve.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Functionality for deconvolving XRT image data with the point spread function.
"""

__all__ = ["deconvolve"]

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions xrtpy/image_correction/remove_lightleak.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Functionality for removing the visible light leak from XRT composite image data.
"""

import astropy.time
import astropy.units as u
import warnings
Expand Down
7 changes: 3 additions & 4 deletions xrtpy/response/temperature_from_filter_ratio.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Functionality for diagnosing plasma temperature through the filter
ratio technique.
"""

__all__ = ["temperature_from_filter_ratio"]

import logging
Expand Down Expand Up @@ -534,15 +535,13 @@ def calculate_TE_errors(map1, map2, T_e, EM, model_ratio, tresp1, tresp2, Trange
# line broadening (as is the default in ChiantiPy).
K1_mod = np.array(
[
(s1 * effarea1 * e2dn**2 * dwvl).sum()
/ (s1 * effarea1 * e2dn * dwvl).sum()
(s1 * effarea1 * e2dn**2 * dwvl).sum() / (s1 * effarea1 * e2dn * dwvl).sum()
for s1 in spect1
]
)
K2_mod = np.array(
[
(s2 * effarea2 * e2dn**2 * dwvl).sum()
/ (s2 * effarea2 * e2dn * dwvl).sum()
(s2 * effarea2 * e2dn**2 * dwvl).sum() / (s2 * effarea2 * e2dn * dwvl).sum()
for s2 in spect2
]
)
Expand Down

0 comments on commit 2b6bf76

Please sign in to comment.