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

Add flake8 to build #57

Closed
heartsucker opened this issue Oct 24, 2018 · 5 comments · Fixed by #145
Closed

Add flake8 to build #57

heartsucker opened this issue Oct 24, 2018 · 5 comments · Fixed by #145

Comments

@heartsucker
Copy link
Contributor

There's a lot of issues already.

$ flake8 securedrop_client/
securedrop_client/logic.py:174:21: F821 undefined name '_'
securedrop_client/logic.py:183:17: F821 undefined name '_'
securedrop_client/app.py:20:1: F401 'pathlib' imported but unused
securedrop_client/gui/widgets.py:22:1: F401 'PyQt5.QtGui.QPainter' imported but unused
securedrop_client/gui/widgets.py:23:1: F401 'PyQt5.QtWidgets.QPlainTextEdit' imported but unused
securedrop_client/gui/widgets.py:23:1: F401 'PyQt5.QtWidgets.QToolBar' imported but unused
securedrop_client/gui/widgets.py:23:1: F401 'PyQt5.QtWidgets.QSpacerItem' imported but unused
securedrop_client/gui/widgets.py:23:1: F401 'PyQt5.QtWidgets.QSizePolicy' imported but unused
securedrop_client/gui/widgets.py:23:1: F401 'PyQt5.QtWidgets.QAction' imported but unused
securedrop_client/gui/widgets.py:23:1: F401 'PyQt5.QtWidgets.QTextEdit' imported but unused
securedrop_client/gui/widgets.py:45:34: F821 undefined name '_'
securedrop_client/gui/widgets.py:46:34: F821 undefined name '_'
securedrop_client/gui/widgets.py:48:35: F821 undefined name '_'
securedrop_client/gui/widgets.py:72:33: F821 undefined name '_'
securedrop_client/gui/widgets.py:80:33: F821 undefined name '_'
securedrop_client/gui/widgets.py:110:30: F821 undefined name '_'
securedrop_client/gui/widgets.py:115:31: F821 undefined name '_'
securedrop_client/gui/widgets.py:218:29: F821 undefined name '_'
securedrop_client/gui/widgets.py:227:29: F821 undefined name '_'
securedrop_client/gui/widgets.py:229:36: F821 undefined name '_'
securedrop_client/gui/widgets.py:235:38: F821 undefined name '_'
securedrop_client/gui/widgets.py:237:38: F821 undefined name '_'
securedrop_client/gui/widgets.py:240:33: F821 undefined name '_'
securedrop_client/gui/widgets.py:246:32: F821 undefined name '_'
securedrop_client/gui/widgets.py:249:35: F821 undefined name '_'
securedrop_client/gui/widgets.py:303:28: F821 undefined name '_'
securedrop_client/gui/widgets.py:309:24: F821 undefined name '_'
securedrop_client/gui/widgets.py:419:1: E303 too many blank lines (3)
securedrop_client/gui/main.py:22:1: F401 'PyQt5.QtCore.Qt' imported but unused
securedrop_client/gui/main.py:51:29: F821 undefined name '_'
securedrop_client/gui/main.py:120:43: F821 undefined name '_'
@heartsucker
Copy link
Contributor Author

Huh. So this is in the Makefile.

PYFLAKES_BUILTINS=_

Which I think would account for some of the above errors, but also that is not clear at all to me. Also, I'm assuming _ is related to gettext, but idk how that is getting imported into the project at all. Some PyQt5 blackmagic?

@ntoll
Copy link
Contributor

ntoll commented Oct 24, 2018

Gettext is part of Python.

Just make check to run all the tests/checks.

@redshiftzero
Copy link
Contributor

tbh these flake8 issues are pretty minor, so let's focus on the tickets in the alpha milestone on the sprint and we can discuss adding some of these other minor refactoring / dev agility tickets in the next sprint planning

@ntoll
Copy link
Contributor

ntoll commented Nov 5, 2018

Given this sort of checking is all covered/configured via make check and pyflakes I'm going to close this.

@ntoll ntoll closed this as completed Nov 5, 2018
@heartsucker heartsucker reopened this Nov 5, 2018
@ntoll
Copy link
Contributor

ntoll commented Nov 5, 2018

Ack.

legoktm pushed a commit that referenced this issue Dec 11, 2023
legoktm pushed a commit that referenced this issue Dec 11, 2023
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

It first runs isort to check if it passes, and then
it runs black. Both uses 100 as line length.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
legoktm pushed a commit that referenced this issue Dec 11, 2023
…_dev

Fixes #57 runs black & isor for code formatting check
legoktm pushed a commit that referenced this issue Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants