generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Problem statement
When FawltyDeps run with explicit list of files (as it is for pre-commit hooks, see #499) it raises an error for unsupported formats of code or dependencies files.
Solution ideas
- Instead of raising error when FD traverse mechanism encounters an unparsable file, we could emit a warning or just skip the non-matching file.
- For explicitly given files we could add a step to sort them to ones that may contain dependency declarations and code.
Explanation: Settings
object
Run FawltyDeps on FawltyDeps with printing the settings object build from input arguments.
Without explicit list of files
fawltydeps --generate-toml-config
# Copy this TOML section into your pyproject.toml to configure FawltyDeps
# (default values are commented)
[tool.fawltydeps]
# actions = ['check_undeclared', 'check_unused']
# output_format = 'human_summary'
code = ['fawltydeps']
deps = ['pyproject.toml']
# pyenvs = ['.']
# ignore_undeclared = []
ignore_unused = ['actionlint-py', 'codespell', 'hypothesis', 'mkdocs', 'mkdocs-material', 'mypy', 'nox', 'poetry-plugin-export', 'pytest', 'ruff', 'types-PyYAML', 'uv']
...
With explicit list of files
fawltydeps pyproject.toml fawltydeps --generate-toml-config
# Copy this TOML section into your pyproject.toml to configure FawltyDeps
# (default values are commented)
[tool.fawltydeps]
# actions = ['check_undeclared', 'check_unused']
# output_format = 'human_summary'
code = ['fawltydeps', 'pyproject.toml']
deps = ['fawltydeps', 'pyproject.toml']
pyenvs = ['fawltydeps', 'pyproject.toml']
# ignore_undeclared = []
ignore_unused = ['actionlint-py', 'codespell', 'hypothesis', 'mkdocs', 'mkdocs-material', 'mypy', 'nox', 'poetry-plugin-export', 'pytest', 'ruff', 'types-PyYAML', 'uv']
...
BUT running FawltyDeps with this command:
fawltydeps pyproject.toml fawltydeps
results in:
fawltydeps: error: Supported formats are .py and .ipynb; Cannot parse code: pyproject.toml
LordFckHelmchen
Metadata
Metadata
Assignees
Labels
No labels