Skip to content

add --extensions cli arg for python filter#355

Open
oliverlambson wants to merge 1 commit intosamuelcolvin:mainfrom
oliverlambson:main
Open

add --extensions cli arg for python filter#355
oliverlambson wants to merge 1 commit intosamuelcolvin:mainfrom
oliverlambson:main

Conversation

@oliverlambson
Copy link

@oliverlambson oliverlambson commented Oct 20, 2025

This cli option is mentioned in filters.py, but not implemented. I would find it very useful to have as a CLI option rather than having to implement a custom filter just to add a couple of extensions to the python filter.

@hyperlint-ai-deprecated
Copy link

PR Change Summary

Implemented the --extensions CLI option for the Python filter to allow users to specify additional file extensions.

  • Added the --extensions flag to the CLI for the Python filter
  • Updated documentation to include usage examples for the new flag
  • Enhanced flexibility for users to watch additional file types beyond default Python files

Modified Files

  • docs/cli.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.


def build_filter(
filter_name: str, ignore_paths_str: Optional[str]
filter_name: str, ignore_paths_str: Optional[str], extensions_str: Optional[str] = None
Copy link
Author

@oliverlambson oliverlambson Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a default to reduce blast radius of change, but i think no default would be more in-line with the rest of the repo. lmk if you would prefer i remove it and add the arg to all calls to build_filter

@oliverlambson oliverlambson changed the title add cli --extensions for python filter add --extensions cli arg for python filter Oct 20, 2025
@oliverlambson
Copy link
Author

@samuelcolvin any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments