Skip to content

Commit 1e2cf62

Browse files
committed
Document import_star error and change into warning (#93)
1 parent 0690bb7 commit 1e2cf62

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/src/reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,7 @@ and can be ignored with configuring ``suppress_warnings``.
131131

132132
- ``user_error``: issued when a directive is used incorrectly
133133
- ``parsing_error``: issued when parsing a code block fails
134+
- ``import_star``: issued when a library cannot be imported to determine
135+
the names that an ``import *`` would introduce
134136
- ``match_block``: issued when a block cannot be matched
135137
- ``match_name``: issued when a code snippet cannot be matched

src/sphinx_codeautolink/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def visit_Import(self, node: Union[ast.Import, ast.ImportFrom], prefix: str = ''
358358
]
359359
aliases = [None] * len(import_names)
360360
except ImportError:
361-
logger.error(
361+
logger.warning(
362362
f'Could not import module `{node.module}` for parsing!',
363363
type=warn_type,
364364
subtype='import_star',

0 commit comments

Comments
 (0)