Fix linter

This commit is contained in:
Hsiao-Wei Wang
2019-03-19 11:39:19 +08:00
parent 4440be4e1f
commit a07219c570
9 changed files with 45 additions and 42 deletions

View File

@@ -9,7 +9,7 @@ def get_lines(file_name):
for linenum, line in enumerate(open(sys.argv[1]).readlines()):
line = line.rstrip()
if pulling_from is None and len(line) > 0 and line[0] == '#' and line[-1] == '`':
current_name = line[line[:-1].rfind('`')+1: -1]
current_name = line[line[:-1].rfind('`') + 1: -1]
if line[:9] == '```python':
assert pulling_from is None
pulling_from = linenum + 1