This commit is contained in:
2026-09-17 11:28:36 -07:00
parent 6f5cb795a3
commit 50dbc35595
5 changed files with 14 additions and 14 deletions
-1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# #
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
# #
+3
View File
@@ -65,9 +65,12 @@ indent-width = 4
[tool.ruff.lint] [tool.ruff.lint]
fixable = ['ALL'] fixable = ['ALL']
ignore = [ ignore = [
'FA100', #Add `from __future__ import annotations` to simplify `typing.Optional`
'UP022', # Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE` 'UP022', # Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
'SIM115', # Use a context manager for opening files 'SIM115', # Use a context manager for opening files
'UP031', #Use format specifiers instead of percent format 'UP031', #Use format specifiers instead of percent format
'C408', # Unnecessary `dict()` call (rewrite as a literal)
'C417' # Unnecessary `map()` usage (rewrite using a generator expression)
] ]
# [tool.pylint] # [tool.pylint]
+1 -1
View File
@@ -2,7 +2,7 @@
Probe WAVE Files for iXML, Broadcast-WAVE and other metadata. Probe WAVE Files for iXML, Broadcast-WAVE and other metadata.
""" """
__all__ = ["WavInfoReader", "WavInfoEOFError"] __all__ = ["WavInfoEOFError", "WavInfoReader"]
from .riff_parser import WavInfoEOFError from .riff_parser import WavInfoEOFError
from .wave_reader import WavInfoReader from .wave_reader import WavInfoReader
+10 -6
View File
@@ -31,7 +31,11 @@ class MetaBrowser(Cmd):
prompt = "(wavinfo) " prompt = "(wavinfo) "
metadata: Union[List, Dict] metadata: Union[List, Dict]
path: List[str] = [] path: List[str]
def preloop(self) -> None:
self.path = []
return super().preloop()
@property @property
def cwd(self): def cwd(self):
@@ -91,7 +95,7 @@ class MetaBrowser(Cmd):
else: else:
print(f"Index {argv[0]} does not exist") print(f"Index {argv[0]} does not exist")
elif isinstance(self.cwd, dict): elif isinstance(self.cwd, dict):
if argv[0] in self.cwd.keys(): if argv[0] in self.cwd:
self.path = self.path + [argv[0]] self.path = self.path + [argv[0]]
else: else:
print(f'Key "{argv[0]}" does not exist') print(f'Key "{argv[0]}" does not exist')
@@ -177,12 +181,14 @@ def main():
else: else:
ret_dict = { ret_dict = {
"filename": arg, "filename": arg,
"run_date": datetime.datetime.now().isoformat(), "run_date": datetime.datetime.now(
tz=datetime.timezone.utc
).isoformat(),
"application": f"wavinfo {version}", "application": f"wavinfo {version}",
"scopes": {}, "scopes": {},
} }
for scope, name, value in this_file.walk(): for scope, name, value in this_file.walk():
if scope not in ret_dict["scopes"].keys(): if scope not in ret_dict["scopes"]:
ret_dict["scopes"][scope] = {} ret_dict["scopes"][scope] = {}
ret_dict["scopes"][scope][name] = value ret_dict["scopes"][scope][name] = value
@@ -198,8 +204,6 @@ def main():
file=sys.stderr, file=sys.stderr,
) )
continue continue
except Exception as e:
raise e
if len(interactive_dict) > 0: if len(interactive_dict) > 0:
cli = MetaBrowser() cli = MetaBrowser()
-6
View File
@@ -178,22 +178,16 @@ class DolbyDigitalPlusMetadata:
Per ATSC/A52 § 5.4.2.12, this is not in use and always 0xFF. Per ATSC/A52 § 5.4.2.12, this is not in use and always 0xFF.
""" """
pass
class MixLevel(int): class MixLevel(int):
""" """
§ 4.3.6.2 § 4.3.6.2
""" """
pass
class DialnormLevel(int): class DialnormLevel(int):
""" """
§ 4.3.4.4 § 4.3.4.4
""" """
pass
class RoomType(Enum): class RoomType(Enum):
""" """
`roomtyp` 4.3.6.3 `roomtyp` 4.3.6.3