Skip to content

Silence Python warnings about invalid backslashes. #1694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/components/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build/components/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'java-sync': '@Test',
'java-async': '@Test',
'java-reactive': '@Test',
'c#': '\[Fact\]|\[SkipIfRedis\(.*\)\]'
'c#': r'\[Fact]|\[SkipIfRedis\(.*\)]'
}
PREFIXES = {
'python': '#',
Expand Down
5 changes: 2 additions & 3 deletions build/components/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'):
Expand Down Expand Up @@ -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)