mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-22 17:48:30 +08:00
Support environment markers in requires fields (#12711)
This commit is contained in:
@@ -289,8 +289,6 @@ def read_metadata(distribution: str) -> StubMetadata:
|
||||
|
||||
def parse_requires(distribution: str, req: object) -> Requirement:
|
||||
assert isinstance(req, str), f"Invalid requirement {req!r} for {distribution!r}"
|
||||
for space in " \t\n":
|
||||
assert space not in req, f"For consistency, requirement should not have whitespace: {req!r}"
|
||||
return Requirement(req)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user