mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix condition for deprecation warning
This commit is contained in:
parent
e84ba569a2
commit
85651bfdf2
@ -737,7 +737,7 @@ class Sphinx(object):
|
||||
directive = directive_helper(obj, content, arguments, **options)
|
||||
directives.register_directive(name, directive)
|
||||
|
||||
if not isinstance(obj, Directive):
|
||||
if not issubclass(obj, Directive):
|
||||
warnings.warn('function based directive support is now deprecated. '
|
||||
'Use class based directive instead.',
|
||||
RemovedInSphinx30Warning)
|
||||
|
Loading…
Reference in New Issue
Block a user