From 4206cd44730e27606e69d55ef40c12ccd9681040 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 20:49:47 -0800 Subject: [PATCH] flake8 cleanup IP --- wavinfo/wave_ixml_reader.py | 3 ++- wavinfo/wave_reader.py | 13 +++++++------ wavinfo/wavfind.py | 6 ++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/wavinfo/wave_ixml_reader.py b/wavinfo/wave_ixml_reader.py index d3da228..5f3b4df 100644 --- a/wavinfo/wave_ixml_reader.py +++ b/wavinfo/wave_ixml_reader.py @@ -233,7 +233,8 @@ class WavIXMLFormat: def family_uid(self) -> Optional[str]: """ The globally-unique ID for this file family. This may be in the format - of a GUID, or an EBU Rec 9 source identifier, or some other dumb number. + of a GUID, or an EBU Rec 9 source identifier, or some other dumb + number. """ return self._get_text_value("FILE_SET/FAMILY_UID") diff --git a/wavinfo/wave_reader.py b/wavinfo/wave_reader.py index a4d11b2..6aeb5d8 100644 --- a/wavinfo/wave_reader.py +++ b/wavinfo/wave_reader.py @@ -40,15 +40,15 @@ class WavInfoReader: """ Create a new reader object. - :param path: - A pathlike object or IO to the wav file you wish to probe or a + :param path: + A pathlike object or IO to the wav file you wish to probe or a file handle to an open file. - :param info_encoding: + :param info_encoding: The text encoding of the ``INFO``, ``LABL`` and other RIFF-defined - metadata fields. + metadata fields. - :param bext_encoding: + :param bext_encoding: The text encoding to use when decoding the string fields of the Broadcast-WAV extension. Per EBU 3285 this is ASCII but this parameter is available to you if you encounter a weirdo. @@ -116,7 +116,8 @@ class WavInfoReader: def _find_chunk_data(self, ident, from_stream, default_none=False) -> Optional[bytes]: top_chunks = (chunk for chunk in self.main_list - if type(chunk) is ChunkDescriptor and chunk.ident == ident) + if type(chunk) is ChunkDescriptor and + chunk.ident == ident) chunk_descriptor = next(top_chunks, None) \ if default_none else next(top_chunks) diff --git a/wavinfo/wavfind.py b/wavinfo/wavfind.py index 43e5878..0b2aedf 100644 --- a/wavinfo/wavfind.py +++ b/wavinfo/wavfind.py @@ -9,10 +9,12 @@ import sys def main(): parser = OptionParser() - parser.usage = "wavfind [--scene=SCENE] [--take=TAKE] [--desc=DESC] +" + parser.usage = ("wavfind [--scene=SCENE] [--take=TAKE] [--desc=DESC] " + " +") primaries = OptionGroup(parser, title="Search Predicates", - description="Argument values can be globs, and are logically-AND'ed.") + description="Argument values can be globs, " + "and are logically-AND'ed.") primaries.add_option("--scene", help='Search for this scene',