Skip to content

Commit

Permalink
Pin ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
tmke8 committed Feb 29, 2024
1 parent 14a2978 commit c5f2360
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,40 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install ruff
python-version: "3.11"
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: |
pip install ruff
poetry env use 3.11
poetry install --no-interaction --no-root --only lint
- name: Format with ruff
run: |
ruff format --diff .
poetry run ruff format --diff .
lint_with_ruff:

runs-on: ubuntu-latest

steps:
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install ruff
python-version: "3.11"
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: |
pip install ruff
poetry env use 3.11
poetry install --no-interaction --no-root --only lint
- name: Lint with ruff
run: |
ruff check --output-format=github .
poetry run ruff check --output-format=github .
run_type_checking:
needs:
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ torch = "^2.0.1"
torchvision = ">=0.15.2"

[tool.poetry.group.dev.dependencies]
ruff = "*"
types-tqdm = "*"
pandas-stubs = "*"
python-type-stubs = {git = "https://github.com/wearepal/python-type-stubs.git", rev = "8d5f608"}
python-type-stubs = { git = "https://github.com/wearepal/python-type-stubs.git", rev = "8d5f608" }

[tool.poetry.group.lint.dependencies]
ruff = "*"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand All @@ -67,6 +69,9 @@ target-version = "py310"
line-length = 100
extend-exclude = ["hydra_plugins"]

[tool.ruff.format]
quote-style = "preserve"

[tool.ruff.lint]
select = ["I", "F", "E", "W", "UP"]
ignore = [
Expand Down

0 comments on commit c5f2360

Please sign in to comment.