Skip to content

Commit

Permalink
Merge pull request #561 from lsst/tickets/DM-28480
Browse files Browse the repository at this point in the history
DM-28480: Fix new flake8 warnings
  • Loading branch information
timj committed Jan 27, 2021
2 parents 68cce58 + 0600f6d commit a6ea59e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: lint

on:
- push
- pull_request
push:
branches:
- master
pull_request:

jobs:
lint:
Expand All @@ -13,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8

- name: Install
run: pip install -r <(curl https://raw.githubusercontent.com/lsst/linting/master/requirements.txt)
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/afw/cameraGeom/testUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def makeDetectorConfigs(self, detFile):
self.detectorIdList = []
with open(detFile) as fh:
names = fh.readline().rstrip().lstrip("#").split("|")
for l in fh:
els = l.rstrip().split("|")
for line in fh:
els = line.rstrip().split("|")
detectorProps = dict([(name, el)
for name, el in zip(names, els)])
detectors.append(detectorProps)
Expand Down Expand Up @@ -272,8 +272,8 @@ def makeAmpLists(self, ampFile, isLsstLike=False):
ampDataList = []
with open(ampFile) as fh:
names = fh.readline().rstrip().lstrip("#").split("|")
for l in fh:
els = l.rstrip().split("|")
for line in fh:
els = line.rstrip().split("|")
ampProps = dict([(name, el) for name, el in zip(names, els)])
ampDataList.append(ampProps)
ampListDict = {}
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/gdb/afw/printers.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def __init__(self, val):
self.val = val

def to_string(self):
return "Background(%dx%d) %s %s" % (
return "Background(%dx%d) %s" % (
self.val["_imgWidth"], self.val["_imgHeight"],
self.val["_bctrl"])

Expand Down
2 changes: 1 addition & 1 deletion tests/test_skyWcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def testStr(self):
skyWcs = makeSkyWcs(crpix=self.crpix, crval=self.crvalList[0], cdMatrix=cdMatrix)
self.assertIn(f"Sky Origin: {self.crvalList[0]}", str(skyWcs))
self.assertIn(f"Pixel Origin: {self.crpix}", str(skyWcs))
self.assertIn(f"Pixel Scale: ", str(skyWcs))
self.assertIn("Pixel Scale: ", str(skyWcs))


class MetadataWcsTestCase(SkyWcsBaseTestCase):
Expand Down

0 comments on commit a6ea59e

Please sign in to comment.