Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-17226: Ignore N812, N815, N816 warnings #75

Merged
merged 2 commits into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions bin.src/generateCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@


def findYamlOnPath(fileName, searchPath):
"""Find and return a file somewhere in the directories listed in searchPath"""
"""Find and return a file somewhere in the directories listed in
searchPath"""
for d in searchPath:
f = os.path.join(d, fileName)
if os.path.exists(f):
Expand All @@ -40,10 +41,12 @@ def findYamlOnPath(fileName, searchPath):
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="""
Generate a camera.yaml file for a camera by assembling descriptions of rafts, sensors, etc.
Generate a camera.yaml file for a camera by assembling descriptions of
rafts, sensors, etc.

Because we have many similar cameras, the assembly uses a :-separated search path of directories
to find desired information. The _first_ occurrence of a filename is used.
Because we have many similar cameras, the assembly uses a :-separated
search path of directories to find desired information. The _first_
occurrence of a filename is used.
""")

parser.add_argument('outputFile', type=str, help="Name of generated file")
Expand Down
13 changes: 7 additions & 6 deletions python/lsst/obs/lsst/lsstCamMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def assemble_raw(dataId, componentInfo, cls):
w, h = ampExp.getBBox().getDimensions()
ow, oh = amp.getRawBBox().getDimensions() # "old" (cameraGeom) dimensions
#
# We could trust the BIASSEC keyword, or we can just assume that they've changed
# the number of overscan pixels (serial and/or parallel). As Jim Chiang points out,
# the latter is safer
# We could trust the BIASSEC keyword, or we can just assume that
# they've changed the number of overscan pixels (serial and/or
# parallel). As Jim Chiang points out, the latter is safer
#
bbox = amp.getRawHorizontalOverscanBBox()
hOverscanBBox = geom.BoxI(bbox.getBegin(),
Expand Down Expand Up @@ -210,10 +210,11 @@ class LsstCamMapper(CameraMapper):
_cameraName = "lsst"
yamlFileList = ("lsstCamMapper.yaml",) # list of yaml files to load, keeping the first occurrence
#
# do not set MakeRawVisitInfoClass or translatorClass to anything other than None!
# do not set MakeRawVisitInfoClass or translatorClass to anything other
# than None!
#
# assemble_raw relies on autodetect as in butler Gen2 it doesn't know its mapper and cannot
# use mapper.makeRawVisitInfo()
# assemble_raw relies on autodetect as in butler Gen2 it doesn't know
# its mapper and cannot use mapper.makeRawVisitInfo()
#
MakeRawVisitInfoClass = None
translatorClass = None
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/obs/lsst/translators/auxTel.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class LsstAuxTelTranslator(StubTranslator):
"""Supports the LATISS instrument."""

_const_map = {
# AuxTel is not yet attached to a telescope so many translations are null.
# AuxTel is not yet attached to a telescope so many translations
# are null.
"instrument": "LATISS",
"telescope": "LSSTAuxTel",
"detector_group": _DETECTOR_GROUP_NAME,
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/obs/lsst/translators/ts8.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ def to_detector_serial(self):
serial = self._header["LSST_NUM"]
self._used_these_cards("LSST_NUM")

# this seems to be appended more or less at random and should be removed.
# this seems to be appended more or less at random and should be
# removed.
serial = re.sub("-Dev$", "", serial)
return serial

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[flake8]
max-line-length = 110
ignore = E133, E226, E228, E251, N802, N803, N806, W504
ignore = E133, E226, E228, E251, N802, N803, N806, N812, N815, N816, W504
exclude = __init__.py, config/*.py, bin/*

[tool:pytest]
addopts = --flake8
flake8-ignore = E133 E226 E228 E251 N802 N803 N806 W504
flake8-ignore = E133 E226 E228 E251 N802 N803 N806 N812 N815 N816 W504
config/*.py ALL
bin/* ALL
4 changes: 2 additions & 2 deletions tests/test_pho2rafts.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def testPhosimToRafts(self):
with open(os.path.join(EXPYAMLDIR, 'R11.yaml')) as fh:
exp_doc = yaml.load(fh)
# The test data only have the S20 chip
# Note: as of python 3 the iterator on dicts is not a list, so we need to manually
# create one since we are deleting entries from the dict.
# Note: as of python 3 the iterator on dicts is not a list, so we need
# to manually create one since we are deleting entries from the dict.
for key in list(exp_doc['R11']['amplifiers']):
if key != 'S20':
del exp_doc['R11']['amplifiers'][key]
Expand Down