зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1559975 - enable py2 and py3 linting in memory r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35251 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
52be340076
Коммит
1048178580
|
@ -9,6 +9,8 @@
|
|||
# contain pointers to it. This can be useful when investigating leaks
|
||||
# caused by unknown references to refcounted objects.
|
||||
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import json
|
||||
import gzip
|
||||
import sys
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
'''This script analyzes a JSON file emitted by DMD.'''
|
||||
|
||||
from __future__ import print_function, division
|
||||
from __future__ import absolute_import, print_function, division
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
|
@ -592,11 +592,8 @@ def printDigest(args, digest):
|
|||
number(record.reqSize),
|
||||
number(record.slopSize)))
|
||||
|
||||
def abscmp((usableSize1, _1), (usableSize2, _2)): return \
|
||||
cmp(abs(usableSize1), abs(usableSize2))
|
||||
usableSizes = sorted(record.usableSizes.items(), cmp=abscmp,
|
||||
reverse=True)
|
||||
|
||||
usableSizes = sorted(record.usableSizes.items(),
|
||||
key=lambda x: abs(x[0]), reverse=True)
|
||||
hasSingleBlock = len(usableSizes) == 1 and usableSizes[0][1] == 1
|
||||
|
||||
if not hasSingleBlock:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
'''Testing for the JSON file emitted by DMD heap scan mode when running SmokeDMD.'''
|
||||
|
||||
from __future__ import print_function, division
|
||||
from __future__ import absolute_import, print_function, division
|
||||
|
||||
import argparse
|
||||
import gzip
|
||||
|
|
|
@ -18,7 +18,7 @@ The resulting output is:
|
|||
See README for more details.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
import sys
|
||||
from collections import (
|
||||
defaultdict,
|
||||
|
|
|
@ -19,7 +19,6 @@ py2:
|
|||
- js/xpconnect
|
||||
- layout
|
||||
- media
|
||||
- memory
|
||||
- mobile
|
||||
- modules
|
||||
- mozglue
|
||||
|
|
|
@ -19,7 +19,6 @@ py3:
|
|||
- layout/style
|
||||
- layout/tools/reftest
|
||||
- media
|
||||
- memory/replace
|
||||
- modules/freetype2
|
||||
- python/safety
|
||||
- security/manager/ssl
|
||||
|
|
Загрузка…
Ссылка в новой задаче