Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (angr#1207)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](astral-sh/ruff-pre-commit@v0.2.2...v0.3.2)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Formatting tweaks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kevin Phoenix <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and twizmwazin authored Mar 13, 2024
1 parent 31bbc52 commit f5e52ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repos:
- id: rm-unneeded-f-str

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
5 changes: 2 additions & 3 deletions angrmanagement/daemon/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ def _get_conn(target_id):
conn = TargetIDtoCONN[target_id]
else:
raise Exception(
"The specified target {} is not open in angr management. We have the following ones: {}.".format(
target_id, str(TargetIDtoCONN)
)
f"The specified target {target_id} is not open in angr management. "
f"We have the following ones: {str(TargetIDtoCONN)}."
)
return conn

Expand Down
14 changes: 8 additions & 6 deletions angrmanagement/ui/widgets/qlog_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,10 @@ def copy_selected(self):
for row_index in selection:
record = self.model.log[row_index.row()]
content.append(
"{} | {} | {} | {}".format(
QLogTableModel.level_to_text(record.level), str(record.timestamp), record.source, record.content
)
f"{QLogTableModel.level_to_text(record.level)} | "
f"{str(record.timestamp)} | "
f"{record.source} | "
f"{record.content}"
)
self._copy_to_clipboard(os.linesep.join(content))

Expand All @@ -196,9 +197,10 @@ def copy_all(self):
content = []
for record in self.model.log:
content.append(
"{} | {} | {} | {}".format(
QLogTableModel.level_to_text(record.level), str(record.timestamp), record.source, record.content
)
f"{QLogTableModel.level_to_text(record.level)} | "
f"{str(record.timestamp)} | "
f"{record.source} | "
f"{record.content}"
)
self._copy_to_clipboard(os.linesep.join(content))

Expand Down

0 comments on commit f5e52ac

Please sign in to comment.