Skip to content

Commit

Permalink
Merge pull request #92 from lsst/tickets/DM-28480
Browse files Browse the repository at this point in the history
DM-28480: Updates for py3.8 and W503
  • Loading branch information
timj committed Jan 27, 2021
2 parents d222c45 + 28db01b commit ccdca77
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/lint.yml → .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
10 changes: 5 additions & 5 deletions python/lsst/utils/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ def testFileDescriptorLeaks(self):
now_open = _get_open_files()

# Some files are opened out of the control of the stack.
now_open = set(f for f in now_open if not f.endswith(".car") and
not f.startswith("/proc/") and
not f.endswith(".ttf") and
not (f.startswith("/var/lib/") and f.endswith("/passwd")) and
not f.endswith("astropy.log"))
now_open = set(f for f in now_open if not f.endswith(".car")
and not f.startswith("/proc/")
and not f.endswith(".ttf")
and not (f.startswith("/var/lib/") and f.endswith("/passwd"))
and not f.endswith("astropy.log"))

diff = now_open.difference(open_files)
if diff:
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/utils/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def isAttributeSafeToTransfer(name, value):
classes, leaving only those explicitly defined in a class decorated by
`continueClass` or registered with an instance of `TemplateMeta`.
"""
if name.startswith("__") and (value is getattr(object, name, None) or
name in INTRINSIC_SPECIAL_ATTRIBUTES):
if name.startswith("__") and (value is getattr(object, name, None)
or name in INTRINSIC_SPECIAL_ATTRIBUTES):
return False
return True

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# if there are later changes to the developer guide standard.
[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

[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 ccdca77

Please sign in to comment.