Skip to content

Commit

Permalink
[MAINT] add lint recipe to make file (#3758)
Browse files Browse the repository at this point in the history
* add lint recipe

* add flynt to recipe

* rm comment
  • Loading branch information
Remi-Gau committed Jun 26, 2023
1 parent e6fc4f9 commit c90bf61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,11 @@ doc:
.PHONY : pdf
pdf:
make -C doc pdf

.PHONY : lint
lint:
isort --profile black --settings-path pyproject.toml nilearn examples maint_tools
flynt .
black --config pyproject.toml nilearn examples maint_tools
codespell --toml pyproject.toml
flake8 --config .flake8 --black-config pyproject.toml nilearn examples maint_tools
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ doc = [
"coverage",
"flake8",
"flake8-docstrings",
"black",
"furo",
"isort",
"memory_profiler", # measuring memory during docs building
"mkl",
"myst-parser",
Expand Down Expand Up @@ -90,7 +88,12 @@ test = [
"pytest-cov",
]
# A combination of dependencies useful for developers
dev = ["nilearn[plotting,plotly,doc,test]"]
dev = [
"nilearn[plotting,plotly,doc,test]",
"isort",
"flynt",
"black",
]

[tool.hatch.build.targets.wheel]
packages = ["nilearn"]
Expand Down Expand Up @@ -181,7 +184,7 @@ doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
junit_family = "xunit2"

[tool.codespell]
skip = "./.git,plotly-gl3d-latest.min.js,jquery.min.js,localizer_behavioural.tsv,.mypy_cache,env,venv,./doc/auto_examples"
skip = "./.git,plotly-gl3d-latest.min.js,jquery.min.js,localizer_behavioural.tsv,.mypy_cache,env,venv,./doc/auto_examples,*/tmp,./doc/modules/generated/*"
ignore-words = ".github/codespell_ignore_words.txt"

[tool.flynt]
Expand Down

0 comments on commit c90bf61

Please sign in to comment.