Skip to content

Commit e1e3be5

Browse files
committed
🚨 Make pre-commit happy again
1 parent e1a49c5 commit e1e3be5

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

octoprint_pi_support/__init__.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ def _gather_new_camerastack_files():
5454
os.system("/usr/bin/list-usb-cameras > /tmp/camerastack-usb.log")
5555
files["camerastack-usb.log"] = "/tmp/camerastack-usb.log"
5656
except Exception:
57-
logging.getLogger(__name__).exception(
58-
"Failed to create camerastack-usb.log file"
59-
)
57+
logging.getLogger(__name__).exception("Failed to create camerastack-usb.log file")
6058

6159
return files
6260

@@ -86,9 +84,7 @@ def _gather_new_camerastack_files():
8684

8785
_gather_new_camerastack_files = lambda: { # noqa: F811
8886
"camerastack-journal.log": os.path.join(base, "fake_camerastack_journal.txt"),
89-
"camerastack-libcamera.log": os.path.join(
90-
base, "fake_camerastack_libcamera.txt"
91-
),
87+
"camerastack-libcamera.log": os.path.join(base, "fake_camerastack_libcamera.txt"),
9288
"camerastack-usb.log": os.path.join(base, "fake_camerastack_usb.txt"),
9389
}
9490

@@ -127,8 +123,7 @@ def from_value(cls, value=0):
127123
"throttled": _FLAG_THROTTLED & value == _FLAG_THROTTLED,
128124
"past_undervoltage": _FLAG_PAST_UNDERVOLTAGE & value
129125
== _FLAG_PAST_UNDERVOLTAGE,
130-
"past_freq_capped": _FLAG_PAST_FREQ_CAPPED & value
131-
== _FLAG_PAST_FREQ_CAPPED,
126+
"past_freq_capped": _FLAG_PAST_FREQ_CAPPED & value == _FLAG_PAST_FREQ_CAPPED,
132127
"past_throttled": _FLAG_PAST_THROTTLED & value == _FLAG_PAST_THROTTLED,
133128
"raw_value": value,
134129
}
@@ -245,9 +240,7 @@ def get_vcgencmd_throttled_state(command):
245240
output, error = sarge.get_both(command, close_fds=CLOSE_FDS)
246241

247242
if "throttled=0x" not in output:
248-
raise ValueError(
249-
f"Cannot parse {command!r} output: {error if error else output}"
250-
)
243+
raise ValueError(f"Cannot parse {command!r} output: {error if error else output}")
251244

252245
value = output[len("throttled=") :].strip(" \t\r\n\0")
253246
value = int(value, 0)

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ def delete_folder_if_empty(path, applied_handler):
182182
if not self.dry_run:
183183
shutil.rmtree(path)
184184
print(
185-
"removed %s since it was empty"
186-
% path[len(self.source_folder) :]
185+
"removed %s since it was empty" % path[len(self.source_folder) :]
187186
)
188187

189188
def delete_file(path):
@@ -759,9 +758,7 @@ def read_file_contents(path):
759758
},
760759
)
761760

762-
setup_parameters["long_description"] = read_file_contents(
763-
os.path.join(here, "README.md")
764-
)
761+
setup_parameters["long_description"] = read_file_contents(os.path.join(here, "README.md"))
765762
setup_parameters["long_description_content_type"] = "text/markdown"
766763

767764
setup(**setup_parameters)

0 commit comments

Comments
 (0)