mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Implement `hash()
` for string paths
This commit is contained in:
parent
2986aa113c
commit
494de7327f
@ -50,6 +50,9 @@ if sys.platform == 'win32':
|
||||
return self.__str__() == other
|
||||
return NotImplemented
|
||||
|
||||
def __hash__(self):
|
||||
return super().__hash__()
|
||||
|
||||
def __getitem__(self, item):
|
||||
warnings.warn(_MSG, RemovedInSphinx80Warning, stacklevel=2)
|
||||
return self.__str__()[item]
|
||||
@ -88,6 +91,9 @@ else:
|
||||
return self.__str__() == other
|
||||
return NotImplemented
|
||||
|
||||
def __hash__(self):
|
||||
return super().__hash__()
|
||||
|
||||
def __getitem__(self, item):
|
||||
warnings.warn(_MSG, RemovedInSphinx80Warning, stacklevel=2)
|
||||
return self.__str__()[item]
|
||||
|
Loading…
Reference in New Issue
Block a user