提交 8e3e8399 authored 作者: Marco Gorelli's avatar Marco Gorelli 提交者: Brandon T. Willard

fix up pre-commit, run in CI

上级 3aa092fb
...@@ -41,19 +41,8 @@ jobs: ...@@ -41,19 +41,8 @@ jobs:
if: ${{ needs.changes.outputs.changes == 'true' }} if: ${{ needs.changes.outputs.changes == 'true' }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python - uses: actions/setup-python@v2
uses: actions/setup-python@v1 - uses: pre-commit/action@v2.0.0
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U black flake8 isort
- name: Check the style
run: |
black -t py36 --check theano/ tests/ setup.py conftest.py
isort --check theano/ tests/ setup.py conftest.py
flake8
test: test:
name: "Test py${{ matrix.python-version }}: ${{ matrix.part }}" name: "Test py${{ matrix.python-version }}: ${{ matrix.part }}"
...@@ -63,7 +52,7 @@ jobs: ...@@ -63,7 +52,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.changes == 'true' && needs.style.result == 'success' }} if: ${{ needs.changes.outputs.changes == 'true' && needs.style.result == 'success' }}
strategy: strategy:
fail-fast: false fail-fast: true
matrix: matrix:
python-version: ["3.6", "3.7"] python-version: ["3.6", "3.7"]
fast-compile: [0] fast-compile: [0]
......
repos: exclude: |
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
exclude: |
(?x)^( (?x)^(
versioneer\.py| versioneer\.py|
theano/_version\.py| theano/_version\.py|
doc/.*| doc/.*|
bin/.* bin/.*
)$ )$
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8 - repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4 rev: 3.8.4
hooks: hooks:
- id: flake8 - id: flake8
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
- repo: https://github.com/pycqa/isort - repo: https://github.com/pycqa/isort
rev: 5.5.2 rev: 5.6.4
hooks: hooks:
- id: isort - id: isort
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
...@@ -18,6 +18,7 @@ per-file-ignores = ...@@ -18,6 +18,7 @@ per-file-ignores =
tests/gpuarray/test_elemwise.py:E402 tests/gpuarray/test_elemwise.py:E402
tests/gpuarray/test_others.py:E402 tests/gpuarray/test_others.py:E402
tests/gpuarray/test_basic_ops.py:E402 tests/gpuarray/test_basic_ops.py:E402
theano/gof/unify.py:F811
exclude = exclude =
versioneer.py versioneer.py
doc/ doc/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论