Skip to content
Snippets Groups Projects
Commit fbd79b10 authored by Ujjwal Sharma's avatar Ujjwal Sharma Committed by Rick Waldron
Browse files

tools: update lint.py to work with pip 10+

Update the lint.py script to work with pip 10+ as pip.req was moved to
pip._internal.req in version 10 onwards and the existing code only works
on versions of pip under or equal to 9.0.3
parent fd4a46a6
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,10 @@ import argparse
import inflect
import os
import pip
import pip.req
try:
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements
import sys
ie = inflect.engine()
......@@ -14,7 +17,7 @@ ie = inflect.engine()
try:
__import__('yaml')
except ImportError:
for item in pip.req.parse_requirements("./tools/lint/requirements.txt", session="test262"):
for item in parse_requirements("./tools/lint/requirements.txt", session="test262"):
if isinstance(item, pip.req.InstallRequirement):
requirement = item.name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment