diff --git a/.pep8 b/.pep8 index a1b31169..34f85bfa 100644 --- a/.pep8 +++ b/.pep8 @@ -1,5 +1,5 @@ [pep8] exclude = env/ max-line-length = 120 -# ignore "Identation is not multiple of 4" for continuation line +# ignore "Indentation is not multiple of 4" for continuation line ignore = "E111" diff --git a/setup.py b/setup.py index 920b4965..072a2f5d 100755 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ def run(self): class build_trans(cmd.Command): - description = 'Compile .po files into .mo files' + description = "Compile .po files into .mo files" user_options = [] def initialize_options(self): diff --git a/tests/jenkins/tests.xml b/tests/jenkins/tests.xml index a1b81b42..289772b3 100644 --- a/tests/jenkins/tests.xml +++ b/tests/jenkins/tests.xml @@ -73,7 +73,7 @@ fi # We need a pseudo tty (even if we have no input) for medium tests to pass. That's why we "ssh -t -t" # sudo su is used because tests: # 1. are better run as non root (hence su whoami) -# 2. need to be able to gain sudo priviledge when installing packages +# 2. need to be able to gain sudo privilege when installing packages ssh -o StrictHostKeyChecking=no -t -t 127.0.0.1 "sudo su $(whoami) -c 'cd ~/ubuntu-make && $TEST_ENV dbus-launch eatmydata ./runtests --coverage --publish ${ADDITIONAL_OPTS} $type'" || true # copy artefacts diff --git a/tests/large/test_baseinstaller.py b/tests/large/test_baseinstaller.py index af5cd9de..0f38f536 100644 --- a/tests/large/test_baseinstaller.py +++ b/tests/large/test_baseinstaller.py @@ -223,7 +223,7 @@ def test_reinstall_previous_install_removed(self): reinstall question""" for loop in ("install", "reinstall"): if loop == "reinstall": - # remove code (but not laucher) + # remove code (but not launcher) self.remove_path(self.installed_path) self.child = spawn_process(self.command('{} base base-framework'.format(UMAKE))) @@ -486,7 +486,7 @@ def test_install_with_wrong_md5sum(self): self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename)) def test_install_with_no_license_in_download_page(self): - """Installing should fail if not even license i dowload page""" + """Installing should fail if license is not in download page""" umake_command = self.command("{} base base-framework".format(UMAKE)) self.bad_download_page_test(umake_command, self.download_page_file_path) self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename)) diff --git a/tests/medium/test_electronics.py b/tests/medium/test_electronics.py index b53eec2c..0c314886 100644 --- a/tests/medium/test_electronics.py +++ b/tests/medium/test_electronics.py @@ -50,7 +50,7 @@ def test_install_with_changed_download_page(self): self.assertFalse(self.is_in_path(self.exec_link)) def test_install_with_changed_checksum_page(self): - """Installing arduino ide should fail if checksum link is unparseable""" + """Installing arduino ide should fail if checksum link is unparsable""" download_page_file_path = os.path.join(get_data_dir(), "server-content", "downloads.arduino.cc", "arduino-mock.sha512sum.txt") umake_command = self.command('{} electronics arduino'.format(UMAKE)) diff --git a/tests/medium/test_ide.py b/tests/medium/test_ide.py index e3279c9b..d3e8b1c2 100644 --- a/tests/medium/test_ide.py +++ b/tests/medium/test_ide.py @@ -59,7 +59,7 @@ def test_install_with_changed_download_page(self): self.assertFalse(self.is_in_path(self.exec_link)) def test_install_with_changed_checksum_page(self): - """Installing eclipse ide should fail if checksum link is unparseable""" + """Installing eclipse ide should fail if checksum link is unparsable""" self.bad_download_page_test(self.command(self.command_args), self.bad_download_page_file_path) self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename)) self.assertFalse(self.is_in_path(self.exec_link)) @@ -511,7 +511,7 @@ def test_install_with_changed_download_page(self): self.assertFalse(self.is_in_path(self.exec_link)) def test_install_with_changed_checksum_page(self): - """Installing STS should fail if checksum link is unparseable""" + """Installing STS should fail if checksum link is unparsable""" download_page_file_path = os.path.join(get_data_dir(), 'server-content', 'download.springsource.com', 'release', 'STS', 'mock.RELEASE', 'dist', 'emock', 'spring-tool-suite-mock.RELEASE-emock-linux-gtk-x86_64.tar.gz.sha1') diff --git a/tests/small/test_frameworks_loader.py b/tests/small/test_frameworks_loader.py index e4842aa7..9e8b6914 100644 --- a/tests/small/test_frameworks_loader.py +++ b/tests/small/test_frameworks_loader.py @@ -223,7 +223,7 @@ def test_default_install_path(self): os.path.expanduser("~/{}/category-a/framework-b".format(INSTALL_DIR))) def test_specified_at_load_install_path(self): - """Default install path is overriden by framework specified install path at load time""" + """Default install path is overridden by framework specified install path at load time""" self.assertEqual(self.categoryA.frameworks["framework-a"].install_path, os.path.expanduser("~/{}/custom/frameworka".format(INSTALL_DIR))) diff --git a/tests/small/test_requirements_handler.py b/tests/small/test_requirements_handler.py index 911b5f3a..85882c82 100644 --- a/tests/small/test_requirements_handler.py +++ b/tests/small/test_requirements_handler.py @@ -310,7 +310,7 @@ def test_is_bucket_uptodate_bucket_uptodate(self): self.assertTrue(self.handler.is_bucket_uptodate(['testpackage', 'testpackage1'])) def test_is_bucket_uptodate_bucket_not_installed(self): - """Not installed bucket is not uptodate""" + """Not installed bucket is not up-to-date""" self.assertFalse(self.handler.is_bucket_uptodate(['testpackage', 'testpackage1'])) def test_is_bucket_uptodate_bucket_half_installed(self): @@ -320,21 +320,21 @@ def test_is_bucket_uptodate_bucket_half_installed(self): self.assertFalse(self.handler.is_bucket_uptodate(['testpackage', 'testpackage1'])) def test_is_bucket_uptodate_multi_arch_current_arch(self): - """Installed bucket should return as being uptodate even if contains multi-arch part with current package""" + """Installed bucket should return as being up-to-date even if contains multi-arch part with current package""" self.handler.install_bucket(["testpackage"], lambda x: "", self.done_callback) self.wait_for_callback(self.done_callback) self.assertTrue(self.handler.is_bucket_uptodate(["testpackage:{}".format(tools.get_current_arch())])) def test_is_bucket_uptodate_with_unavailable_package(self): - """Bucket isn't uptodate if some package are even not in the cache""" + """Bucket isn't up-to-date if some package are even not in the cache""" self.assertFalse(self.handler.is_bucket_uptodate(["testpackagedoesntexist"])) def test_is_bucket_uptodate_with_unavailable_multiarch_package(self): - """Bucket isn't uptodate if some multiarch package are even not in the cache""" + """Bucket isn't up-to-date if some multiarch package are even not in the cache""" self.assertFalse(self.handler.is_bucket_uptodate(["testpackagedoesntexist:foo"])) def test_is_bucket_uptodate_with_foreign_archs(self): - """After adding a foreign arch, test that the package is uptodate and report so""" + """After adding a foreign arch, test that the package is up-to-date and report so""" subprocess.call([self.dpkg, "--add-architecture", "foo"]) self.handler.cache.open() # reopen the cache with the new added architecture self.handler.install_bucket(["testpackagefoo:foo"], lambda x: "", self.done_callback) @@ -343,7 +343,7 @@ def test_is_bucket_uptodate_with_foreign_archs(self): self.assertTrue(self.handler.is_bucket_uptodate(['testpackagefoo:foo'])) def test_is_bucket_uptodate_with_foreign_archs_package_not_installed(self): - """After adding a foreign arch, test that the package is not uptodate and report so""" + """After adding a foreign arch, test that the package is not up-to-date and report so""" subprocess.call([self.dpkg, "--add-architecture", "foo"]) self.handler.cache.open() # reopen the cache with the new added architecture diff --git a/tests/small/test_tools.py b/tests/small/test_tools.py index b95d6b88..e5dee825 100644 --- a/tests/small/test_tools.py +++ b/tests/small/test_tools.py @@ -762,7 +762,7 @@ def test_switch_user_from_sudo(self, osmock): @patch("umake.tools.os") def test_switch_user_from_non_sudo(self, osmock): - """Test switch user from a non sudo command (non root), dosen't call anything""" + """Test switch user from a non sudo command (non root), doesn't call anything""" osmock.getenv.return_value = 1234 osmock.geteuid.return_value = 1234 tools.switch_to_current_user() diff --git a/umake/frameworks/swift.py b/umake/frameworks/swift.py index d7a3b826..32e0a8a6 100644 --- a/umake/frameworks/swift.py +++ b/umake/frameworks/swift.py @@ -116,7 +116,7 @@ def check_gpg_and_start_download(self, download_result): # When we install new packages, we are executing as root and then dropping # as the user for extracting and such. However, for signature verification, - # we use gpg. This one doesn't like priviledge drop (if uid = 0 and + # we use gpg. This one doesn't like privilege drop (if uid = 0 and # euid = 1000) and asserts if uid != euid. # Importing the key as root as well creates new gnupg files owned as root if # new keys weren't imported first. diff --git a/umake/interactions/__init__.py b/umake/interactions/__init__.py index 575dd9a7..08834de5 100644 --- a/umake/interactions/__init__.py +++ b/umake/interactions/__init__.py @@ -144,7 +144,7 @@ def run_callback(self, result): class YesNo(TextWithChoices): def __init__(self, content, callback_yes, callback_no, default_is_yes=False): - """Return a basic Yes No question, default being false or overriden""" + """Return a basic Yes No question, default being false or overridden""" super().__init__(content, [Choice(0, _("Yes"), callback_yes, txt_shorcut=_('y'), is_default=default_is_yes), Choice(1, _("No"), callback_no, txt_shorcut=_("N"), is_default=(not default_is_yes))]) diff --git a/umake/network/requirements_handler.py b/umake/network/requirements_handler.py index 1f7cfce3..b8dfac73 100644 --- a/umake/network/requirements_handler.py +++ b/umake/network/requirements_handler.py @@ -103,7 +103,7 @@ def is_bucket_uptodate(self, bucket): """Check if the bucket is installed and up to date The bucket is a list of packages to check if installed.""" - logger.debug("Check if {} is uptodate".format(bucket)) + logger.debug("Check if {} is up to date".format(bucket)) is_installed_and_uptodate = True for pkg_name in bucket: if ' | ' in pkg_name: diff --git a/umake/tools.py b/umake/tools.py index ad77441c..eb8f6240 100644 --- a/umake/tools.py +++ b/umake/tools.py @@ -110,7 +110,7 @@ def config(self, config): class NoneDict(dict): - """We don't use a defaultdict(lambda: None) as it's growing everytime something is requested""" + """We don't use a defaultdict(lambda: None) as it's growing every time something is requested""" def __getitem__(self, key): return dict.get(self, key) diff --git a/umake/ui/__init__.py b/umake/ui/__init__.py index 8751ab53..0b6d1c57 100644 --- a/umake/ui/__init__.py +++ b/umake/ui/__init__.py @@ -17,7 +17,7 @@ # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -"""Abstracted UI interface that will be overriden by different UI types""" +"""Abstracted UI interface that will be overridden by different UI types""" import logging from gi.repository import GLib