Skip to content

Commit

Permalink
Use future annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Nov 10, 2023
1 parent 3627943 commit 2534b6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/stcal/ramp_fitting/ols_cas22/_fit.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fit_ramps : function
for jumps (if use_jump is True) and bad pixels (via the dq array). This
is the primary externally callable function.
"""
from __future__ import annotations

import numpy as np
cimport numpy as cnp
Expand All @@ -42,7 +43,7 @@ from stcal.ramp_fitting.ols_cas22._jump cimport (Thresh,
n_pixel_offsets)
from stcal.ramp_fitting.ols_cas22._ramp cimport ReadPattern, from_read_pattern

from typing import NamedTuple, Optional
from typing import NamedTuple


# Initialize numpy for cython use in this module
Expand Down Expand Up @@ -87,7 +88,7 @@ class RampFitOutputs(NamedTuple):
parameters: np.ndarray
variances: np.ndarray
dq: np.ndarray
fits: Optional[list] = None
fits: list | None = None


@boundscheck(False)
Expand Down
5 changes: 4 additions & 1 deletion tests/test_jump_cas22.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import pytest
from numpy.testing import assert_allclose

from stcal.ramp_fitting.ols_cas22._jump import fill_fixed_values, _fill_pixel_values, FixedOffsets, PixelOffsets
from stcal.ramp_fitting.ols_cas22._jump import (fill_fixed_values,
_fill_pixel_values,
FixedOffsets,
PixelOffsets)
from stcal.ramp_fitting.ols_cas22._ramp import from_read_pattern, init_ramps

from stcal.ramp_fitting.ols_cas22 import fit_ramps, Parameter, Variance, JUMP_DET
Expand Down

0 comments on commit 2534b6e

Please sign in to comment.