"platforms/opencl/tests/TestOpenCLCompoundIntegrator.cpp" did not exist on "d9941f475d4a2d64e7a5c8573ee143b1d9694ce4"
Unverified Commit e7aa6ee9 authored by Matti Picus's avatar Matti Picus Committed by GitHub
Browse files

Merge pull request #455 from cclauss/patch-2

GitHub Action to lint Python code
parents dad30479 392930ef
name: lint_python
on: [pull_request, push, workflow_dispatch]
jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install --upgrade pip wheel
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
flake8-comprehensions isort mypy pytest pyupgrade safety
- run: bandit --recursive --skip B101 . # B101 is assert statements
- run: black --check . || true
- run: codespell --ignore-words-list="commend" # --skip="*.css,*.js,*.lock"
- run: flake8 . --count --max-complexity=10 --max-line-length=88
--show-source --statistics
- run: isort --check-only --profile black .
- run: pip install -r requirements.txt || pip install --editable . || true
- run: mkdir --parents --verbose .mypy_cache
- run: mypy --ignore-missing-imports --install-types --non-interactive .
- run: pytest . || pytest --doctest-modules . || true
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
- run: safety check
...@@ -179,7 +179,7 @@ shell scripts listed above are available for your build and test. ...@@ -179,7 +179,7 @@ shell scripts listed above are available for your build and test.
Build options are controlled mainly by the following environment Build options are controlled mainly by the following environment
variables: variables:
* ``MB_PYTHON_VER`` sets the Python version targetted: ``major.minor.patch`` * ``MB_PYTHON_VER`` sets the Python version targeted: ``major.minor.patch``
for CPython, or ``pypy-major.minor`` for PyPy. for CPython, or ``pypy-major.minor`` for PyPy.
* ``MB_PYTHON_OSX_VER`` sets the minimum macOS SDK version for any C * ``MB_PYTHON_OSX_VER`` sets the minimum macOS SDK version for any C
extensions. For CPython targets it may be set to 10.6 or 10.9, provided a extensions. For CPython targets it may be set to 10.6 or 10.9, provided a
......
...@@ -26,13 +26,14 @@ def tags_for(fname): ...@@ -26,13 +26,14 @@ def tags_for(fname):
def main(): def main():
supported = {(tag.interpreter, tag.abi, tag.platform) supported = {
for tag in sys_tags() (tag.interpreter, tag.abi, tag.platform) for tag in sys_tags()
} }
for fname in sys.argv[1:]: for fname in sys.argv[1:]:
tags = set(tags_for(fname)) tags = set(tags_for(fname))
if supported.intersection(tags): if supported.intersection(tags):
print(fname) print(fname)
if __name__ == '__main__': if __name__ == '__main__':
main() main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment