Skip to content

Commit

Permalink
Fix invalid escape sequence deprecation warning in various docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpre committed Feb 2, 2021
1 parent e4d9634 commit 32b04d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions hyperspy/misc/label_position.py
Expand Up @@ -219,9 +219,8 @@ def _text_parser(self, text_edge):
element, subshell = text_edge.split('_')

if subshell[-1].isdigit():
formatted = element+' '+'$\mathregular{'+subshell[0]+'_'+\
subshell[-1]+'}$'
formatted = f"{element} {subshell[0]}$_{subshell[-1]}$"
else:
formatted = element+' '+'$\mathregular{'+subshell[0]+'}$'
formatted = f"{element} {subshell[0]}"

return formatted
2 changes: 1 addition & 1 deletion hyperspy/ui_registry.py
Expand Up @@ -18,7 +18,7 @@

"""Registry of user interface widgets.
Format {"tool_key" : {"toolkit" : <function(obj, display, \*\*kwargs)>}}
Format {"tool_key" : {"toolkit" : <function(obj, display, **kwargs)>}}
The ``tool_key`` is defined by the "model function" to which the widget provides
and user interface. That function gets the widget function from this registry
Expand Down

0 comments on commit 32b04d4

Please sign in to comment.