mirror of
https://github.com/tromey/gdb-gui.git
synced 2025-12-15 23:00:05 +01:00
Add pre-commit, update flake8, run black
This commit is contained in:
8
.flake8
8
.flake8
@@ -1,2 +1,8 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
ignore = E501, W503
|
# Disable some formatted-related warnings that conflict with black's way of
|
||||||
|
# formatting code.
|
||||||
|
#
|
||||||
|
# E203: Whitespace before ':'
|
||||||
|
# E501: line too long
|
||||||
|
# E701: Multiple statements on one line (colon)
|
||||||
|
ignore = E203,E501,E701
|
||||||
|
|||||||
8
.pre-commit-config.yaml
Normal file
8
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
|
rev: 24.3.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
files: 'gdb/.*'
|
||||||
@@ -228,7 +228,7 @@ class GuiDprintfCommand(GuiPrintBase):
|
|||||||
if not arg.startswith(","):
|
if not arg.startswith(","):
|
||||||
raise gdb.GdbError("comma expected after linespec")
|
raise gdb.GdbError("comma expected after linespec")
|
||||||
arg = arg[1:]
|
arg = arg[1:]
|
||||||
spec = arg[0:-len(arg)]
|
spec = arg[0 : -len(arg)]
|
||||||
gui.dprintf.DPrintfBreakpoint(spec, window, arg)
|
gui.dprintf.DPrintfBreakpoint(spec, window, arg)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user