mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-10 01:10:27 +00:00
remove (sub-) types for "Unknown type" warnings
This commit is contained in:
parent
5035ea9e4a
commit
5777e43347
@ -185,9 +185,8 @@ class DotNetSphinxMapper(SphinxMapperBase):
|
||||
try:
|
||||
cls = obj_map[data["type"].lower()]
|
||||
except KeyError:
|
||||
LOGGER.warning(
|
||||
"Unknown type: %s" % data, type="autoapi", subtype="create_class"
|
||||
)
|
||||
# this warning intentionally has no (sub-)type
|
||||
LOGGER.warning("Unknown type: %s" % data)
|
||||
else:
|
||||
obj = cls(
|
||||
data, jinja_env=self.jinja_env, app=self.app, options=options, **kwargs
|
||||
|
@ -91,9 +91,8 @@ class GoSphinxMapper(SphinxMapperBase):
|
||||
else:
|
||||
cls = obj_map[data["type"]]
|
||||
except KeyError:
|
||||
LOGGER.warning(
|
||||
"Unknown Type: %s" % data, type="autoapi", subtype="create_class"
|
||||
)
|
||||
# this warning intentionally has no (sub-)type
|
||||
LOGGER.warning("Unknown type: %s" % data)
|
||||
else:
|
||||
if cls.inverted_names and "names" in data:
|
||||
# Handle types that have reversed names parameter
|
||||
|
@ -79,9 +79,8 @@ class JavaScriptSphinxMapper(SphinxMapperBase):
|
||||
try:
|
||||
cls = obj_map[data["kind"]]
|
||||
except (KeyError, TypeError):
|
||||
LOGGER.warning(
|
||||
"Unknown Type: %s" % data, type="autoapi", subtype="create_class"
|
||||
)
|
||||
# this warning intentionally has no (sub-)type
|
||||
LOGGER.warning("Unknown type: %s" % data)
|
||||
else:
|
||||
# Recurse for children
|
||||
obj = cls(data, jinja_env=self.jinja_env, app=self.app)
|
||||
|
@ -363,11 +363,8 @@ class PythonSphinxMapper(SphinxMapperBase):
|
||||
try:
|
||||
cls = self._OBJ_MAP[data["type"]]
|
||||
except KeyError:
|
||||
LOGGER.warning(
|
||||
"Unknown type: %s" % data["type"],
|
||||
type="autoapi",
|
||||
subtype="create_class",
|
||||
)
|
||||
# this warning intentionally has no (sub-)type
|
||||
LOGGER.warning("Unknown type: %s" % data["type"])
|
||||
else:
|
||||
obj = cls(
|
||||
data,
|
||||
|
@ -299,7 +299,6 @@ Suppressing Warnings
|
||||
* python_import_resolution
|
||||
* metadata_generation
|
||||
* not_readable
|
||||
* create_class
|
||||
* toc_reference
|
||||
|
||||
So if all AutoAPI warnings concerning unreadable sources and failing Python imports should be
|
||||
|
Loading…
Reference in New Issue
Block a user