fix(plugins): accept reports/options in diff_cover_report_quality hookspec - #613
Conversation
…kspec The diff_cover_report_quality hookspec declared no parameters, but diff_quality_tool called the plugin factory with reports= and options=. A plugin declaring those arguments failed pluggy validation with PluginValidationError, while one declaring none failed at call time with TypeError: unexpected keyword argument 'reports'. The hookspec now declares both arguments, and the factory is invoked with only the arguments its signature actually accepts, so the zero-argument plugin form documented in the README keeps working. Closes Bachmann1234#549
|
Thanks for the pr! I'll look at this some point soon but it will be a little bit. If you don't hear back in a week feel free to ping me |
|
@Bachmann1234 taking you up on the ping offer - it's been about a week. No changes since you last looked: still CLEAN/mergeable against main and all 14 checks are green. The change is confined to Happy to rebase or adjust the approach if you'd rather solve #549 a different way. |
|
@Sanjays2402 Thanks for the reminder! For this one I think the readme needs to be updated and can you look at the pylint warnings? |
|
Both done, plus a merge of main to clear the conflict that had shown up in the meantime. README: the plugin section now documents that the hook takes Pylint: was 9.83 on the three touched files.
|
|
alright, lets merge this in. I think ill be able to do a release tonight. Thanks for the pr! |
|
Out in https://pypi.org/project/diff-cover/10.4.2/ ! Thanks again! |
Closes #549
The
diff_cover_report_qualityhookspec declared no parameters, butdiff_quality_toolcalls the plugin factory withreports=/options=. So a plugin that declares them fails pluggy validation (PluginValidationError), and one that declares none — the form shown in the README — fails at call time withTypeError: got an unexpected keyword argument 'reports'.The hookspec now declares both arguments, and the factory is called with only the arguments its signature actually accepts, so the documented zero-argument plugin keeps working.