Skip to content

Commit b345d09

Browse files
JP-3859: Apply code style to clean_flicker_noise and nsclean (#9114)
2 parents d3b4ba3 + d157184 commit b345d09

File tree

8 files changed

+556
-442
lines changed

8 files changed

+556
-442
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ repos:
4545
jwst/badpix_selfcal/.* |
4646
jwst/barshadow/.* |
4747
jwst/charge_migration/.* |
48-
jwst/clean_flicker_noise/.* |
4948
jwst/combine_1d/.* |
5049
jwst/coron/.* |
5150
jwst/cube_build/.* |
@@ -74,7 +73,6 @@ repos:
7473
jwst/model_blender/.* |
7574
jwst/mrs_imatch/.* |
7675
jwst/msaflagopen/.* |
77-
jwst/nsclean/.* |
7876
jwst/outlier_detection/.* |
7977
jwst/pathloss/.* |
8078
jwst/persistence/.* |

.ruff.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ exclude = [
3030
"jwst/badpix_selfcal/**.py",
3131
"jwst/barshadow/**.py",
3232
"jwst/charge_migration/**.py",
33-
"jwst/clean_flicker_noise/**.py",
33+
# "jwst/clean_flicker_noise/**.py",
3434
"jwst/combine_1d/**.py",
3535
"jwst/coron/**.py",
3636
"jwst/cube_build/**.py",
@@ -59,7 +59,7 @@ exclude = [
5959
"jwst/model_blender/**.py",
6060
"jwst/mrs_imatch/**.py",
6161
"jwst/msaflagopen/**.py",
62-
"jwst/nsclean/**.py",
62+
#"jwst/nsclean/**.py",
6363
"jwst/outlier_detection/**.py",
6464
"jwst/pathloss/**.py",
6565
"jwst/persistence/**.py",
@@ -123,6 +123,7 @@ ignore = [
123123
"UP008", # use super() instead of super(class, self). no harm being explicit
124124
"UP015", # unnecessary open(file, "r"). no harm being explicit
125125
"TRY003", # prevents custom exception messages not defined in exception itself.
126+
"TRY400", # enforces log.exception instead of log.error in except clause.
126127
"ISC001", # single line implicit string concatenation. formatter recommends ignoring this.
127128
]
128129

@@ -157,7 +158,7 @@ ignore-fully-untyped = true # Turn of annotation checking for fully untyped cod
157158
"jwst/badpix_selfcal/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
158159
"jwst/barshadow/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
159160
"jwst/charge_migration/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
160-
"jwst/clean_flicker_noise/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
161+
# "jwst/clean_flicker_noise/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
161162
"jwst/combine_1d/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
162163
"jwst/coron/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
163164
"jwst/cube_build/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
@@ -186,7 +187,7 @@ ignore-fully-untyped = true # Turn of annotation checking for fully untyped cod
186187
"jwst/model_blender/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
187188
"jwst/mrs_imatch/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
188189
"jwst/msaflagopen/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
189-
"jwst/nsclean/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
190+
#"jwst/nsclean/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
190191
"jwst/outlier_detection/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
191192
"jwst/pathloss/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
192193
"jwst/persistence/**.py" = ["D", "N", "A", "ARG", "B", "C4", "ICN", "INP", "ISC", "LOG", "NPY", "PGH", "PTH", "S", "SLF", "SLOT", "T20", "TRY", "UP", "YTT", "E501"]
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Correct ramp or rate data for flicker noise."""
2+
13
from .clean_flicker_noise_step import CleanFlickerNoiseStep
24

3-
__all__ = ['CleanFlickerNoiseStep']
5+
__all__ = ["CleanFlickerNoiseStep"]

0 commit comments

Comments
 (0)