Skip to content

Commit

Permalink
Move from black to ruff format, pin ruff versions
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed May 23, 2024
1 parent 45e755d commit 720e7f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ tests: testpy testjs ## run the tests
###########
.PHONY: lintpy lintjs lint fixpy fixjs fix format

lintpy: ## Black/flake8 python
lintpy: ## Lint Python with Ruff
python -m ruff jupyterfs setup.py
python -m black --check jupyterfs setup.py
python -m ruff format --check jupyterfs setup.py

lintjs: ## ESlint javascript
lintjs: ## Lint Javascript with ESlint
cd js; ${YARN} lint

lint: lintpy lintjs ## run linter

fixpy: ## Black python
fixpy: ## Autoformat Python with Ruff
python -m ruff jupyterfs setup.py --fix
python -m black jupyterfs/ setup.py
python -m ruff format jupyterfs/ setup.py

fixjs: ## ESlint Autofix JS
fixjs: ## Autoformat JavaScript with ESlint
cd js; ${YARN} fix

fix: fixpy fixjs ## run black/tslint fix
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ develop = [
"pytest-asyncio",
"pytest-jupyter[server]",
# Other deps
"black>=23",
"bump2version>=1.0.0",
"check-manifest",
"ruff",
"ruff>=0.3.5,<0.4",
]

test = [
Expand Down Expand Up @@ -134,5 +133,5 @@ npm = "jlpm"
[tool.ruff]
line-length = 150

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]

0 comments on commit 720e7f4

Please sign in to comment.