mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 13:48:23 +02:00
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:
parent
52be340076
commit
1048178580
6 changed files with 7 additions and 10 deletions
|
|
@ -9,6 +9,8 @@
|
||||||
# contain pointers to it. This can be useful when investigating leaks
|
# contain pointers to it. This can be useful when investigating leaks
|
||||||
# caused by unknown references to refcounted objects.
|
# caused by unknown references to refcounted objects.
|
||||||
|
|
||||||
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import gzip
|
import gzip
|
||||||
import sys
|
import sys
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
'''This script analyzes a JSON file emitted by DMD.'''
|
'''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 argparse
|
||||||
import collections
|
import collections
|
||||||
|
|
@ -592,11 +592,8 @@ def printDigest(args, digest):
|
||||||
number(record.reqSize),
|
number(record.reqSize),
|
||||||
number(record.slopSize)))
|
number(record.slopSize)))
|
||||||
|
|
||||||
def abscmp((usableSize1, _1), (usableSize2, _2)): return \
|
usableSizes = sorted(record.usableSizes.items(),
|
||||||
cmp(abs(usableSize1), abs(usableSize2))
|
key=lambda x: abs(x[0]), reverse=True)
|
||||||
usableSizes = sorted(record.usableSizes.items(), cmp=abscmp,
|
|
||||||
reverse=True)
|
|
||||||
|
|
||||||
hasSingleBlock = len(usableSizes) == 1 and usableSizes[0][1] == 1
|
hasSingleBlock = len(usableSizes) == 1 and usableSizes[0][1] == 1
|
||||||
|
|
||||||
if not hasSingleBlock:
|
if not hasSingleBlock:
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
'''Testing for the JSON file emitted by DMD heap scan mode when running SmokeDMD.'''
|
'''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 argparse
|
||||||
import gzip
|
import gzip
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ The resulting output is:
|
||||||
See README for more details.
|
See README for more details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import absolute_import, print_function
|
||||||
import sys
|
import sys
|
||||||
from collections import (
|
from collections import (
|
||||||
defaultdict,
|
defaultdict,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ py2:
|
||||||
- js/xpconnect
|
- js/xpconnect
|
||||||
- layout
|
- layout
|
||||||
- media
|
- media
|
||||||
- memory
|
|
||||||
- mobile
|
- mobile
|
||||||
- modules
|
- modules
|
||||||
- mozglue
|
- mozglue
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ py3:
|
||||||
- layout/style
|
- layout/style
|
||||||
- layout/tools/reftest
|
- layout/tools/reftest
|
||||||
- media
|
- media
|
||||||
- memory/replace
|
|
||||||
- modules/freetype2
|
- modules/freetype2
|
||||||
- python/safety
|
- python/safety
|
||||||
- security/manager/ssl
|
- security/manager/ssl
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue