Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define minimum length per filter #124

Merged
merged 8 commits into from
Jun 30, 2024
Merged

Conversation

LukasPietzschmann
Copy link
Contributor

Currently, extracto uses the same minimum length for all filters. This PR introduces an optional config key to change the minimum length for each filter individually. The default value is still five, though.

@laktak
Copy link
Owner

laktak commented Jun 25, 2024

Thanks for your PR, I think it's a good idea!

Since extrakto can be used a a module and via the cli as well, could you update your PR to avoid breaking changes? IMHO it should only use min_length from the filter if no min_length param/arg was specified. Thanks :)

@LukasPietzschmann
Copy link
Contributor Author

could you update your PR to avoid breaking changes?

Sure! I don't know why I haven't thought of that 😅

I'll also fix the formatting issue, so black will be happy :)

@LukasPietzschmann LukasPietzschmann marked this pull request as draft June 26, 2024 14:25
@LukasPietzschmann LukasPietzschmann marked this pull request as ready for review June 26, 2024 19:07
@LukasPietzschmann
Copy link
Contributor Author

Alright, I fixed the formatting issue and made the global min_length (if present) overwrite a filter's min_length. Since the tests pass (at least on my machine xD) I would assume, that there are no more breaking changes :)

Copy link
Owner

@laktak laktak left a comment

Choose a reason for hiding this comment

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

Please take a look at my comments

extrakto.py Outdated Show resolved Hide resolved
extrakto.py Outdated Show resolved Hide resolved
@LukasPietzschmann
Copy link
Contributor Author

Thanks for your patience! I fixed the two issues you mentioned.

@laktak laktak merged commit b297d45 into laktak:master Jun 30, 2024
1 check passed
@laktak
Copy link
Owner

laktak commented Jun 30, 2024

Looking good, thank you! :)

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.

2 participants