INCR-388 python3 compatibility
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
from __future__ import print_function
|
||||
"""
|
||||
Show Event outputs.
|
||||
"""
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import json
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
@@ -4,6 +4,8 @@ A linting tool to check for xss vulnerabilities.
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
if __name__ == "__main__":
|
||||
from xsslint.main import main
|
||||
main()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
"""
|
||||
The main function for the XSS linter.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import argparse
|
||||
import importlib
|
||||
import os
|
||||
import sys
|
||||
from functools import reduce
|
||||
|
||||
from xsslint.reporting import SummaryResults
|
||||
from xsslint.rules import RuleSet
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
"""
|
||||
Utility classes for reporting linter results.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from six.moves import range
|
||||
|
||||
from xsslint.utils import StringLines
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
"""
|
||||
Custom AST NodeVisitor classes uses for Python xss linting.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import ast
|
||||
import re
|
||||
|
||||
@@ -8,7 +10,6 @@ from xsslint.reporting import ExpressionRuleViolation
|
||||
from xsslint.rules import RuleSet
|
||||
from xsslint.utils import Expression, ParseString, StringLines
|
||||
|
||||
|
||||
ruleset = RuleSet(
|
||||
python_concat_html='python-concat-html',
|
||||
python_deprecated_display_name='python-deprecated-display-name',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# xsslint config module for edx-platform
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -7,8 +9,7 @@ import sys
|
||||
scripts_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.append(os.path.join(scripts_dir, 'xsslint'))
|
||||
|
||||
from xsslint.linters import JavaScriptLinter, MakoTemplateLinter, PythonLinter, UnderscoreTemplateLinter
|
||||
|
||||
from xsslint.linters import JavaScriptLinter, MakoTemplateLinter, PythonLinter, UnderscoreTemplateLinter # pylint: disable=import-error,wrong-import-position
|
||||
|
||||
# Define the directories that should be ignored by the script.
|
||||
SKIP_DIRS = (
|
||||
|
||||
Reference in New Issue
Block a user