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

Add linting and type checking #4

Merged
merged 5 commits into from
Oct 6, 2024

Conversation

joelspadin
Copy link
Collaborator

@joelspadin joelspadin commented Aug 25, 2024

Added a GitHub workflow to run pre-commit, pylint, and pyright.

pylint and pyright are not included as pre-commit checks, because they need to analyze the project as a whole, not just the changed files, and they do not work correctly in an isolated environment without having access to dependencies.

Adjusted the pylint configuration to ignore diagnostics that are either not useful or duplicate those reported by pyright.

Fixed all type errors reported by pyright.

Added VS Code extension recommendations for all the formatting and linting tools, and enabled type checking in VS Code.

Fixes #3

@joelspadin joelspadin marked this pull request as ready for review August 25, 2024 01:15
Added a GitHub workflow to run pre-commit, pylint, and pyright.

pylint and pyright are not included as pre-commit checks, because they
need to analyze the project as a whole, not just the changed files, and
they do not work correctly in an isolated environment without having
access to dependencies.

Adjusted the pylint configuration to ignore diagnostics that are either
not useful or duplicate those reported by pyright.

Fixed all type errors reported by pyright.

Added VS Code extension recommendations for all the formatting and
linting tools, and enabled type checking in VS Code.

Fixes zmkfirmware#3
Added a "dev" group of optional dependencies to install pre-commit,
pylint, and pyright. (Black and isort are run from pre-commit, so they
are not included.)

Added some basic documentation for how to set up the development
environment.
Ran all files through pyupgrade --py310-plus.
@joelspadin joelspadin merged commit 8a79d3d into zmkfirmware:main Oct 6, 2024
1 check passed
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.

Add CI checks
1 participant