Skip to content

Commit

Permalink
Merge pull request #78 from timkpaine/tkp/ruff
Browse files Browse the repository at this point in the history
update ruff usage
  • Loading branch information
timkpaine authored Aug 30, 2024
2 parents 747a5b7 + 09cf6b8 commit 027118e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ tests: testpy testjs ## run the tests
# Linting #
###########
lintpy: ## Black/flake8 python
python -m ruff jupyterlab_miami_nights setup.py
python -m black --check jupyterlab_miami_nights setup.py
python -m ruff check jupyterlab_miami_nights
python -m ruff format --check jupyterlab_miami_nights

lintjs: ## ESlint javascript
cd js; yarn lint

lint: lintpy lintjs ## run linter

fixpy: ## Black python
python -m ruff jupyterlab_miami_nights setup.py --fix
python -m black jupyterlab_miami_nights/ setup.py
python -m ruff check --fix jupyterlab_miami_nights
python -m ruff format jupyterlab_miami_nights

fixjs: ## ESlint Autofix JS
cd js; yarn fix
Expand Down
4 changes: 1 addition & 3 deletions jupyterlab_miami_nights/tests/test_labextension.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@

class TestInit:
def test__jupyter_labextension_paths(self):
assert _jupyter_labextension_paths() == [
{"dest": "@timkpaine/jupyterlab_miami_nights", "src": "labextension"}
]
assert _jupyter_labextension_paths() == [{"dest": "@timkpaine/jupyterlab_miami_nights", "src": "labextension"}]
17 changes: 14 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dependencies = [

[project.optional-dependencies]
develop = [
"black>=23",
"check-manifest",
"ruff",
"pytest",
Expand Down Expand Up @@ -93,5 +92,17 @@ build_cmd = "build"
[tool.ruff]
line-length = 120

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
combine-as-imports = true
default-section = "third-party"
known-first-party = ["jupyterlab_miami_nights"]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]

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

0 comments on commit 027118e

Please sign in to comment.