Skip to content

Commit

Permalink
add F841 noqas
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Nov 5, 2024
1 parent 5d543d9 commit dd847cc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/stcal/alignment/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import functools
import logging
import re
from typing import TYPE_CHECKING
import warnings
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from collections.abc import Callable, Sequence
Expand Down
6 changes: 3 additions & 3 deletions tests/test_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@

from stcal.alignment import resample_utils
from stcal.alignment.util import (
_compute_fiducial_from_footprints,
_sregion_to_footprint,
_validate_wcs_list,
compute_fiducial,
_compute_fiducial_from_footprints,
compute_s_region_imaging,
compute_s_region_keyword,
compute_scale,
reproject,
_sregion_to_footprint,
wcs_bbox_from_shape,
wcs_from_footprints,
wcs_from_sregions
wcs_from_sregions,
)


Expand Down
7 changes: 4 additions & 3 deletions tests/test_infrastructure.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
"""Tests of custom testing infrastructure"""

import pytest
import numpy as np
import pytest

from stcal.testing_helpers import MemoryThreshold, MemoryThresholdExceeded


def test_memory_threshold():
with MemoryThreshold("10 KB"):
buff = np.ones(1000, dtype=np.uint8)
buff = np.ones(1000, dtype=np.uint8) # noqa: F841


def test_memory_threshold_exceeded():
with pytest.raises(MemoryThresholdExceeded):
with MemoryThreshold("500. B"):
buff = np.ones(10000, dtype=np.uint8)
buff = np.ones(10000, dtype=np.uint8) # noqa: F841
3 changes: 2 additions & 1 deletion tests/test_ramp_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1792,7 +1792,8 @@ def dbg_print(string):
"""
Print string with line number and filename.
"""
import inspect, os
import inspect
import os

Check warning on line 1796 in tests/test_ramp_fitting.py

View check run for this annotation

Codecov / codecov/patch

tests/test_ramp_fitting.py#L1795-L1796

Added lines #L1795 - L1796 were not covered by tests
cf = inspect.currentframe()
line_number = cf.f_back.f_lineno
finfo = inspect.getframeinfo(cf.f_back)
Expand Down

0 comments on commit dd847cc

Please sign in to comment.