Auto-detection¶
Root dir of the project¶
Nitpick tries to find the root dir of the project using some hardcoded assumptions.
Starting from the current working directory, it will search for files that are usually in the root of a project:
.pre-commit-config.yaml
(pre-commit)
pyproject.toml
setup.py
setup.cfg
requirements*.txt
Pipfile
(Pipenv)
tox.ini
(tox)
package.json
(JavaScript, NodeJS)
Cargo.*
(Rust)
go.mod
,go.sum
(Golang)
app.py
andwsgi.py
(Flask CLI)
autoapp.py
(Flask)
Main Python file¶
After finding the root dir of the project, Nitpick searches for a
main Python file.
Every project must have at least one *.py
file, otherwise flake8 won’t even work.
Those are the Python files that are considered:
setup.py
app.py
andwsgi.py
(Flask CLI)autoapp.py
manage.py
any
*.py
file