click-contrib / sphinx-click

A Sphinx plugin to automatically document click-based applications
MIT License
212 stars 57 forks source link

<class ‘click.core.Command’>” of type “scripts.my module:mycommand” is not click.Command or click.Group.”click.BaseCommand” #112

Closed karenqinn closed 1 year ago

karenqinn commented 1 year ago

Hi! I’m suddenly running into this error, has anyone else?

I am importing click with import click, and this worked in the past. Did something change?

stephenfin commented 1 year ago

I'd suspect your inadvertently monkey patching click in unit tests or similar. Look for something like:

click.Command = mycommand

in your code.

This is something specific to your application though, not sphinx-click itself, so I'm going to close this since there's nothing wrong on our end here.