remove (sub-) types for "Unknown type" warnings

This commit is contained in:
René Fritze 2021-04-06 09:42:38 +02:00 committed by Ashley Whetter
parent 5035ea9e4a
commit 5777e43347
5 changed files with 8 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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,

View File

@ -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