Skip to content

Commit

Permalink
Clean up some noqa usage
Browse files Browse the repository at this point in the history
Use `noqa: Nxxx` syntax to hide specific codes.
  • Loading branch information
timj committed Mar 27, 2019
1 parent fd024cc commit e7262fc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/assemblers/exposureAssembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"""Support for assembling and disassembling afw Exposures."""

# Need to enable PSFs to be instantiated
import lsst.afw.detection # noqa F401
import lsst.afw.detection # noqa: F401
from lsst.afw.image import makeExposure, makeMaskedImage

from lsst.daf.butler import CompositeAssembler
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/core/dimensions/dataId.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, other=None, *, universe=None, keys=None, factory=None, where=
self._keys = DimensionSet(universe, byName.keys())

if where is None:
where = lambda x: True # noqa E731; better than shadowing via def
where = lambda x: True # noqa: E731; better than shadowing via def

# Make a new dictionary keyed by DimensionElement in the right order,
# using factory() when no value is available.
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class Singleton(type):

_instances = {}

def __call__(cls): # noqa N805
def __call__(cls):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__()
return cls._instances[cls]
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/gen2convert/walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import datetime

# register YAML loader for repositoryCfg.yaml files.
import lsst.daf.persistence.repositoryCfg # noqa F401
import lsst.daf.persistence.repositoryCfg # noqa: F401

from astro_metadata_translator import ObservationInfo
from lsst.afw.image import readMetadata
Expand Down
2 changes: 1 addition & 1 deletion tests/test_butlerFits.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def runExposureCompositePutGetTest(self, storageClass, datasetTypeName):
"physical_filter": "d-r"})
butler.put(exposure, datasetTypeName, dataId)
# Get the full thing
full = butler.get(datasetTypeName, dataId) # noqa F841
butler.get(datasetTypeName, dataId)
# TODO enable check for equality (fix for Exposure type)
# self.assertEqual(full, exposure)
# Get a component
Expand Down

0 comments on commit e7262fc

Please sign in to comment.