From 650ed4925e2f92f173d03cf134496e76aa822a32 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Tue, 25 Jun 2019 09:18:00 +0200 Subject: [PATCH] Fix spelling mistakes (!1794) codespell --skip="./.git,./aports*" --- CONTRIBUTING.md | 2 +- pmb/config/__init__.py | 4 ++-- pmb/config/pmaports.py | 2 +- pmb/helpers/frontend.py | 2 +- pmb/install/_install.py | 2 +- pmb/parse/arguments.py | 4 ++-- pmb/parse/binfmt_info.py | 6 +++--- test/test_run_core.py | 2 +- test/testdata/aportgen/aports/main/gcc/APKBUILD | 2 +- test/testdata/aportgen/pmaports/cross/gcc-armhf/APKBUILD | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81844ad2..0a65c3ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ See pmbootstrap's [Development Guide](https://wiki.postmarketos.org/wiki/Develop * We're looking into automatizing this more, some files already get checked automatically by the [static code analysis script](test/static_code_analysis.sh). ### Python -* We use the [PEP8](https://www.python.org/dev/peps/pep-0008/) standard for Python code. Don't worry, you don't need to read all that, just run the `autopep8` program on your changed code, and confirm with the [static code analyis script](test/static_code_analysis.sh) that everything is PEP8 compliant. *This script will run automatically on Travis CI when you make a Merge Request, and it must pass for your code to get accepted.* +* We use the [PEP8](https://www.python.org/dev/peps/pep-0008/) standard for Python code. Don't worry, you don't need to read all that, just run the `autopep8` program on your changed code, and confirm with the [static code analysis script](test/static_code_analysis.sh) that everything is PEP8 compliant. *This script will run automatically on Travis CI when you make a Merge Request, and it must pass for your code to get accepted.* * We use the `reST` style for `docstrings` below functions (to comment what individual functions are doing, you'll see those when browsing through the code). Please stick to this format, and try to describe the important parameters and return values at least. Example from [here](https://stackoverflow.com/a/24385103): ```Python diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 46249caa..08b31fbb 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -55,7 +55,7 @@ config_keys = ["ccache_size", "device", "extra_packages", "hostname", "jobs", # Config file/commandline default values # $WORK gets replaced with the actual value for args.work (which may be -# overriden on the commandline) +# overridden on the commandline) defaults = { "alpine_version": "edge", # alternatively: latest-stable "aports": "$WORK/cache_git/pmaports", @@ -153,7 +153,7 @@ apkindex_retention_time = 4 # BUILD # # Officially supported host/target architectures for postmarketOS. Only -# specify architectures supported by Alpine here. Fro cross-compiling, +# specify architectures supported by Alpine here. For cross-compiling, # we need to generate the "musl-$ARCH", "binutils-$ARCH" and "gcc-$ARCH" # packages (use "pmbootstrap aportgen musl-armhf" etc.). build_device_architectures = ["armhf", "armv7", "aarch64", "x86_64", "x86"] diff --git a/pmb/config/pmaports.py b/pmb/config/pmaports.py index af659494..a42e879c 100644 --- a/pmb/config/pmaports.py +++ b/pmb/config/pmaports.py @@ -46,7 +46,7 @@ def clone(args): " the commands it runs, you can run 'pmbootstrap log' in a" " second terminal.") logging.info("Setting up the native chroot and cloning the package build" - " recipies (pmaports)...") + " recipes (pmaports)...") # Set up the native chroot and clone pmaports pmb.helpers.git.clone(args, "pmaports", False, True) diff --git a/pmb/helpers/frontend.py b/pmb/helpers/frontend.py index 3cd744e1..bb2fd5bf 100644 --- a/pmb/helpers/frontend.py +++ b/pmb/helpers/frontend.py @@ -274,7 +274,7 @@ def kconfig(args): if skipped: logging.info("NOTE: " + str(skipped) + " kernel(s) was skipped" " (consider 'pmbootstrap kconfig check -f')") - logging.info("kconfig check succeded!") + logging.info("kconfig check succeeded!") elif args.action_kconfig == "edit": pmb.build.menuconfig(args, args.package) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index 6c31199a..2bebee37 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -311,7 +311,7 @@ def embed_firmware(args): # Perform three checks prior to writing binaries to disk: 1) that binaries # exist, 2) that binaries do not extend into the first partition, 3) that - # binaries do not overlap eachother + # binaries do not overlap each other binary_ranges = {} binary_list = [] for binary_offset in binaries: diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index 5bcffc83..5b38ffd4 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -459,8 +459,8 @@ def arguments(): install.add_argument("--cipher", help="cryptsetup cipher used to" " encrypt the rootfs, eg. aes-xts-plain64") install.add_argument("--iter-time", help="cryptsetup iteration time (in" - " miliseconds) to use when encrypting the system" - " partiton") + " milliseconds) to use when encrypting the system" + " partition") install.add_argument("--add", help="comma separated list of packages to be" " added to the rootfs (e.g. 'vim,gcc')") install.add_argument("--no-fde", help="do not use full disk encryption", diff --git a/pmb/parse/binfmt_info.py b/pmb/parse/binfmt_info.py index 553abc3d..3d068227 100644 --- a/pmb/parse/binfmt_info.py +++ b/pmb/parse/binfmt_info.py @@ -32,9 +32,9 @@ def binfmt_info(args, arch_qemu): for line in handle: if line.startswith('#') or "=" not in line: continue - splitted = line.split("=") - key = splitted[0].strip() - value = splitted[1] + split = line.split("=") + key = split[0].strip() + value = split[1] full[key] = value[1:-2] ret = {} diff --git a/test/test_run_core.py b/test/test_run_core.py index 33ee1c91..260b31e1 100644 --- a/test/test_run_core.py +++ b/test/test_run_core.py @@ -111,7 +111,7 @@ def test_foreground_pipe(args): # Check if all child processes are killed after timeout. # The first command uses ps to get its process group id (pgid) and echo it - # to stdout. All of the test commmands will be running under that pgid. + # to stdout. All of the test commands will be running under that pgid. cmd = ["sudo", "sh", "-c", "pgid=$(ps -p ${1:-$$} -o pgid=);echo $pgid | tr -d '\n';" + "sleep 10 | sleep 20 | sleep 30"] diff --git a/test/testdata/aportgen/aports/main/gcc/APKBUILD b/test/testdata/aportgen/aports/main/gcc/APKBUILD index c528005e..1ae9418f 100644 --- a/test/testdata/aportgen/aports/main/gcc/APKBUILD +++ b/test/testdata/aportgen/aports/main/gcc/APKBUILD @@ -310,7 +310,7 @@ package() { ln -s gcc "$pkgdir"/usr/bin/cc - # we dont support gcj -static + # we don't support gcj -static # and saving 35MB is not bad. find "$pkgdir" -name libgtkpeer.a \ -o -name libgjsmalsa.a -o \ diff --git a/test/testdata/aportgen/pmaports/cross/gcc-armhf/APKBUILD b/test/testdata/aportgen/pmaports/cross/gcc-armhf/APKBUILD index f59f428c..7001dfc1 100644 --- a/test/testdata/aportgen/pmaports/cross/gcc-armhf/APKBUILD +++ b/test/testdata/aportgen/pmaports/cross/gcc-armhf/APKBUILD @@ -329,7 +329,7 @@ package() { ln -s gcc "$pkgdir"/usr/bin/cc - # we dont support gcj -static + # we don't support gcj -static # and saving 35MB is not bad. find "$pkgdir" -name libgtkpeer.a \ -o -name libgjsmalsa.a -o \