diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 1c1d2cd76..7e38c3b99 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -70,11 +70,17 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: Install requirements run: | - pip install pip - pip install -r requirements-dev.txt - - name: Lint + python3 -m pip install -U pip + python3 -m pip install -r requirements-dev.txt + - name: Check black run: | - python3 -m black frigate --check + black --check --diff frigate migrations docker *.py + - name: Check isort + run: | + isort --check --diff frigate migrations docker *.py + - name: Check ruff + run: | + ruff check frigate migrations docker *.py python_tests: runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..e3ef3faf5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[tool.isort] +profile = "black" + +[tool.ruff] +ignore = ["E501"] \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 29f004455..0acd15ae4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,3 @@ -pylint == 2.17.* black == 23.3.* +isort +ruff