From 4e90f82af3364d80e955768a3a0c828e34c3237b Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Sat, 19 Dec 2020 13:48:03 -0700 Subject: [PATCH 1/2] Fix minor typos in Contributing guidelines --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eae88de0..9fc41fbc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,14 +50,14 @@ The command line equivalent, with reporting, is: flake8 . --count --ignore E203,E221,E226,E241,E251,E261,E266,E302,E305 --max-line-length=99 --show-source --statistics ``` -Passing this check is required before contributuions are merged into the `main` branch. This is +Passing this check is required before contributions are merged into the `main` branch. This is checked automatically when you make a pull request. You can run the `flake8` command locally to check beforehand. The full command will give you a detailed description of the code lines that do not conform to the standard. ## Ignored Errors -Some errors are ignored in novelWriter, for various reasons. In addition, novelWriter sues camelCase +Some errors are ignored in novelWriter, for various reasons. In addition, novelWriter uses camelCase function and variable names due to this being the standard for the Qt libraries, and also because of the author's personal preferences. @@ -99,5 +99,5 @@ like markdown headers. make it easier to see which class just ended. The double line break is then redundant. **E305:** expected 2 blank lines after end of function or class -**Reason:** Instead, _always_ end a function with a `return`, preferrably indented at function +**Reason:** Instead, _always_ end a function with a `return`, preferably indented at function level. The end of the function is then clear. From 299998e8ffeda2d15166bd31fd2161c6f47179f1 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 19 Dec 2020 23:50:50 +0100 Subject: [PATCH 2/2] Update flake8 settings in CONTRIBUTING file to those currently in use --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fc41fbc..68df7d70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,14 +40,14 @@ The documentation is available [here](https://flake8.pycqa.org/en/latest/). The `setup.cfg` file in the root of this project has the following settings: ```conf [flake8] -ignore = E203,E221,E226,E241,E251,E261,E266,E302,E305 +ignore = E203,E221,E226,E228,E241,E251,E261,E266,E302,E305 max-line-length = 99 exclude = docs/* ``` The command line equivalent, with reporting, is: ```bash -flake8 . --count --ignore E203,E221,E226,E241,E251,E261,E266,E302,E305 --max-line-length=99 --show-source --statistics +flake8 . --count --ignore E203,E221,E226,E228,E241,E251,E261,E266,E302,E305 --max-line-length=99 --show-source --statistics ``` Passing this check is required before contributions are merged into the `main` branch. This is @@ -81,6 +81,9 @@ operator precedence like `2*a + 3*b` instead of `a * a + 3 * b`. Generally, don' `*`, `/` and `**`, but do use spaces around `+` and `-`. For appending strings, the spaces can be dropped. Don't use the `+` operator for appending multiple strings. Use formatting instead. +**E228** missing whitespace around modulo operator +**Reason:** Column alignment. + **E241:** multiple spaces after ‘,’ **Reason:** Column alignment.