Skip to content

Commit 7b2f8f7

Browse files
committed
Replace flake8/pyflakes with pylint in CI and toolchain
pylint at 10.00/10 covers everything pyflakes checked (unused imports, undefined names) and more. pycodestyle is kept — it owns PEP 8 whitespace/indentation checks that pylint doesn't replicate. - requirements.txt: drop flake8, add pylint - Makefile: replace ci-flake8 target with ci-pylint - python.yml: drop flake8 step; add pylint step gated to ubuntu/3.12 (linting is not platform-sensitive, no need to run 15x) - contributing.rst: update Code Style, Components, and make ci sections
1 parent cc5dd0f commit 7b2f8f7

5 files changed

Lines changed: 25 additions & 18 deletions

File tree

.github/workflows/python.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ jobs:
3636
- name: Pre-Tests code smell validation
3737
run: |
3838
pycodestyle -v --ignore=E501 bitmath/__init__.py tests/
39-
flake8 --select=F bitmath/__init__.py tests/
39+
40+
- name: Lint with pylint
41+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
42+
run: |
43+
pylint bitmath/__init__.py
4044
4145
- name: Run Unit Tests
4246
run: |

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,12 @@ ci-pycodestyle:
209209
@echo "#############################################"
210210
. $(NAME)env3/bin/activate && pycodestyle -v --ignore=E501 bitmath/__init__.py tests/*.py
211211

212-
ci-flake8:
212+
ci-pylint:
213213
@echo ""
214214
@echo "#################################################"
215-
@echo "# Running Flake8 Compliance Tests in virtualenv"
215+
@echo "# Running pylint in virtualenv"
216216
@echo "#################################################"
217-
. $(NAME)env3/bin/activate && flake8 --select=F bitmath/__init__.py tests/*.py
217+
. $(NAME)env3/bin/activate && pylint bitmath/__init__.py
218218

219-
ci: clean uniquetestnames virtualenv ci-list-deps ci-pycodestyle ci-flake8 ci-unittests
219+
ci: clean uniquetestnames virtualenv ci-list-deps ci-pycodestyle ci-pylint ci-unittests
220220
:

bitmath.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: bitmath
33
.\" Author: [see the "AUTHOR" section]
44
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5-
.\" Date: 04/17/2026
5+
.\" Date: 05/04/2026
66
.\" Manual: python-bitmath
7-
.\" Source: bitmath 2.0.0
7+
.\" Source: bitmath 2.0.1
88
.\" Language: English
99
.\"
10-
.TH "BITMATH" "1" "04/17/2026" "bitmath 2\&.0\&.0" "python\-bitmath"
10+
.TH "BITMATH" "1" "05/04/2026" "bitmath 2\&.0\&.1" "python\-bitmath"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------

docsite/source/contributing.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ provided template.
3939
Code Style and Formatting
4040
*************************
4141

42-
Two static analysis checks run on every pull request as part of the
42+
Two static analysis tools run on every pull request as part of the
4343
GitHub Actions CI workflow, and locally via ``make ci``:
4444

45-
* ``pycodestyle`` — checks code style, with **E501** (line too long)
46-
ignored.
47-
* ``flake8 --select=F`` — runs pyflakes error checks only (undefined
48-
names, unused imports, etc.). Style checks are disabled.
45+
* ``pycodestyle`` — checks PEP 8 code style, with **E501** (line too
46+
long) ignored. Runs across all matrix cells.
47+
* ``pylint`` — full static analysis: naming conventions, refactoring
48+
hints, design metrics, and correctness checks. The project targets
49+
10.00/10. Runs on Ubuntu / Python 3.12 only (linting is not
50+
platform-sensitive).
4951

5052
A PR cannot be merged until both pass. If you want to save time you
5153
can run ``make ci`` locally to check before submitting and waiting on
@@ -150,10 +152,11 @@ The bitmath test suite depends on the following tools:
150152
can always be discussed in the pull request.
151153

152154
* `pycodestyle <https://pypi.org/project/pycodestyle/>`_ — Checks
153-
Python code style.
155+
Python code style (PEP 8).
154156

155-
* `pyflakes <https://pypi.org/project/pyflakes/>`_ — Checks Python
156-
source files for errors.
157+
* `pylint <https://pylint.readthedocs.io/>`_ — Full static analysis:
158+
naming, refactoring hints, design metrics, and correctness. The
159+
project targets a score of 10.00/10.
157160

158161
* `virtualenv <https://virtualenv.pypa.io/en/latest/>`_ — Creates an
159162
isolated Python environment. The ``make ci`` target manages this
@@ -181,7 +184,7 @@ relevant to contributors are:
181184
The primary target. Creates a Python virtualenv, installs all
182185
dependencies from ``requirements.txt``, runs the unique test name
183186
check, executes the full pytest suite with coverage, and runs
184-
``pycodestyle`` and ``pyflakes``. Run this before opening a pull
187+
``pycodestyle`` and ``pylint``. Run this before opening a pull
185188
request. **This is the same check GitHub Actions runs.**
186189

187190
``make clean``

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flake8
21
pycodestyle
2+
pylint
33
pytest
44
pytest-cov

0 commit comments

Comments
 (0)