Repository navigation
Merge pull request #323 from claimed-framework/fix-conda-flake8-bugs #208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Static Code Analysis (Pylint) | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pylint | |
| - name: Analysing the code with pylint | |
| run: | | |
| # Advisory: pyproject.toml requires-python is >=3.11 and the repo has a | |
| # large pre-existing pylint backlog (notably R0801 duplicate-code | |
| # across c3/{notebook,pythonscript,rscript} and the terratorch_iterate | |
| # modules). Mirrors the flake8 "exit-zero" pattern in | |
| # python-package-conda.yml so findings surface in logs without | |
| # blocking every PR. | |
| pylint --exit-zero $(git ls-files 'src/**/*.py' 'terratorch_iterate/**/*.py') |