On Tue, Dec 19, 2017 at 11:13 AM, Raphael Hertzog wrote:
> On Mon, 18 Dec 2017, Ville Skyttä wrote:
>> -exclude =
>> .git,.ropeproject,__pycache__,distro_tracker/project/settings/local.py,*/migrations/*.py
>> +exclude =
>> .git,.ropeproject,.tox,__pycache__,distro_tracker/project/settings/local.py,distro_tracker/vendor,docs/conf.py,*/migrations/*.py
>
> Ok, for .tox and docs/conf.py. But why distro_tracker/vendor?
Without having had a closer look, I assumed that the vendor dir is for
"vendored" packages, i.e. bundled ones from other upstreams, but that
seems wrong. Updated patch attached.
> And why is it needed at all? I was not getting any warning from those
> directories (I see a few errors currently with the latest version of
> flake8, but not specially in the above directories).
I see a bunch of errors related to use of bare except there. Full list
attached, generated with:
$ flake8 --version
3.5.0 (flake8-bugbear: 17.12.0, mccabe: 0.6.1, pycodestyle: 2.3.1,
pyflakes: 1.6.0) CPython 3.6.3 on Linux
./setup.py:9:1: E302 expected 2 blank lines, found 1
./setup.py:12:22: E225 missing whitespace around operator
./setup.py:42:81: E501 line too long (81 > 80 characters)
./setup.py:47:9: E121 continuation line under-indented for hanging indent
./setup.py:52:6: E124 closing bracket does not match visual indentation
./setup.py:60:9: E121 continuation line under-indented for hanging indent
./setup.py:65:6: E124 closing bracket does not match visual indentation
./manage.py:17:81: E501 line too long (86 > 80 characters)
./distro_tracker/accounts/views.py:194:36: B306 `BaseException.message` has
been deprecated as of Python 2.6 and is removed in Python 3. Use `str(e)` to
access the user-readable message. Use `e.args` to access arguments passed to
the exception.
./distro_tracker/core/panels.py:727:13: E722 do not use bare except'
./distro_tracker/core/panels.py:727:13: B001 Do not use bare `except:`, it also
catches unexpected events like memory errors, interrupts, system exit, and so
on. Prefer `except Exception:`. If you're sure what you're doing, be explicit
and write `except BaseException:`.
./distro_tracker/core/retrieve_data.py:60:5: E722 do not use bare except'
./distro_tracker/core/retrieve_data.py:60:5: B001 Do not use bare `except:`, it
also catches unexpected events like memory errors, interrupts, system exit, and
so on. Prefer `except Exception:`. If you're sure what you're doing, be
explicit and write `except BaseException:`.
./distro_tracker/core/admin.py:73:5: E722 do not use bare except'
./distro_tracker/core/admin.py:73:5: B001 Do not use bare `except:`, it also
catches unexpected events like memory errors, interrupts, system exit, and so
on. Prefer `except Exception:`. If you're sure what you're doing, be explicit
and write `except BaseException:`.
./distro_tracker/core/models.py:2021:9: E722 do not use bare except'
./distro_tracker/core/models.py:2021:9: B001 Do not use bare `except:`, it also
catches unexpected events like memory errors, interrupts, system exit, and so
on. Prefer `except Exception:`. If you're sure what you're doing, be explicit
and write `except BaseException:`.
./distro_tracker/core/management/commands/tracker_run_task.py:56:13: E722 do
not use bare except'
./distro_tracker/core/management/commands/tracker_run_task.py:56:13: B001 Do
not use bare `except:`, it also catches unexpected events like memory errors,
interrupts, system exit, and so on. Prefer `except Exception:`. If you're
sure what you're doing, be explicit and write `except BaseException:`.
./distro_tracker/core/tests/tests_utils.py:599:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:602:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:605:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:612:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:630:25: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:632:26: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:634:25: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:635:26: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_utils.py:668:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_models.py:127:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_models.py:128:9: E741 ambiguous variable name
'l'
./distro_tracker/core/tests/tests_models.py:139:9: E741 ambiguous variable name
'l'
./distro_tracker/core/utils/__init__.py:97:24: E741 ambiguous variable name 'l'
./distro_tracker/core/utils/http.py:225:9: E722 do not use bare except'
./distro_tracker/core/utils/http.py:225:9: B001 Do not use bare `except:`, it
also catches unexpected events like memory errors, interrupts, system exit, and
so on. Prefer `except Exception:`. If you're sure what you're doing,