Skip to content

Commit

Permalink
fix: add tox read only linters (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeCoull authored Mar 1, 2024
1 parent 7572917 commit e7b014b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.11'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[test]
pip install tox
- name: Run code format checks
run: |
black --check .
flake8
tox -e linters_check
29 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ commands =
{[testenv:black]commands}
{[testenv:flake8]commands}

# Read only linter env
[testenv:linters_check]
basepython = python3
skip_install = true
deps =
{[testenv:isort_check]deps}
{[testenv:black_check]deps}
{[testenv:flake8]deps}
commands =
{[testenv:isort_check]commands}
{[testenv:black_check]commands}
{[testenv:flake8]commands}

[testenv:flake8]
basepython = python3
skip_install = true
Expand All @@ -40,6 +53,14 @@ deps =
commands =
isort -rc . {posargs} --skip-glob src/braket/default_simulator/openqasm/parser/generated/*

[testenv:isort_check]
basepython = python3
skip_install = true
deps =
isort
commands =
isort . -rc {posargs} --skip-glob 'src/braket/default_simulator/openqasm/parser/generated/*'

[testenv:black]
basepython = python3
skip_install = true
Expand All @@ -48,6 +69,14 @@ deps =
commands =
black ./ {posargs}

[testenv:black_check]
basepython = python3
skip_install = true
deps =
black
commands =
black --check ./ {posargs}

[testenv:docs]
basepython = python3
deps =
Expand Down

0 comments on commit e7b014b

Please sign in to comment.