pep fixes

This commit is contained in:
Philip Ridout 2017-09-24 20:33:07 +01:00
parent d52fff75a4
commit 047a1b3808
3 changed files with 10 additions and 9 deletions

View File

@ -214,10 +214,11 @@ class PathType(types.TypeDecorator):
""" """
Some times it make sense to compare a PathType with a string. In the case a string is used coerce the the Some times it make sense to compare a PathType with a string. In the case a string is used coerce the the
PathType to a UnicodeText type. PathType to a UnicodeText type.
:param op: The operation being carried out. Not used, as we only care about the type that is being used with the :param op: The operation being carried out. Not used, as we only care about the type that is being used with the
operation. operation.
:param openlp.core.common.path.Path | str value: The value being used for the comparison. Most likely a Path Object or str. :param openlp.core.common.path.Path | str value: The value being used for the comparison. Most likely a Path
Object or str.
:return: The coerced value stored in the db :return: The coerced value stored in the db
:rtype: PathType or UnicodeText :rtype: PathType or UnicodeText
""" """
@ -343,8 +344,8 @@ class Manager(object):
:param plugin_name: The name to setup paths and settings section names :param plugin_name: The name to setup paths and settings section names
:param init_schema: The init_schema function for this database :param init_schema: The init_schema function for this database
:param openlp.core.common.path.Path db_file_path: The file name to use for this database. Defaults to None resulting in the plugin_name :param openlp.core.common.path.Path db_file_path: The file name to use for this database. Defaults to None
being used. resulting in the plugin_name being used.
:param upgrade_mod: The upgrade_schema function for this database :param upgrade_mod: The upgrade_schema function for this database
""" """
self.is_dirty = False self.is_dirty = False

View File

@ -494,7 +494,7 @@ class AdvancedTab(SettingsTab):
def on_data_directory_path_edit_path_changed(self, new_path): def on_data_directory_path_edit_path_changed(self, new_path):
""" """
Handle the `editPathChanged` signal of the data_directory_path_edit Handle the `editPathChanged` signal of the data_directory_path_edit
:param openlp.core.common.path.Path new_path: The new path :param openlp.core.common.path.Path new_path: The new path
:rtype: None :rtype: None
""" """
@ -528,7 +528,7 @@ class AdvancedTab(SettingsTab):
def check_data_overwrite(self, data_path): def check_data_overwrite(self, data_path):
""" """
Check if there's already data in the target directory. Check if there's already data in the target directory.
:param openlp.core.common.path.Path data_path: The target directory to check :param openlp.core.common.path.Path data_path: The target directory to check
""" """
if (data_path / 'songs').exists(): if (data_path / 'songs').exists():

View File

@ -62,7 +62,7 @@ class TestImageDBUpgrade(TestCase, TestMixin):
def test_image_filenames_table(self): def test_image_filenames_table(self):
""" """
Test that the ImageFilenames table is correctly upgraded to the latest version Test that the ImageFilenames table is correctly upgraded to the latest version
""" """
# GIVEN: An unversioned image database # GIVEN: An unversioned image database
temp_db_name = os.path.join(self.tmp_folder, 'image-v0.sqlite') temp_db_name = os.path.join(self.tmp_folder, 'image-v0.sqlite')