diff --git a/build/components/component.py b/build/components/component.py index ba6a6e73d..7da3d18a0 100644 --- a/build/components/component.py +++ b/build/components/component.py @@ -461,7 +461,7 @@ def _process_module_docs(self, files: list) -> None: md.persist() files = run( - f'find {self._content} -regex ".*\.md"').strip().split('\n') + fr'find {self._content} -regex ".*\.md"').strip().split('\n') for f in files: md = Markdown(f) t = md.fm_data.pop('type', None) diff --git a/build/components/example.py b/build/components/example.py index 855776dd1..955c9187d 100644 --- a/build/components/example.py +++ b/build/components/example.py @@ -14,7 +14,7 @@ 'java-sync': '@Test', 'java-async': '@Test', 'java-reactive': '@Test', - 'c#': '\[Fact\]|\[SkipIfRedis\(.*\)\]' + 'c#': r'\[Fact]|\[SkipIfRedis\(.*\)]' } PREFIXES = { 'python': '#', diff --git a/build/components/markdown.py b/build/components/markdown.py index c21178d7e..9d7536500 100644 --- a/build/components/markdown.py +++ b/build/components/markdown.py @@ -77,9 +77,8 @@ def add_github_metadata(self, github_repo: str, github_branch: str, github_path: self.fm_data['github_path'] = github_path def report_links(self) -> None: - links = re.findall(r'(\[.+\])(\(.+\))', self.payload) exc = ['./', '#', '/commands', '/community', '/docs', '/topics'] - for link in links: + for link in re.finditer(r'(\[.+])(\(.+\))', self.payload): ex = False for e in exc: if link[1].startswith(f'({e}'): @@ -247,4 +246,4 @@ def rep(x): return r else: return x.group(0) - self.payload = re.sub(f'(\[.+?\])(\(.+?\))', rep, self.payload) + self.payload = re.sub(r'(\[.+])(\(.+\))', rep, self.payload)