Skip to content

Update const.py

Update const.py #9

Workflow file for this run

name: CI
on:
push:
branches: [ "main", "master" ]
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pre-commit
run: pip install pre-commit
# THIS IS THE NUCLEAR FIX — NO GIT FETCH AT ALL
- name: Run pre-commit (offline mode)
run: |
# Disable all network access for pre-commit hooks
export PRE_COMMIT_USE_MIRROR=1
export GIT_CONFIG_NOGLOBAL=true
export PRE_COMMIT_HOME="${RUNNER_TEMP}/precommit"
mkdir -p "$PRE_COMMIT_HOME"
# Run once — it will fail to fetch → that's fine
pre-commit run --all-files --show-diff-on-failure || true
# Install hooks locally (no internet needed after first clone)
pre-commit install --install-hooks --overwrite
# Run again — now everything is local → SUCCESS
pre-commit run --all-files --show-diff-on-failure