Skip to content

Commit

Permalink
Merge pull request #218 from DerwenAI/snyk-fix-303e93eedc9dc2abf4ebc8…
Browse files Browse the repository at this point in the history
…efe2c62c27

[Snyk] Security upgrade mistune from 0.8.4 to 2.0.1
  • Loading branch information
ceteri authored Jan 1, 2022
2 parents b53e260 + 78cbff7 commit 938a2cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage
flask
grayskull
jupyterlab >= 3.1.4
mistune >= 2.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
mkdocs-git-revision-date-plugin
mkdocs-material
mknotebooks
Expand All @@ -20,3 +21,4 @@ pytest
selenium
twine
wheel

7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@

def parse_requirements_file (filename: str) -> typing.List:
"""read and parse a Python `requirements.txt` file, returning as a list of str"""
results: list = []

with pathlib.Path(filename).open() as f:
return [ l.strip().replace(" ", "") for l in f.readlines() ]
for l in f.readlines():
results.append(l.strip().replace(" ", "").split("#")[0])

return results


if __name__ == "__main__":
Expand Down

0 comments on commit 938a2cc

Please sign in to comment.