mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Merge pull request #5492 from kellerza/gen_requirements
[script] gen_requirement: Raise an error if REQUIREMENT not pinned
This commit is contained in:
commit
88e0bb6733
@ -28,6 +28,11 @@ IGNORE_PACKAGES = (
|
||||
'homeassistant.components.recorder.models',
|
||||
)
|
||||
|
||||
IGNORE_PIN = ('colorlog>2.1,<3', 'keyring>=9.3,<10.0', 'urllib3')
|
||||
|
||||
URL_PIN = ('https://home-assistant.io/developers/code_review_platform/'
|
||||
'#1-requirements')
|
||||
|
||||
|
||||
def explore_module(package, explore_children):
|
||||
"""Explore the modules."""
|
||||
@ -80,6 +85,10 @@ def gather_modules():
|
||||
continue
|
||||
|
||||
for req in module.REQUIREMENTS:
|
||||
if req.partition('==')[1] == '' and req not in IGNORE_PIN:
|
||||
errors.append(
|
||||
"{}[Please pin requirement {}, see {}]".format(
|
||||
package, req, URL_PIN))
|
||||
reqs.setdefault(req, []).append(package)
|
||||
|
||||
for key in reqs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user