From daniela.plascencia at linux.intel.com Mon Jan 9 11:32:06 2017 From: daniela.plascencia at linux.intel.com (Daniela Plascencia) Date: Mon, 9 Jan 2017 10:32:06 -0600 Subject: [code-quality] msg-template not editable when pylint is called from a python script Message-ID: Steps to reproduce Call pylint from a python script as: (pylint_stdout, pylint_stderr) = lint.py_run(command_options = "%s -E --msg-template={path} {msg} my_module.py", return_std=True) and print the output of pylint_stdout.readlines() Current behavior When printed, pylint_stdout is not formatted as defined in command_options (see above), but instead, the message is shown as defined in pylint/eplyint.py (line 90-92): cmd = [sys.executable, "-c", run_cmd] + options + [ '--msg-template', '{path}:{line}: {category} ({msg_id}, {symbol}, {obj}) {msg}', '-r', 'n', child_path] Expected behavior The output when printing pylint_stdout.readlines() should be: PATH MSG But you get, instead: PATH:188: error (E1101, no-member, OBJECT) MESSAGE pylint --version output No config file found, using default configuration pylint 1.6.4, astroid 1.4.8 Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] From: https://github.com/PyCQA/pylint/issues/1269 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisspen at gmail.com Thu Jan 19 10:45:53 2017 From: chrisspen at gmail.com (Chris Spencer) Date: Thu, 19 Jan 2017 10:45:53 -0500 Subject: [code-quality] Getting progress output? Message-ID: Is there any way to configure Pylint to report progress? Nothing fancy, just something like "Processing file 4 of 104..." I'm using it to check around 100k lines of code, and right now it produces no output while it's running. My build server has a timeout period that resets as long as output is being generated by each step, and I have to crank this timeout to 20 minutes to stop Pylint from failing. However, this causes all other steps to potentially take longer, since you could otherwise assume they timeout after 1 minute when you expect output after 5 seconds of no output. -------------- next part -------------- An HTML attachment was scrubbed... URL: From littus at icloud.com Mon Jan 30 20:06:30 2017 From: littus at icloud.com (Bill D) Date: Mon, 30 Jan 2017 17:06:30 -0800 Subject: [code-quality] Unable to import 'os' (import-error) Message-ID: Hello: I am trying to run a simple 2-line Python script through pylint on Ubuntu without success (see https://github.com/PyCQA/pylint/issues/1305). Following are the details. Does anyone know what step I am missing? Steps to reproduce $ cat li.py #!/usr/bin/env python """foobar""" import os print os.listdir(os.curdir) $ pylint --reports=n li.py ************* Module li F: 3, 0: Unable to import 'os' (import-error) $ which python /usr/bin/python $ python --version Python 2.7.6 $ ls /usr/lib/python2.7/os.py /usr/lib/python2.7/os.py $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS" Current behavior pylint reports an import error Expected behavior No errors should be reported by pylint pylint --version output $ pylint --version pylint 1.1.0, astroid 1.0.1, common 0.61.0 Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] @bdurant Thank you, Bill From strombrg at gmail.com Mon Jan 30 22:01:29 2017 From: strombrg at gmail.com (Dan Stromberg) Date: Mon, 30 Jan 2017 19:01:29 -0800 Subject: [code-quality] Unable to import 'os' (import-error) In-Reply-To: References: Message-ID: That's a pretty old pylint. Maybe update it? Is pylint fully or partially installed? What does "which pylint" say? -- Dan Stromberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From jwilk at jwilk.net Tue Jan 31 05:44:44 2017 From: jwilk at jwilk.net (Jakub Wilk) Date: Tue, 31 Jan 2017 11:44:44 +0100 Subject: [code-quality] Unable to import 'os' (import-error) In-Reply-To: References: Message-ID: <20170131104444.mebbownla55ceiw7@jwilk.net> * Bill D , 2017-01-30, 17:06: >$ pylint --reports=n li.py >************* Module li >F: 3, 0: Unable to import 'os' (import-error) Very odd. FWIW, I can't reproduce it in a clean Trusty environment. I get: $ pylint --reports=n li.py No config file found, using default configuration $ echo $? 0 -- Jakub Wilk From littus at icloud.com Tue Jan 31 11:36:39 2017 From: littus at icloud.com (Bill D) Date: Tue, 31 Jan 2017 08:36:39 -0800 Subject: [code-quality] Unable to import 'os' (import-error) In-Reply-To: <784c0c7f-9f52-344c-f8e4-8082424e764d@icloud.com> References: <784c0c7f-9f52-344c-f8e4-8082424e764d@icloud.com> Message-ID: Hello All: A new data point... I am seeing the issue only on Ubuntu 14.04. It works fine on Redhat Enterprise Linux Server 6.6. So it looks like pylint is broken on Ubuntu. Is there a workaround/fix for Ubuntu 14.04? Regards, Bill On 1/31/2017 8:29 AM, Bill D wrote: > > Hello Dan: > > pylint is fully installed. > > Even with the latest pylint the issue still happens: > > $ cat li.py > #!/usr/bin/env python > """foobar""" > import os > print os.listdir(os.curdir) > > $ /usr/local/bin//pylint --version > pylint 1.6.5, > astroid 1.4.9 > Python 2.7.6 (default, Oct 26 2016, 20:30:19) > [GCC 4.8.4] > > $ /usr/local/bin/pylint --reports=n li.py > ************* Module li > E: 3, 0: Unable to import 'os' (import-error) > > What am I missing? > > Thank you! > > Bill > > On 01/30/2017 07:01 PM, Dan Stromberg wrote: >> >> That's a pretty old pylint. Maybe update it? >> >> Is pylint fully or partially installed? >> >> What does "which pylint" say? >> >> -- >> Dan Stromberg > -------------- next part -------------- An HTML attachment was scrubbed... URL: From littus at icloud.com Tue Jan 31 11:37:44 2017 From: littus at icloud.com (Bill D) Date: Tue, 31 Jan 2017 08:37:44 -0800 Subject: [code-quality] Unable to import 'os' (import-error) In-Reply-To: <20170131104444.mebbownla55ceiw7@jwilk.net> References: <20170131104444.mebbownla55ceiw7@jwilk.net> Message-ID: Hello Jakub: To fix your issue just do a 'touch ~/pylintrc' Regards, Bill On 1/31/2017 2:44 AM, Jakub Wilk wrote: > * Bill D , 2017-01-30, 17:06: >> $ pylint --reports=n li.py >> ************* Module li >> F: 3, 0: Unable to import 'os' (import-error) > > Very odd. FWIW, I can't reproduce it in a clean Trusty environment. I > get: > > $ pylint --reports=n li.py > No config file found, using default configuration > > $ echo $? > 0 > From littus at icloud.com Tue Jan 31 11:29:56 2017 From: littus at icloud.com (Bill D) Date: Tue, 31 Jan 2017 08:29:56 -0800 Subject: [code-quality] Unable to import 'os' (import-error) In-Reply-To: References: Message-ID: <784c0c7f-9f52-344c-f8e4-8082424e764d@icloud.com> Hello Dan: pylint is fully installed. Even with the latest pylint the issue still happens: $ cat li.py #!/usr/bin/env python """foobar""" import os print os.listdir(os.curdir) $ /usr/local/bin//pylint --version pylint 1.6.5, astroid 1.4.9 Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] $ /usr/local/bin/pylint --reports=n li.py ************* Module li E: 3, 0: Unable to import 'os' (import-error) What am I missing? Thank you! Bill On 01/30/2017 07:01 PM, Dan Stromberg wrote: > > That's a pretty old pylint. Maybe update it? > > Is pylint fully or partially installed? > > What does "which pylint" say? > > -- > Dan Stromberg -------------- next part -------------- An HTML attachment was scrubbed... URL: