Skip to content

Commit de5b5d1

Browse files
authored
Merge branch 'main' into removed_travis
2 parents 3299640 + 1bb6b32 commit de5b5d1

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

_docs/developer/software_and_system_design/coding_style_guide/python.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ redirect_from:
77

88
__Minimum Version__: 3.8
99

10-
For Python, we use [flake8](http://flake8.pycqa.org/en/latest/) to check Python code such that it follows things laid out in
11-
[PEP-8](https://www.python.org/dev/peps/pep-0008/), [PEP-257](https://www.python.org/dev/peps/pep-0257/), etc.
12-
To locally lint the code, you will need to install three modules:
13-
14-
pip3 install flake8 flake8-bugbear
15-
10+
For Python, we use [flake8](http://flake8.pycqa.org/en/latest/) and [pylint](https://pylint.readthedocs.io/en/stable/)
11+
to check Python code such that it follows things laid out in [PEP-8](https://www.python.org/dev/peps/pep-0008/),
12+
[PEP-257](https://www.python.org/dev/peps/pep-0257/), etc. The code is linted as part of our automated Travis-CI
13+
testsuite to ensure compliance. To locally lint the code, you will need to install four modules:
14+
```bash
15+
pip3 install flake8 flake8-bugbear pylint
16+
```
1617
and then you can just run `flake8` at the root to check all files or pass it an individual file to check just that.
18+
To see all files that are currently checked as part of Travis-CI, please look at the `.flake8` config file.
19+
20+
For pylint, you can just run `pylint --recursive=y .` at the root to check all files or pass it an individual file.

_docs/developer/testing/linting_static_analysis.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,27 @@ Be sure to start with the [Initial Set Up](/developer/testing/#initial-set-up) i
1313

1414
## Python Linting
1515

16-
The Python code of Submitty is linted using [flake8](https://flake8.pycqa.org/en/latest/) and
17-
[flake8-bugbear](https://github.com/PyCQA/flake8-bugbear). You can run the Python linter
18-
locally (on your host operating system) by running the following command from the root
16+
The Python code of Submitty is linted using [flake8](https://flake8.pycqa.org/en/latest/),
17+
[flake8-bugbear](https://github.com/PyCQA/flake8-bugbear), and [pylint](https://pylint.readthedocs.io/en/stable/).
18+
You can run the Python linter locally (on your host operating system) by running the following command from the root
1919
level of Submitty source tree:
2020

2121
```bash
22-
# from root level of Submitty repository
22+
# from root level of Submitty repository using flake8
2323
python3 -m flake8
24+
25+
# from root level of Submitty repository using pylint
26+
python3 -m pylint --recursive=y .
2427
```
2528

2629
Optionally, you can pass in a specific file or directory to only lint that file or directory, e.g.:
2730

2831
```bash
29-
# from root level of Submitty repository... to lint a specific file:
32+
# from root level of Submitty repository... to lint a specific file using flake:
3033
python3 -m flake8 bin/generate_repos.py
34+
35+
# from root level of Submitty repository... to lint a specific file using pylint:
36+
python3 -m pylint bin/generate_repos.py
3137
```
3238

3339
See also: [Python Style Guide](/developer/coding_style_guide/python)

0 commit comments

Comments
 (0)