Fix linting of 16.07 broken with security patches.

This commit is contained in:
John Chilton
2016-12-21 21:42:59 -05:00
parent 22fda449f9
commit 42a461353b
2 changed files with 9 additions and 4 deletions
+3 -1
View File
@@ -6,8 +6,9 @@
from __future__ import division
import sys
from json import loads
from ast import Module, parse, walk
from json import loads
AST_NODE_TYPE_WHITELIST = [
'Expr', 'Load', 'Str', 'Num', 'BoolOp', 'Compare', 'And', 'Eq', 'NotEq',
@@ -152,6 +153,7 @@ def check_expression( text ):
return True
#
# Helper functions.
#
@@ -5,12 +5,15 @@ Filter a gff file using a criterion based on feature counts for a transcript.
Usage:
%prog input_name output_name feature_name condition
"""
from __future__ import print_function
import sys
from ast import Module, parse, walk
from bx.intervals.io import GenomicInterval
from galaxy.datatypes.util.gff_util import GFFReaderWrapper
from ast import Module, parse, walk
AST_NODE_TYPE_WHITELIST = [
'Expr', 'Load', 'Str', 'Num', 'BoolOp', 'Compare', 'And', 'Eq', 'NotEq',
@@ -137,7 +140,7 @@ def __main__():
except:
number = None
if empty != "" or not number:
print >> sys.stderr, "Invalid condition: %s, cannot filter." % condition
print("Invalid condition: %s, cannot filter." % condition, file=sys.stderr)
return
break
@@ -173,7 +176,7 @@ def __main__():
( kept_features, i, float(kept_features) / i * 100.0, feature_name + condition )
if skipped_lines > 0:
info_msg += "Skipped %d blank/comment/invalid lines starting with line #%d." % ( skipped_lines, first_skipped_line )
print info_msg
print(info_msg)
if __name__ == "__main__":
__main__()