Fix #8583: autodoc: Unnecessary object comparision via `__eq__` method

It should be compared by `is` keyword instead.
This commit is contained in:
Takeshi KOMIYA 2020-12-24 23:42:30 +09:00
parent 043260481b
commit 5c39d0c068
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ Bugs fixed
* #8567: autodoc: Instance attributes are incorrectly added to Parent class
* #8566: autodoc: The ``autodoc-process-docstring`` event is emitted to the
alias classes unexpectedly
* #8583: autodoc: Unnecessary object comparision via ``__eq__`` method
* #8565: linkcheck: Fix PriorityQueue crash when link tuples are not
comparable

View File

@ -1829,7 +1829,7 @@ class UninitializedGlobalVariableMixin(DataDocumenterMixinBase):
return False
def should_suppress_value_header(self) -> bool:
return (self.object == UNINITIALIZED_ATTR or
return (self.object is UNINITIALIZED_ATTR or
super().should_suppress_value_header())
def get_doc(self, encoding: str = None, ignore: int = None) -> List[List[str]]: