Closed
Description
Current Situation
Getting FileNotFoundError while running hatch run lint-py
command.
Error only where there is not linting needed.
Throwing error on command below
flake8 --toml-config /home/dir1 name with space/reactpy/pyproject.toml .
Works fine when running
flake8 --toml-config pyproject.toml .
Step to reproduce:
- Create a folder which consist of white space
- Clone repo inside that folder
- Run
hatch run lint-py
System detail
- Ubuntu
- Python 3.9
Proposed Actions
def lint_py(context: Context, fix: bool = False):
"""Run linters and type checkers"""
if fix:
context.run("ruff --fix .")
else:
context.run("ruff .")
context.run("black --check --diff .")
path = str(ROOT).replace(" ", "\ ") + "/pyproject.toml"
in_py(
context,
f"flake8 --toml-config {path} .",
"hatch run lint:all",
)
Replace white space with \
so that os can locate the path which has while space