Skip to content

Commit b4ebeee

Browse files
committed
autoformat
1 parent 5865591 commit b4ebeee

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

gdbgui/backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,8 @@ def read_file():
679679

680680
else:
681681
highlight = (
682-
True
683-
) # highlight argument was invalid for some reason, default to true
682+
True # highlight argument was invalid for some reason, default to true
683+
)
684684

685685
if path and os.path.isfile(path):
686686
try:

gdbgui/src/js/Registers.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ class Registers extends React.Component {
5050
}
5151
static cache_register_names(names) {
5252
// filter out non-empty names
53-
store.set("register_names", names.filter(name => name));
53+
store.set(
54+
"register_names",
55+
names.filter(name => name)
56+
);
5457
}
5558
static clear_register_name_cache() {
5659
store.set("register_names", []);

gdbgui/src/js/process_gdb_response.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ const process_gdb_response = function(response_array) {
160160
if ("register-names" in r.payload) {
161161
let names = r.payload["register-names"];
162162
// filter out empty names
163-
store.set("register_names", names.filter(name => name !== ""));
163+
store.set(
164+
"register_names",
165+
names.filter(name => name !== "")
166+
);
164167
}
165168
if ("register-values" in r.payload) {
166169
store.set("previous_register_values", store.get("current_register_values"));
@@ -297,9 +300,7 @@ const process_gdb_response = function(response_array) {
297300

298301
if (r.payload["signal-name"] !== "SIGINT") {
299302
Actions.add_console_entries(
300-
`gdbgui noticed a signal was received (${r.payload["signal-meaning"]}, ${
301-
r.payload["signal-name"]
302-
}).`,
303+
`gdbgui noticed a signal was received (${r.payload["signal-meaning"]}, ${r.payload["signal-name"]}).`,
303304
constants.console_entry_type.GDBGUI_OUTPUT
304305
);
305306
Actions.add_console_entries(

noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ def lint(session):
6969
def autoformat(session):
7070
session.install("black")
7171
session.run("black", *files_to_lint)
72+
session.run(
73+
"npx",
74+
"prettier",
75+
"--write",
76+
"--config",
77+
".prettierrc.js",
78+
"gdbgui/src/js/**/*",
79+
external=True,
80+
)
7281

7382

7483
@nox.session(python="3.7")

0 commit comments

Comments
 (0)