meta-phosphor: update-enterprise-numbers: reformat and fix mypy issue
* Reformat the script using black/isort.
* Set the correct path to env in the #!.
* Fix minor mypy issue.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id4634d811e03ad777b2f73982510316bab7a7d0d
diff --git a/meta-phosphor/recipes-phosphor/ipmi/ipmitool/update-enterprise-numbers b/meta-phosphor/recipes-phosphor/ipmi/ipmitool/update-enterprise-numbers
index 31bc958..7096b16 100755
--- a/meta-phosphor/recipes-phosphor/ipmi/ipmitool/update-enterprise-numbers
+++ b/meta-phosphor/recipes-phosphor/ipmi/ipmitool/update-enterprise-numbers
@@ -1,8 +1,9 @@
-#!/bin/env python3
+#!/usr/bin/env python3
-from sh import curl
from typing import List
+from sh import curl # type: ignore
+
ENTERPRISES = {
0: "Reserved",
2: "IBM",
@@ -32,18 +33,18 @@
52893: "Inspur Power Systems Co.,Ltd.",
}
-HEADER = '''\
+HEADER = """\
This file has been reduced to entities signing CLAs with OpenBMC
https://drive.google.com/drive/folders/1Ooi0RdTcaOWF1DWFJUAJDdN7tRKde7Nl\
-'''
+"""
found_first: bool = False
org: List[str] = []
-for l in curl(
+for ln in curl(
"-L", "http://www.iana.org/assignments/enterprise-numbers"
).splitlines():
- line = l.rstrip()
+ line = ln.rstrip()
# Look for Reserved/EN-0 as the start of the data.
if "0" == line: