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

GitHub Action to spellcheck and lint Python code #899

Merged
merged 2 commits into from
May 10, 2024

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Apr 27, 2024

This Action uses minimal steps to run in ~5 seconds to rapidly:

  • use codespell to look for typos in the codebase, and
  • use ruff to lint Python code and provide intuitive GitHub Annotations to contributors.

Tools:

@RossBencina

@cclauss cclauss force-pushed the codespell_and_ruff branch from 7f7acfd to d27fbbd Compare April 27, 2024 06:01
@@ -29,7 +29,7 @@ def loadCsvData( dataFileName ):
inputDevice = ""
outputDevice = ""

startLines = file(dataFileName).readlines(1024)
startLines = open(dataFileName).readlines(1024)
Copy link
Contributor Author

@cclauss cclauss Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The from pylab import * above was hiding the file() issue that is just like:

@RossBencina
Copy link
Collaborator

I'd prefer to consider the python fixes and the CI workflow as separate PRs.

The fixes are uncontroversial and can me merged as is (although maybe an additional improvement is to explicitly scope the pylab symbols).

The CI I'm not sure about due to imposing linting opinions that I have no idea about since I've never used ruff or codespell.

@cclauss
Copy link
Contributor Author

cclauss commented May 4, 2024

Removed the CI workflow.

@RossBencina RossBencina merged commit f992f1d into PortAudio:master May 10, 2024
11 checks passed
@RossBencina
Copy link
Collaborator

Thank you!

@cclauss cclauss deleted the codespell_and_ruff branch May 11, 2024 04:51
cclauss added a commit to cclauss/portaudio-1 that referenced this pull request May 11, 2024
The CI automation part that was removed from
* PortAudio#899
* PortAudio#898
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.

3 participants