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-28480: Updates for py3.8 and W503 #92

Merged
merged 4 commits into from
Jan 27, 2021
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
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