diff --git a/corrscope/config.py b/corrscope/config.py index 2b42f3c..3744e9d 100644 --- a/corrscope/config.py +++ b/corrscope/config.py @@ -56,7 +56,6 @@ class MyYAML(YAML): def dump( self, data: Any, stream: "Union[Path, TextIO, None]" = None, **kwargs ) -> Optional[str]: - # On Windows, when dumping to path, ruamel.yaml writes files in locale encoding. # Foreign characters are undumpable. Locale-compatible characters cannot be loaded. # https://bitbucket.org/ruamel/yaml/issues/316/unicode-encoding-decoding-errors-on @@ -154,6 +153,7 @@ T = TypeVar("T") # yaml.dump(obj, stream) # return yaml.load(stream) + # AKA pickle_copy def copy_config(obj: T) -> T: with BytesIO() as stream: diff --git a/corrscope/gui/view_mainwindow.py b/corrscope/gui/view_mainwindow.py index 1019693..1c2be50 100644 --- a/corrscope/gui/view_mainwindow.py +++ b/corrscope/gui/view_mainwindow.py @@ -75,7 +75,6 @@ class MainWindow(QWidget): # Right-hand channel list with append_widget(s, QVBoxLayout) as self.audioColumn: - # Top bar (master audio, trigger) self.add_top_bar(s) @@ -96,7 +95,6 @@ class MainWindow(QWidget): def add_general_tab(self, s: LayoutStack) -> QWidget: tr = self.tr with self.add_tab_stretch(s, tr("&General"), layout=QVBoxLayout) as tab: - # Global group with append_widget(s, QGroupBox) as self.optionGlobal: set_layout(s, QFormLayout) @@ -150,7 +148,6 @@ class MainWindow(QWidget): with add_tab( s, VerticalScrollArea, tr("&Appearance") ) as tab, fill_scroll_stretch(s, layout=QVBoxLayout): - with append_widget( s, QGroupBox, title=tr("Appearance"), layout=QFormLayout ): @@ -420,7 +417,6 @@ class MainWindow(QWidget): tr = self.tr with append_widget(s, QHBoxLayout): with append_widget(s, QVBoxLayout): - with append_widget(s, QGroupBox): s.widget.setTitle(tr("FFmpeg Options")) set_layout(s, QFormLayout) diff --git a/scripts.py b/scripts.py index 17adf66..2991e9a 100644 --- a/scripts.py +++ b/scripts.py @@ -2,6 +2,7 @@ import shlex import webbrowser + # Obtain path from package.dist-info/entry_points.txt def run(path, arg_str): module, func = path.split(":") diff --git a/tests/test_cli.py b/tests/test_cli.py index 4399add..83739fe 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -37,7 +37,6 @@ def call_main(argv): def yaml_sink(_mocker, command: str): """Mocks yaml.dump() and returns call args. Also tests dumping and loading.""" with mock.patch.object(yaml, "dump") as dump: - argv = shlex.split(command) + ["-w"] call_main(argv)