Skip to content

Commit

Permalink
fix: Type of Requirement.specs has been corrected as per #78
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Horton <[email protected]>
  • Loading branch information
madpah committed Apr 3, 2024
1 parent a8754ff commit 0a3089f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions requirements/requirement.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from __future__ import unicode_literals

import re
from typing import Any, Dict, List, Match, Optional, cast
from typing import Any, Dict, List, Match, Optional, Tuple, cast

from pkg_resources import Requirement as Req

Expand Down Expand Up @@ -87,7 +87,7 @@ def __init__(self, line: str) -> None:
self.hash_name = None
self.hash = None
self.extras: List[str] = []
self.specs: List[str] = []
self.specs: List[Tuple[str, str]] = []

def __repr__(self) -> str:
return f'<Requirement: "{self.line}">'
Expand Down Expand Up @@ -232,7 +232,7 @@ def parse_line(cls, line: str) -> 'Requirement':
pkg_req = Req.parse(line)
req.name = pkg_req.unsafe_name # type: ignore
req.extras = list(pkg_req.extras)
req.specs = pkg_req.specs # type: ignore
req.specs = pkg_req.specs
return req

@classmethod
Expand Down

0 comments on commit 0a3089f

Please sign in to comment.