Skip to content

Commit

Permalink
refactor extras check for pylint check
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Jan 9, 2024
1 parent 728a1c2 commit 5bb2069
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ def parse_requirements():
with open("./requirements.txt", encoding="utf-8") as requirements_file:
lines = [r.strip() for r in requirements_file.readlines()]
for line in lines:
is_extras = (
"flash-attn" in line or "deepspeed" in line or "mamba-ssm" in line
)
if line.startswith("--extra-index-url"):
# Handle custom index URLs
_, url = line.split()
_dependency_links.append(url)
elif (
"flash-attn" not in line
and "deepspeed" not in line
and "mamba-ssm" not in line
and line
and line[0] != "#"
):
elif not is_extras and line and line[0] != "#":
# Handle standard packages
_install_requires.append(line)

Expand Down

0 comments on commit 5bb2069

Please sign in to comment.