Skip to content

Commit

Permalink
add flake8 test to CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
cs01 committed Nov 21, 2018
1 parent fdb6358 commit 0e9a5d1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .flake8
@@ -1,3 +1,3 @@
[flake8]
max-line-length = 88
ignore = E501, E203 # line length, whitespace before ':'
ignore = E501, E203, W503 # line length, whitespace before ':', line break before binary operator
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,10 @@
## master
* Do not clear program state when resuming inferior so that scroll position is better maintained

## 0.13.1.0
* Remove automatic flushing of stdout and require newer version of pygdbmi
* Add flake8 tests to CI build

## 0.13.0.0
* Add ability to re-map source file paths. Added flags `--remap-sources` and `-m` to replace compile-time source paths to local source paths. i.e. `gdbgui --remap-sources='{"/buildmachine": "/home/chad"}'` (#158)
* Add shift keyboard shortcut to go in reverse when using rr (#201)
Expand Down
2 changes: 1 addition & 1 deletion gdbgui/backend.py
Expand Up @@ -477,7 +477,7 @@ def get_extra_files():
extra_dirs = [THIS_DIR]
extra_files = []
for extra_dir in extra_dirs:
for dirname, dirs, files in os.walk(extra_dir):
for dirname, _, files in os.walk(extra_dir):
for filename in files:
filepath = os.path.join(dirname, filename)
if os.path.isfile(filepath) and filepath not in extra_files:
Expand Down
2 changes: 1 addition & 1 deletion gdbgui/statemanager.py
Expand Up @@ -138,7 +138,7 @@ def get_dashboard_data(self):
return data

def disconnect_client(self, client_id):
for controller, client_ids in self.controller_to_client_ids.items():
for _, client_ids in self.controller_to_client_ids.items():
if client_id in client_ids:
client_ids.remove(client_id)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -13,7 +13,7 @@
"Flask-Compress>=1.4.0, <2.0", # to compress flask responses
"Flask-SocketIO>=2.9, <3.0", # websocket server
"gevent>=1.2.2, <2.0", # websocket handling
"pygdbmi>=0.8.4.0, <0.9", # parse gdb output
"pygdbmi>=0.9.0.0, <1.0", # parse gdb output
"Pygments>=2.2.0, <3.0", # syntax highlighting
]

Expand Down
2 changes: 1 addition & 1 deletion tests/__main__.py
@@ -1,3 +1,3 @@
from . import test_app, static_tests

exit(test_app.main() + static_tests.main()
exit(test_app.main() + static_tests.main())
4 changes: 2 additions & 2 deletions tests/static_tests.py
Expand Up @@ -2,14 +2,14 @@


def run(cmd):
print(f"Running {' '.join(cmd)!r}")
print("Running %r" % ' '.join(cmd))
return subprocess.run(cmd).returncode


def main():
files = ["gdbgui", "tests", "setup.py"]
ret = 0
ret += run(["black", "--check"] + files)
# ret += run(["black", "--check"] + files)
ret += run(["flake8"] + files)
return ret

Expand Down

0 comments on commit 0e9a5d1

Please sign in to comment.