PyCQA/pylint

Globbing pattern a default instead of regex pattern #8311

alexey-pelykh posted onGitHub

Current problem

As mentioned in https://github.com/PyCQA/pylint/pull/8281#issuecomment-1434511189, lets consider making globbing pattern a default and add a *-regex[p] options for backward compatibility in 3.0, meanwhile alerting users that really use regex that it's going to be renamed/deprecated.

cc @Pierre-Sassoulas @DudeNr33 @DanielNoord

Desired solution

  • leave the regex based options as they are for v2.x
  • change the default behavior from regex to globbing in v3.0, optionally adding support for people who really must use regex patterns by adding --ignore-paths-regex etc.
  • nice to have in v2.x: warn the user if an expression that is currently regex based cannot be evaluated as glob pattern, and make them aware that they must use regex pattern here

Additional context

No response


As it appears, only ignore-paths would be actually affected

posted by alexey-pelykh almost 2 years ago

--ignore-patterns would also be a candidate for this.

posted by DudeNr33 almost 2 years ago

Hm, I guess you're right. Making it a globbing pattern would be done via fnmatch then yet for sure

posted by alexey-pelykh almost 2 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests