diff --git a/check.ps1 b/check.ps1 new file mode 100644 index 0000000..0e8adf1 --- /dev/null +++ b/check.ps1 @@ -0,0 +1,10 @@ +# +# Small script to ensure quality checks pass before submitting a commit/PR. +# +$ErrorActionPreference = "Stop" + +python -m ruff format docs src +python -m ruff check --fix --unsafe-fixes docs src + +# "--platform win32" to not fail on ctypes.windll (it does not affect the overall check on other OSes) +python -m mypy --platform win32 src docs/source/examples diff --git a/docs/source/developers.rst b/docs/source/developers.rst index 160e0d6..24b394e 100644 --- a/docs/source/developers.rst +++ b/docs/source/developers.rst @@ -40,7 +40,8 @@ Code Quality To ensure the code quality is correct enough:: $ python -m pip install -e '.[dev]' - $ ./check.sh + $ ./check.sh # Linux/macOS + $ .\check.ps1 # Windows (PowerShell) Documentation