python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 187 forks source link

pydoctyle plugin: The 'match' option in a config file isn't ignored #524

Open vpunch opened 5 months ago

vpunch commented 5 months ago

See #523 for a description of this error.

The author of the pydocstyle_lint.py module made a mistake when he thought that pydocstyle ignores the --match option when we explicitly pass the path to a file for diagnosis. This behavior only occurs with respect to the --match-dir option. The link to the source code that proves this. As a result, users were unable to set the match parameter in their configuration file inside a project.

I fixed this error and did a little refactoring to get rid of the repetitive code.