Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pylint default #267

Merged
merged 12 commits into from
Mar 4, 2024
Merged

Pylint default #267

merged 12 commits into from
Mar 4, 2024

Conversation

Christian-B
Copy link
Member

@Christian-B Christian-B commented Jan 18, 2024

This pr and later similar (but independent) prs make pylint checking stricter and also more constant between repositories.

I have done my best to only do one type of change per commit so reviewing the commits may be easiest.

Changes include:
Using a global rcfile https://github.com/SpiNNakerManchester/SupportScripts/blob/master/actions/pylint/strict_rcfile
Rather than one per repository

A global spelling exceptions list https://github.com/SpiNNakerManchester/SupportScripts/blob/master/actions/pylint/default_dict.txt

A pylint.bash file to make it easier to run pylint manually/locally using as close as possible to the github actions settings.

To support the pylint.bash finding other repositories without requiring them to be in the path

  • each repository (except utils) has a import_hooks.py file which adds paths to other repositories on a temporary basis.
  • the strict_rcfile has an init-hook setting to import (therefor run) this code.
  • this import assumes the file is local to the calling script so works with pylint_bash but try except passes in github actions.

Note: The changes to support scripts are already in master as impossible to test otherwise!

A number of spelling changes found by either github or running locally.

The code changes are limited to
-refactors some method or param names

  • using f strings
  • removing the keys() in for x in dict.keys() style
  • import reordering
  • adding overrides tags
  • typing - and using cast
  • replacing pattern for i in range(len(foo)):
  • fixing slots to use square brackets
  • removing or adding a FINAL decorator

Similar prs that can be done in any order:
SpiNNakerManchester/SpiNNMachine#236
SpiNNakerManchester/SpiNNMan#391
SpiNNakerManchester/PACMAN#541
SpiNNakerManchester/SpiNNFrontEndCommon#1157
SpiNNakerManchester/sPyNNaker#1437

tested by http://apollo.cs.man.ac.uk:8080/blue/organizations/jenkins/Integration%20Tests/detail/pylint_default/3/pipeline

@coveralls
Copy link

coveralls commented Jan 18, 2024

Coverage Status

coverage: 88.271%. remained the same
when pulling f1d5cfa on pylint_default
into 3ee7bd0 on master.

@Christian-B Christian-B merged commit 86719aa into master Mar 4, 2024
9 checks passed
@Christian-B Christian-B deleted the pylint_default branch March 4, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants