Skip to content

Commit c27386c

Browse files
committed
style: run ruff
1 parent d785470 commit c27386c

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
import re
22

3+
34
def strip_comments(markdown):
4-
file_content = markdown.split('\n')
5-
markdown = ''
5+
file_content = markdown.split("\n")
6+
markdown = ""
67
for line in file_content:
7-
if not re.search(
8-
r'%%(.*)%%', line) or not line.startswith('%%') or not line.endswith('%%'):
9-
markdown += line + '\n'
10-
markdown = re.sub(r'%%(.*)%%', '', markdown, flags=re.DOTALL)
8+
if (
9+
not re.search(r"%%(.*)%%", line)
10+
or not line.startswith("%%")
11+
or not line.endswith("%%")
12+
):
13+
markdown += line + "\n"
14+
markdown = re.sub(r"%%(.*)%%", "", markdown, flags=re.DOTALL)
1115
return markdown
1216

17+
1318
def create_link(link):
14-
if link.endswith('/'):
15-
return link[:-1] + '.md'
19+
if link.endswith("/"):
20+
return link[:-1] + ".md"
1621
else:
17-
return link + '.md'
22+
return link + ".md"

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
version = "2.0.4"
44

5+
56
def classification_dependencies():
67
with open("requirements.txt") as f:
7-
external=[]
8-
internal=[]
8+
external = []
9+
internal = []
910
for package in f.read().splitlines():
1011
if package.startswith("git+"):
11-
external.append(package.replace('git+', ''))
12+
external.append(package.replace("git+", ""))
1213
else:
1314
internal.append(package)
1415
return external, internal

0 commit comments

Comments
 (0)