File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
packages/gcp-sphinx-docfx-yaml/docfx_yaml Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,12 @@ class Bcolors:
8787REFFUNCTION = 'func'
8888INITPY = '__init__.py'
8989# Regex expression for checking references of pattern like ":class:`~package_v1.module`"
90- REF_PATTERN = ':(py:)?(func|class|meth|mod|ref|attr|exc):`~?[a-zA-Z0-9_.<> ]*(\(\))?`'
90+ REF_PATTERN = r ':(py:)?(func|class|meth|mod|ref|attr|exc):`~?[a-zA-Z0-9_.<> ]*(\(\))?`'
9191# Regex expression for checking references of pattern like "~package_v1.subpackage.module"
92- REF_PATTERN_LAST = '~([a-zA-Z0-9_<>]*\.)*[a-zA-Z0-9_<>]*(\(\))?'
92+ REF_PATTERN_LAST = r '~([a-zA-Z0-9_<>]*\.)*[a-zA-Z0-9_<>]*(\(\))?'
9393# Regex expression for checking references of pattern like
9494# "[module][google.cloud.cloudkms_v1.module]"
95- REF_PATTERN_BRACKETS = '\[[a-zA-Z0-9_<>\-. ]+\]\[[a-zA-Z0-9_<>\-. ]+\]'
95+ REF_PATTERN_BRACKETS = r '\[[a-zA-Z0-9_<>\-. ]+\]\[[a-zA-Z0-9_<>\-. ]+\]'
9696
9797REF_PATTERNS = [
9898 REF_PATTERN ,
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ def _highlight_md_codeblocks(mdfile_path: str) -> None:
220220
221221def _clean_image_links (mdfile_path : str ) -> None :
222222 """Cleans extra whitespace that breaks image links in index.html file."""
223- image_link_pattern = '\[\s*!\[image\]\(.*\)\s*\]\(.*\)'
223+ image_link_pattern = r '\[\s*!\[image\]\(.*\)\s*\]\(.*\)'
224224 new_lines = []
225225 with open (mdfile_path ) as mdfile :
226226 file_content = mdfile .read ()
Original file line number Diff line number Diff line change 2525from .utils import transform_node as _transform_node
2626from .nodes import remarks
2727
28- TYPE_SEP_PATTERN = '(\[|\]|, |\(|\))'
28+ TYPE_SEP_PATTERN = r '(\[|\]|, |\(|\))'
2929
3030def _get_desc_data (node ):
3131 assert node .tagname == 'desc'
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def slugify(value):
3030
3131 # From Django
3232 """
33- value = re .sub ('[^\w\s-]' , '' , value ).strip ()
34- return re .sub ('[-\s]+' , '-' , value )
33+ value = re .sub (r '[^\w\s-]' , '' , value ).strip ()
34+ return re .sub (r '[-\s]+' , '-' , value )
3535
3636
3737def transform_string (app , string ):
You can’t perform that action at this time.
0 commit comments