Skip to content

Commit

Permalink
Merge pull request #65 from lsst/tickets/DM-23173-obs_sdss
Browse files Browse the repository at this point in the history
DM-23173: Change W504 to W503 and fix flake8 warnings
  • Loading branch information
r-owen committed Apr 27, 2020
2 parents ace4019 + 6a8d4cd commit 8e7b9c6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bin.src/genInputRegistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def processRun(runDir, conn, done):
second = int(seconds)
taiObs = dafBase.DateTime(int(year), int(month), int(day), int(hour),
int(minute), second, dafBase.DateTime.TAI)
taiObs = dafBase.DateTime(taiObs.nsecs() +
int((seconds - second) * 1000000000), dafBase.DateTime.TAI)
taiObs = dafBase.DateTime(taiObs.nsecs()
+ int((seconds - second) * 1000000000), dafBase.DateTime.TAI)
taiObs = taiObs.toString(dafBase.DateTime.UTC)[:-1]
strip = "%d%s" % (md.getScalar('STRIPE'), md.getScalar('STRIP'))
conn.execute("""INSERT INTO raw VALUES
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/obs/sdss/sdssMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def _computeCcdExposureId(self, dataId):
@param dataId (dict) Data identifier with run, rerun, filter, camcol, field
"""
return ((int(dataId['run']) * 10 +
self.filterIdMap[dataId['filter']]) * 10 +
dataId['camcol']) * 10000 + dataId['field']
return ((int(dataId['run']) * 10
+ self.filterIdMap[dataId['filter']]) * 10
+ dataId['camcol']) * 10000 + dataId['field']

def _computeCoaddExposureId(self, dataId, singleFilter):
"""Compute the 64-bit (long) identifier for a coadd.
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/obs/sdss/yanny.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,9 @@ def isarray(self, structure, variable):
except KeyError:
typ = self.type(structure, variable)
character_array = re.compile(r'char[[<]\d*[]>][[<]\d*[]>]')
if ((character_array.search(typ) is not None) or
(typ.find('char') < 0 and (typ.find('[') >= 0 or
typ.find('<') >= 0))):
if ((character_array.search(typ) is not None)
or (typ.find('char') < 0 and (typ.find('[') >= 0
or typ.find('<') >= 0))):
cache[variable] = True
else:
cache[variable] = False
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[flake8]
max-line-length = 110
ignore = E133, E226, E228, N802, N803, N806, N812, N815, N816, W504
ignore = E133, E226, E228, N802, N803, N806, N812, N815, N816, W503
exclude =
__init__.py,
bin/*,
config/*,
description/camera/camera.py

[tool:pytest]
addopts = --flake8
flake8-ignore = E133 E226 E228 N802 N803 N806 N812 N815 N816 W504
flake8-ignore = E133 E226 E228 N802 N803 N806 N812 N815 N816 W503

0 comments on commit 8e7b9c6

Please sign in to comment.