generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax regex re. recognizing requirements.txt
Zhihan found that the plotly project has some requirements files that are not recognized by FawltyDeps, with names like requirements_abc.txt. Using the underscore as a separator in the filename does not match our regex, which requires a word boundary ("\b") around the "requirements" string in the filename. Fix our regex: There is no reason why the underscore separator should disqualify this as a requirements file, and simplifying the regex to ".*requirements.*\.(txt|in)" is unlikely to introduce false positives (files that should _not_ be recognized as requirements.txt files, but now are). Also add unit tests precisely for parsing filenames of dependency files as I could not find another test case that tested exactly this.
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters