You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pre-commit hook doesn't recognize internal packages. When I lint project using ruff check inside superproject directory everything works fine. But when I run pre-commit, imports from external and internal packages (eg. flask and superpackage) are not separated. This happens because pre-commit doesn't recognize internal and external packages. I tried to cd superproject && ruff check, but this doesn't seem to work. Other solutions with bash -c 'cd ...' seems way too hacky. I also don't want to store inside pyproject.toml list of all internal packages. Is there any elegant solution?
Pre-commit hook doesn't recognize internal packages. When I lint project using
ruff check
insidesuperproject
directory everything works fine. But when I runpre-commit
, imports from external and internal packages (eg.flask
andsuperpackage
) are not separated. This happens becausepre-commit
doesn't recognize internal and external packages. I tried tocd superproject && ruff check
, but this doesn't seem to work. Other solutions withbash -c 'cd ...'
seems way too hacky. I also don't want to store insidepyproject.toml
list of all internal packages. Is there any elegant solution?Project structure:
main.py
pyproject.toml
Python 3.12.3
Ruff 0.7.3
The text was updated successfully, but these errors were encountered: