forked from openlp/openlp
Pep fixes
This commit is contained in:
parent
46b42c24e5
commit
1c8474b8e2
@ -36,10 +36,10 @@ class PQFileDialog(QtWidgets.QFileDialog):
|
|||||||
"""
|
"""
|
||||||
Reimplement `getExistingDirectory` so that it can be called with, and return Path objects
|
Reimplement `getExistingDirectory` so that it can be called with, and return Path objects
|
||||||
|
|
||||||
:type parent: QtWidgets.QWidget or None
|
:type parent: QtWidgets.QWidget or None
|
||||||
:type caption: str
|
:type caption: str
|
||||||
:type directory: pathlib.Path
|
:type directory: pathlib.Path
|
||||||
:type options: QtWidgets.QFileDialog.Options
|
:type options: QtWidgets.QFileDialog.Options
|
||||||
:rtype: tuple[Path, str]
|
:rtype: tuple[Path, str]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -57,12 +57,12 @@ class PQFileDialog(QtWidgets.QFileDialog):
|
|||||||
"""
|
"""
|
||||||
Reimplement `getOpenFileName` so that it can be called with, and return Path objects
|
Reimplement `getOpenFileName` so that it can be called with, and return Path objects
|
||||||
|
|
||||||
:type parent: QtWidgets.QWidget or None
|
:type parent: QtWidgets.QWidget or None
|
||||||
:type caption: str
|
:type caption: str
|
||||||
:type directory: pathlib.Path
|
:type directory: pathlib.Path
|
||||||
:type filter: str
|
:type filter: str
|
||||||
:type initialFilter: str
|
:type initialFilter: str
|
||||||
:type options: QtWidgets.QFileDialog.Options
|
:type options: QtWidgets.QFileDialog.Options
|
||||||
:rtype: tuple[Path, str]
|
:rtype: tuple[Path, str]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -79,12 +79,12 @@ class PQFileDialog(QtWidgets.QFileDialog):
|
|||||||
"""
|
"""
|
||||||
Reimplement `getOpenFileNames` so that it can be called with, and return Path objects
|
Reimplement `getOpenFileNames` so that it can be called with, and return Path objects
|
||||||
|
|
||||||
:type parent: QtWidgets.QWidget or None
|
:type parent: QtWidgets.QWidget or None
|
||||||
:type caption: str
|
:type caption: str
|
||||||
:type directory: pathlib.Path
|
:type directory: pathlib.Path
|
||||||
:type filter: str
|
:type filter: str
|
||||||
:type initialFilter: str
|
:type initialFilter: str
|
||||||
:type options: QtWidgets.QFileDialog.Options
|
:type options: QtWidgets.QFileDialog.Options
|
||||||
:rtype: tuple[list[Path], str]
|
:rtype: tuple[list[Path], str]
|
||||||
"""
|
"""
|
||||||
args, kwargs = replace_params(args, kwargs, ((2, 'directory', path_to_str),))
|
args, kwargs = replace_params(args, kwargs, ((2, 'directory', path_to_str),))
|
||||||
@ -101,12 +101,12 @@ class PQFileDialog(QtWidgets.QFileDialog):
|
|||||||
"""
|
"""
|
||||||
Reimplement `getSaveFileName` so that it can be called with, and return Path objects
|
Reimplement `getSaveFileName` so that it can be called with, and return Path objects
|
||||||
|
|
||||||
:type parent: QtWidgets.QWidget or None
|
:type parent: QtWidgets.QWidget or None
|
||||||
:type caption: str
|
:type caption: str
|
||||||
:type directory: pathlib.Path
|
:type directory: pathlib.Path
|
||||||
:type filter: str
|
:type filter: str
|
||||||
:type initialFilter: str
|
:type initialFilter: str
|
||||||
:type options: QtWidgets.QFileDialog.Options
|
:type options: QtWidgets.QFileDialog.Options
|
||||||
:rtype: tuple[Path or None, str]
|
:rtype: tuple[Path or None, str]
|
||||||
"""
|
"""
|
||||||
args, kwargs = replace_params(args, kwargs, ((2, 'directory', path_to_str),))
|
args, kwargs = replace_params(args, kwargs, ((2, 'directory', path_to_str),))
|
||||||
|
@ -85,4 +85,4 @@ class TestPath(TestCase):
|
|||||||
result = str_to_path('')
|
result = str_to_path('')
|
||||||
|
|
||||||
# THEN: `path_to_str` should return None
|
# THEN: `path_to_str` should return None
|
||||||
self.assertEqual(result, None)
|
self.assertEqual(result, None)
|
||||||
|
@ -18,8 +18,6 @@ class TestFileDialogPatches(TestCase):
|
|||||||
"""
|
"""
|
||||||
Test that the :class:`PQFileDialog` instantiates correctly
|
Test that the :class:`PQFileDialog` instantiates correctly
|
||||||
"""
|
"""
|
||||||
#app = QtWidgets.QApplication(sys.argv)
|
|
||||||
|
|
||||||
# GIVEN: The PQFileDialog class
|
# GIVEN: The PQFileDialog class
|
||||||
# WHEN: Creating an instance
|
# WHEN: Creating an instance
|
||||||
instance = PQFileDialog()
|
instance = PQFileDialog()
|
||||||
|
Loading…
Reference in New Issue
Block a user