Project

Profile

Help

Task #3106

closed

Flake8 failing in master with release of flake8 3.5.0

Added by daviddavis over 6 years ago. Updated about 5 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 27
Quarter:

Description

Flake8 version 3.5.0 was released on October 23, 2017 and it looks like it's checking now for new style problems.

$ flake8 --version
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.5.0) CPython 2.7.10 on Darwin
$ flake8 --config flake8.cfg    
./pulp-dev.py:455:9: E722 do not use bare except'
./agent/pulp/agent/lib/container.py:69:13: E722 do not use bare except'
./bindings/pulp/bindings/server.py:356:9: E722 do not use bare except'
./bindings/test/unit/test_server.py:106:9: E722 do not use bare except'
./client_lib/test/unit/test_client_framework_core.py:33:56: E741 ambiguous variable name 'l'
./common/pulp/common/lock.py:67:9: E722 do not use bare except'
./common/pulp/common/lock.py:122:13: E722 do not use bare except'
./common/pulp/common/pic.py:95:5: E722 do not use bare except'
./repoauth/pulp/repoauth/repo_cert_utils.py:67:9: E722 do not use bare except'
./repoauth/pulp/repoauth/repo_cert_utils.py:71:9: E722 do not use bare except'
./repoauth/pulp/repoauth/repo_cert_utils.py:75:9: E722 do not use bare except'
./repoauth/pulp/repoauth/repo_cert_utils.py:491:17: E722 do not use bare except'
./server/pulp/server/auth/ldap_connection.py:116:13: E722 do not use bare except'
./server/pulp/server/content/storage.py:141:9: E722 do not use bare except'
./server/pulp/server/db/migrations/0027_importer_schema_change.py:29:13: E722 do not use bare except'
./server/pulp/server/managers/status.py:44:5: E722 do not use bare except'
./server/pulp/server/managers/auth/cert/certificate.py:276:9: E722 do not use bare except'
./server/pulp/server/managers/auth/cert/certificate.py:517:9: E722 do not use bare except'
./server/pulp/server/managers/auth/cert/certificate.py:563:9: E722 do not use bare except'
./server/pulp/server/managers/consumer/cud.py:265:13: E722 do not use bare except'
./server/pulp/server/webservices/views/consumers.py:921:9: E722 do not use bare except'
./server/test/unit/server/test_logs.py:507:13: E722 do not use bare except'
./server/test/unit/server/test_logs.py:560:13: E722 do not use bare except'
./server/test/unit/server/managers/consumer/group/test_cud.py:23:9: E722 do not use bare except'
./server/test/unit/server/managers/consumer/group/test_cud.py:29:9: E722 do not use bare except'
./server/test/unit/server/managers/content/test_orphan.py:84:9: E722 do not use bare except'
./server/test/unit/server/managers/content/test_orphan.py:90:9: E722 do not use bare except'
./server/test/unit/server/managers/repo/group/test_cud.py:23:9: E722 do not use bare except'
./server/test/unit/server/managers/repo/group/test_cud.py:29:9: E722 do not use bare except'
Actions #1

Updated by daviddavis over 6 years ago

Looks like this issue about bare exceptions not being reported was fixed in 3.5.0:

https://gitlab.com/pycqa/flake8/issues/361

Actions #2

Updated by daviddavis over 6 years ago

Some options regarding bare exceptions:

1. Turn off checking for bare exceptions in flake8.cfg
2. Add inline ignores (ie # noqa: E722) for all existing bare excepts with the hope that they will be fixed eventually
3. Replace all bare excepts with except Exception:

I am strongly against option 1. From a purely code style point of view, option 3 is the best but I am a bit nervous about doing it. Option 2 might be a good compromise

Actions #3

Updated by dalley over 6 years ago

  • Sprint/Milestone set to 46
  • Triaged changed from No to Yes
Actions #4

Updated by dalley over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #5

Updated by dalley over 6 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by dalley over 6 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by pcreech over 6 years ago

  • Tracker changed from Issue to Task
  • Status changed from MODIFIED to CLOSED - COMPLETE
  • % Done set to 0
Actions #8

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 27
Actions #9

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (46)
Actions #10

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF