mirror of
https://github.com/public-apis/public-apis.git
synced 2025-05-16 10:36:22 +02:00
Update build scripts to pass flake8
This commit is contained in:
parent
e53982f9d1
commit
9eaf189595
5 changed files with 70 additions and 57 deletions
|
@ -10,8 +10,8 @@ def markdown_to_json(filename, anchor):
|
|||
entries = []
|
||||
with open(filename) as fp:
|
||||
lines = (line.rstrip() for line in fp)
|
||||
lines = list(line for line in lines if line \
|
||||
and line.startswith(anchor) or line.startswith('| '))
|
||||
lines = list(line for line in lines if line and
|
||||
line.startswith(anchor) or line.startswith('| '))
|
||||
for line in lines:
|
||||
if line.startswith(anchor):
|
||||
category = line.split(anchor)[1].strip()
|
||||
|
@ -45,5 +45,6 @@ def main():
|
|||
anchor = sys.argv[2]
|
||||
print(markdown_to_json(sys.argv[1], anchor))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue