1- # PyAction
1+ # PyLInt
22
33One-stop, zero-configuration GitHub Action for linting and enforcing style in Python projects.
44
@@ -8,7 +8,7 @@ One-stop, zero-configuration GitHub Action for linting and enforcing style in Py
88
99- Zero configuration based: Add a single line in your CI and done!
1010- GitHub Annotations on PR: Highlights issues inline on the PR diff.
11- - all of most popular community trusted linters in one place.
11+ - Most of the popular community trusted linters in one place.
1212
1313## Linters supported
1414
@@ -28,25 +28,31 @@ Basic:
2828``` yml
2929steps :
3030 - uses : actions/checkout@v1
31- - uses : rahul-deepsource/pyaction@v1.4 .0
31+ - uses : marian-code/python-lint-annotate@v2.0 .0
3232` ` `
3333
3434Options:
3535
3636` ` ` yml
3737steps :
3838 - uses : actions/checkout@v1
39- - uses : rahul-deepsource/pyaction@v1.4 .0
39+ - uses : marian-code/python-lint-annotate@v2.0 .0
4040 with :
4141 python-root-list : " src/ tests/'*'" # accepts wildcards bit must be enclosed in commas
4242 use-pycodestyle : false
4343 use-mypy : false
4444 use-vulture : true
4545 extra-pylint-options : " --output-format=" colorized"
46+ conda-python-version : " 3.7"
4647` ` `
4748
48- ## Details
49- uses conda environment with python 3.9 and lintner versions are:
49+ ## Details
50+
51+ Uses conda environment with user selected python version. Only python ` 3.6` - `3.9`
52+ version are tested since they are by far most common now. Other python `3.x` versions
53+ should also work. Any python `2.x` versions are unsupported!
54+
55+ The lintner versions are :
5056
5157` ` ` bash
5258pycodestyle==2.6.0
@@ -59,15 +65,47 @@ vulture==2.3
5965isort==isort-5.7.0
6066` ` `
6167
68+ # # IMPORTANT - test environment
69+
70+ The python version you set up in your action script with `actions/setup-python@v2`
71+ or by other means will not affect the linting process. The python version used by
72+ the lintners can be set up only by `conda-python-version` argument! This also means
73+ that if you modify the system conda environment it might affect the lintnig process.
74+ So it is best to keep the lintnig action separated from others. It is also recomended
75+ to run this on `ubuntu-latest`. Example :
76+
77+ ` ` ` yml
78+ on:
79+ push:
80+ pull_request:
81+ name: Lint Python
82+ jobs:
83+ lintpython:
84+ name: Lint Python
85+ runs-on: ubuntu-20.04
86+ steps:
87+ - uses: actions/checkout@v1
88+ - uses: marian-code/pyaction@master
89+ with:
90+ python-root-list: "./tests/'*'.py"
91+ use-black: true
92+ use-isort: true
93+ use-mypy: true
94+ use-pycodestyle: true
95+ use-pydocstyle: true
96+ extra-pycodestyle-options: "--max-line-length=88"
97+ use-pylint: false
98+ use-flake8: false
99+ use-vulture: true
100+ conda-python-version: "3.8"
101+ ` ` `
102+
103+
104+
62105# # License
63106
64107The scripts and documentation in this project are released under the [MIT License](LICENSE)
65108
66109# # Contributions
67110
68- Contributions are welcome! See [ CONTRIBUTING.md] ( CONTRIBUTING.md )
69-
70- ## Thanks to
71-
72- - Ricardo Baltazar Chaves' [ python-lint] ( https://github.com/ricardochaves/python-lint ) which was used as a starting point for this project.
73- - Florian Bruhin who provided most of the regular expressions for problem matchers.
111+ Contributions are welcome through PRs.
0 commit comments