Skip to content

Commit

Permalink
Fix ruff check warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tomba committed Oct 31, 2024
1 parent e328904 commit 0852e4b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/gen-v4l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
)

sys.path.insert(0, CTYPESGEN_PATH)
from ctypesgen.__main__ import main # pylint: disable=E,C # type: ignore
from ctypesgen.__main__ import main # pylint: disable=E,C # type: ignore # noqa: E402

sys.argv = ['ctypesgen', *CTYPESGEN_OPTS, f'-I{INCLUDE_PATH}', f'-o{OUT}', *INCLUDES]

Expand Down
1 change: 0 additions & 1 deletion utils/cam-configs/rpi5.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python3

import ctypes
import v4l2

imx219_w = 640
Expand Down
2 changes: 1 addition & 1 deletion utils/cam.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def init_viddevs(ctx: Context):
vid_ent = ctx.md.find_entity(stream['entity'])
assert(vid_ent)

if not 'dev_path' in stream:
if 'dev_path' not in stream:
stream['dev_path'] = vid_ent.interface.dev_path

if ctx.verbose:
Expand Down
3 changes: 2 additions & 1 deletion utils/mc-print.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def main():

recurse = True

flatten = lambda t: [item for sublist in t for item in sublist]
def flatten(t):
return [item for sublist in t for item in sublist]

print(f'Driver: {md.driver}, Model: {md.model}, Bus info: {md.bus_info}')
print()
Expand Down

0 comments on commit 0852e4b

Please sign in to comment.