Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner authored and ubmarco committed Jan 19, 2024
1 parent b6f47b1 commit f29cfaf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions sphinx/builders/_epub_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def merge_builder_post_transform(self, new_attrs: dict[str, Any]) -> None:
"""Merge images back to the main builder after parallel
post-transformation.
param new_attrs: the attributes from the parallel subprocess to be
udpated in the main builder (self)
:param new_attrs: the attributes from the parallel subprocess to be
udpated in the main builder (self)
"""
for filepath, filename in new_attrs['images'].items():
if filepath not in self.images:
Expand Down
4 changes: 2 additions & 2 deletions sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ def merge_builder_post_transform(self, new_attrs: dict[str, Any]) -> None:
"""Merge images and search indexer back to the main builder after parallel
post-transformation.
param new_attrs: the attributes from the parallel subprocess to be
udpated in the main builder (self)
:param new_attrs: the attributes from the parallel subprocess to be
udpated in the main builder (self)
"""
# handle indexer
if self.indexer is None:
Expand Down
4 changes: 2 additions & 2 deletions sphinx/builders/linkcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def merge_builder_post_transform(self, new_attrs: dict[str, Any]) -> None:
"""Merge hyperlinks back to the main builder after parallel
post-transformation.
param new_attrs: the attributes from the parallel subprocess to be
udpated in the main builder (self)
:param new_attrs: the attributes from the parallel subprocess to be
udpated in the main builder (self)
"""
for hyperlink, value in new_attrs['hyperlinks'].items():
if hyperlink not in self.hyperlinks:
Expand Down
12 changes: 6 additions & 6 deletions sphinx/search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ def get_js_stemmer_code(self) -> str:
return self.lang.js_stemmer_code

def __getstate__(self):
# Copy the object's state from self.__dict__ which contains
# all instance attributes. Using the dict.copy()
# to avoid modifying the original state.
state = self.__dict__.copy()
"""Get the object's state.
Return a copy of self.__dict__ (which contains all instance attributes),
to avoid modifying the original state.
"""
# remove env for performance reasons - it is not not needed by consumers
del state['env']
return state
return {k: v for k, v in self.__dict__.items() if k != 'env'}

0 comments on commit f29cfaf

Please sign in to comment.