A GitHub Action to run pyanalyze, a static type analyzer for Python code.
This action integrates pyanalyze into your GitHub workflows, allowing you to statically type-check your Python code automatically. It's a great way to catch bugs early and maintain code quality in your project.
- Description: The source path(s) to run pyanalyze on.
- Required: No
- Default:
"."
(current directory) - Example:
"./src"
- Description: Additional arguments to pass to pyanalyze. You can use
pyanalyze --help
to see all available options. - Required: No
- Default:
""
(no additional arguments) - Example:
"--strict-shallow"
- Description: The version of pyanalyze to install (e.g.,
"==0.33.1"
). - Required: No
- Default:
""
(installs the latest version) - Example:
"==0.33.1"
To use this action, include it in your GitHub workflow YAML file. You need to check out your code before running the action.
name: Static Analysis
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pyanalyze:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run pyanalyze
uses: gtkacz/pyanalyze-action@v1
with:
src: "./src"
args: "--strict-shallow"
version: "==0.33.1"
Replace gtkacz/pyanalyze-action@v1
with the correct repository and version tag for this action.
Contributions to improve this GitHub Action are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the GNU General Public License - see the LICENSE file for details.
- This action uses pyanalyze, created by Quora.
- Thanks to the GitHub Actions team for providing the platform and documentation.
If you encounter any problems or have any questions, please open an issue in this repository.