Skip to content

Commit

Permalink
Bump development environment
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed May 22, 2024
1 parent 689358d commit 39a169a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 deletions.
15 changes: 0 additions & 15 deletions .pylintrc

This file was deleted.

1 change: 0 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ def find_bad_tracks(clip: MovieClip) -> Dict[str, Badness]:


def find_duplicate_tracks(clip: MovieClip) -> Iterable[Duplicate]:

# For each clip frame...
first_frame_index = clip.frame_start
last_frame_index = clip.frame_start + clip.frame_duration - 1
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fake-bpy-module-2.93 == 20211212
33 changes: 22 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[tox]
# NOTE: Should match one of the [gh-actions] configs below
envlist = black, mypy, pylint
envlist = ruff-format, mypy, ruff-check

ruff_version = 0.4.4

[testenv]
basepython = python3
skip_install = true
allowlist_externals = /bin/bash

[gh-actions]
# NOTE: Should match the python-versions list in main.yml
Expand All @@ -13,22 +16,30 @@ skip_install = true
# from the [tox] envlist above?
python =
3.9: mypy
3.10: black, mypy, pylint # NOTE: Should mat [tox] envlist above
3.10: ruff-format, mypy, ruff-check # NOTE: Should mat [tox] envlist above

[testenv:black]
deps = black == 21.12b0
[testenv:ruff-format]
deps =
ruff=={[tox]ruff_version}

# Format locally, check in CI and fail on not-formatted code
commands = /bin/bash -c 'if [ "{env:CI:}" ] ; then export CHECK="--check --diff --color" ; fi ; black $CHECK __init__.py'
commands = /bin/bash -c 'if [ "{env:CI:}" ] ; then CHECK="--check --diff" ; fi ; ruff format $CHECK __init__.py'

[testenv:mypy]
deps =
mypy == 0.931
fake-bpy-module-2.93 == 20211212
mypy == 1.10.0
-r requirements.txt
commands = mypy __init__.py

[testenv:pylint]
[testenv:ruff-check]
# Depend on ruff-format to not complain about formatting errors
depends = ruff-format

deps =
pylint == 2.12.2
fake-bpy-module-2.93 == 20211212
commands = pylint __init__.py
ruff=={[tox]ruff_version}
pytest==8.2.1
-r requirements.txt

# Auto-fix locally but not in CI
commands =
/bin/bash -c 'FIX="--fix" ; if [ "{env:CI:}" ] ; then FIX="--no-fix" ; fi ; ruff check $FIX __init__.py'

0 comments on commit 39a169a

Please sign in to comment.