[common] Calculate framerate as Fraction rather than using lookup table #5
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
| # Check PySceneDetect code lint warnings and formatting. | |
| name: Static Analysis | |
| on: | |
| pull_request: | |
| paths: | |
| - scenedetect/** | |
| - tests/** | |
| - pyproject.toml | |
| - .github/workflows/static-analysis.yml | |
| push: | |
| paths: | |
| - scenedetect/** | |
| - tests/** | |
| - pyproject.toml | |
| - .github/workflows/static-analysis.yml | |
| jobs: | |
| check_format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[dev] --only-binary av,opencv-python | |
| - name: Static Analysis (ruff) | |
| run: | | |
| python -m pip install --upgrade ruff | |
| python -m ruff check | |
| python -m ruff format --check | |
| - name: Type Check (pyright) | |
| env: | |
| PYRIGHT_PYTHON_FORCE_VERSION: latest | |
| run: | | |
| python -m pip install pyright | |
| python -m pyright | |