Skip to content

Commit

Permalink
chore(pre-commit.ci): pre-commit autoupdate (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Joostlek <joostlek@outlook.com>
  • Loading branch information
pre-commit-ci[bot] and joostlek authored Dec 21, 2024
1 parent 59b4307 commit 7e75119
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ci:

repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.30.0
rev: v4.1.0
hooks:
- id: commitizen
stages: [commit-msg]
Expand All @@ -36,7 +36,7 @@ repos:
- id: prettier
args: ["--tab-width", "2"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.8.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 1 addition & 3 deletions src/uvcclient/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ def main() -> int:
status = "online"
else:
status = "unknown:{}".format(cam["state"])
print(
"%s: %-24.24s [%10s] %s" % (cam["uuid"], cam["name"], status, recmode)
)
print(f"{cam['uuid']}: {cam['name']:<24.24} [{status:>10}] {recmode}")
elif opts.recordmode:
if not opts.uuid:
print("Name or UUID is required")
Expand Down
2 changes: 1 addition & 1 deletion src/uvcclient/nvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def get_snapshot(self, uuid: str) -> bytes:
print(url)
resp = self._safe_request("GET", url)
if resp.status != 200:
raise NvrError("Snapshot returned %i" % resp.status)
raise NvrError(f"Snapshot returned {resp.status}")
return resp.read()


Expand Down

0 comments on commit 7e75119

Please sign in to comment.