Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: third_party/pylint/epylint.py

Issue 776883002: pylint: upgrade to 1.4.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pylint/config.py ('k') | third_party/pylint/gui.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pylint/epylint.py
===================================================================
--- third_party/pylint/epylint.py (revision 293207)
+++ third_party/pylint/epylint.py (working copy)
@@ -45,6 +45,7 @@
You may also use py_run to run pylint with desired options and get back (or not)
its output.
"""
+from __future__ import print_function
import sys, os
import os.path as osp
@@ -102,7 +103,7 @@
parts = line.split(":")
if parts and parts[0] == child_path:
line = ":".join([filename] + parts[1:])
- print line,
+ print(line, end=' ')
process.wait()
return process.returncode
@@ -113,18 +114,18 @@
"""Run pylint from python
``command_options`` is a string containing ``pylint`` command line options;
- ``return_std`` (boolean) indicates return of created standart output
+ ``return_std`` (boolean) indicates return of created standard output
and error (see below);
- ``stdout`` and ``stderr`` are 'file-like' objects in which standart output
+ ``stdout`` and ``stderr`` are 'file-like' objects in which standard output
could be written.
Calling agent is responsible for stdout/err management (creation, close).
- Default standart output and error are those from sys,
+ Default standard output and error are those from sys,
or standalone ones (``subprocess.PIPE``) are used
if they are not set and ``return_std``.
If ``return_std`` is set to ``True``, this function returns a 2-uple
- containing standart output and error related to created process,
+ containing standard output and error related to created process,
as follows: ``(stdout, stderr)``.
A trivial usage could be as follows:
@@ -133,7 +134,7 @@
pylint 0.18.1,
...
- To silently run Pylint on a module, and get its standart output and error:
+ To silently run Pylint on a module, and get its standard output and error:
>>> (pylint_stdout, pylint_stderr) = py_run( 'module_name.py', True)
"""
# Create command line to call pylint
@@ -140,7 +141,7 @@
if os.name == 'nt':
script += '.bat'
command_line = script + ' ' + command_options
- # Providing standart output and/or error if not set
+ # Providing standard output and/or error if not set
if stdout is None:
if return_std:
stdout = PIPE
@@ -155,7 +156,7 @@
p = Popen(command_line, shell=True, stdout=stdout, stderr=stderr,
env=_get_env(), universal_newlines=True)
p.wait()
- # Return standart output and error
+ # Return standard output and error
if return_std:
return (p.stdout, p.stderr)
@@ -162,10 +163,10 @@
def Run():
if len(sys.argv) == 1:
- print "Usage: %s <filename> [options]" % sys.argv[0]
+ print("Usage: %s <filename> [options]" % sys.argv[0])
sys.exit(1)
elif not osp.exists(sys.argv[1]):
- print "%s does not exist" % sys.argv[1]
+ print("%s does not exist" % sys.argv[1])
sys.exit(1)
else:
sys.exit(lint(sys.argv[1], sys.argv[2:]))
« no previous file with comments | « third_party/pylint/config.py ('k') | third_party/pylint/gui.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698