gen_requirement: Raise an error if REQUIREMENT not pinned
This commit is contained in:
parent
216ac14b3d
commit
7df51dc545
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,8 @@ IGNORE_PACKAGES = (
|
||||||
'homeassistant.components.recorder.models',
|
'homeassistant.components.recorder.models',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IGNORE_PIN = ('colorlog>2.1,<3', 'keyring>=9.3,<10.0', 'urllib3')
|
||||||
|
|
||||||
|
|
||||||
def explore_module(package, explore_children):
|
def explore_module(package, explore_children):
|
||||||
"""Explore the modules."""
|
"""Explore the modules."""
|
||||||
|
@ -78,6 +80,9 @@ def gather_modules():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for req in module.REQUIREMENTS:
|
for req in module.REQUIREMENTS:
|
||||||
|
if req.partition('==')[1] == '' and req not in IGNORE_PIN:
|
||||||
|
errors.append("{}[Please pin requirement {}]"
|
||||||
|
.format(package, req))
|
||||||
reqs.setdefault(req, []).append(package)
|
reqs.setdefault(req, []).append(package)
|
||||||
|
|
||||||
for key in reqs:
|
for key in reqs:
|
||||||
|
|
Loading…
Add table
Reference in a new issue