kopia lustrzana https://github.com/corrscope/corrscope
black
rodzic
7acbed429f
commit
2ab31d430f
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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(":")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue