mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-14 17:32:12 -05:00
Be explicit with replacement in `_InventoryItem` warning (#14121)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
1 parent
718fae0245
commit
e552f8429c
1 file changed
+6
-2
@@ -311,7 +311,9 @@ class _InventoryItem:
|
||||
|
||||
def __getitem__(self, key: int | slice) -> str | tuple[str, ...]:
|
||||
warnings.warn(
|
||||
'The tuple interface for _InventoryItem objects is deprecated.',
|
||||
'The tuple interface for _InventoryItem objects is deprecated.'
|
||||
' Please access the `project_name`, `project_version`, '
|
||||
'`uri`, and `displayname` attributes directly.',
|
||||
RemovedInSphinx10Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
@@ -320,7 +322,9 @@ class _InventoryItem:
|
||||
|
||||
def __iter__(self) -> Iterator[str]:
|
||||
warnings.warn(
|
||||
'The iter() interface for _InventoryItem objects is deprecated.',
|
||||
'The iter() interface for _InventoryItem objects is deprecated.'
|
||||
' Please access the `project_name`, `project_version`, '
|
||||
'`uri`, and `displayname` attributes directly.',
|
||||
RemovedInSphinx10Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user