mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use ruff
to enforce python code formatting (#37117)
Requires servo/servo#37045 for deps and config. Testing: No need for tests to test tests. Fixes: servo/servo#37041 --------- Signed-off-by: zefr0x <zer0-x.7ty50@aleeas.com>
This commit is contained in:
parent
41ecfb53a1
commit
c96de69e80
67 changed files with 3021 additions and 3085 deletions
|
@ -16,16 +16,16 @@ args = parser.parse_args()
|
|||
|
||||
|
||||
def load_data(filename):
|
||||
with open(filename, 'r') as f:
|
||||
with open(filename, "r") as f:
|
||||
results = {}
|
||||
totals = {}
|
||||
counts = {}
|
||||
records = json.load(f)
|
||||
for record in records:
|
||||
key = record.get('testcase')
|
||||
value = record.get('domComplete') - record.get('domLoading')
|
||||
totals[key] = totals.get('key', 0) + value
|
||||
counts[key] = counts.get('key', 0) + 1
|
||||
key = record.get("testcase")
|
||||
value = record.get("domComplete") - record.get("domLoading")
|
||||
totals[key] = totals.get("key", 0) + value
|
||||
counts[key] = counts.get("key", 0) + 1
|
||||
results[key] = round(totals[key] / counts[key])
|
||||
return results
|
||||
|
||||
|
@ -34,10 +34,10 @@ data1 = load_data(args.file1)
|
|||
data2 = load_data(args.file2)
|
||||
keys = set(data1.keys()).union(data2.keys())
|
||||
|
||||
BLUE = '\033[94m'
|
||||
GREEN = '\033[92m'
|
||||
WARNING = '\033[93m'
|
||||
END = '\033[0m'
|
||||
BLUE = "\033[94m"
|
||||
GREEN = "\033[92m"
|
||||
WARNING = "\033[93m"
|
||||
END = "\033[0m"
|
||||
|
||||
|
||||
total1 = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue