From 91b5b962f3dd05ffc138bfc01364b8170521682b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 2 Nov 2024 15:09:29 +0200 Subject: [PATCH] Remove unnecessary arguments --- scripts/gen-v4l2.py | 2 +- v4l2/helpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gen-v4l2.py b/scripts/gen-v4l2.py index c575c50..ad47938 100755 --- a/scripts/gen-v4l2.py +++ b/scripts/gen-v4l2.py @@ -42,7 +42,7 @@ def replace(filename, replaces): pat = r[0] repl = r[1] - with open(filename, 'r', encoding='utf-8') as f: + with open(filename, encoding='utf-8') as f: content = f.read() content = re.sub(pat, repl, content, count=1, flags=re.MULTILINE) diff --git a/v4l2/helpers.py b/v4l2/helpers.py index 783c6b6..400989d 100644 --- a/v4l2/helpers.py +++ b/v4l2/helpers.py @@ -6,7 +6,7 @@ __all__ = [ 'BufType', 'MemType' ] def filepath_for_major_minor(major: int, minor: int): - with open(f'/sys/dev/char/{major}:{minor}/uevent', 'r', encoding='ascii') as f: + with open(f'/sys/dev/char/{major}:{minor}/uevent', encoding='ascii') as f: for l in f.readlines(): if not l.startswith('DEVNAME='): continue