Project

General

Profile

Actions

Bug #6034

closed

pylint is not happy about cmd2 backwards compatibility

Added by osmith 12 months ago. Updated 12 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
05/16/2023
Due date:
% Done:

100%

Spec Reference:

Description

With the current pylint version we use, it is not possible to disable linting rules for whole blocks. This is confusing, as the documentation states it is possible.

https://gerrit.osmocom.org/c/pysim/+/32532/comments/11a5db4c_23e9ac80

Actions #1

Updated by osmith 12 months ago

fixeria wrote:

I don't see these warnings with pylint v2.17.4 (just tested)

Actions #2

Updated by fixeria 12 months ago

I submitted https://gerrit.osmocom.org/c/pysim/+/32729 to see which version we're actually running:

pylint==2.17.3

It was released 3 weeks ago, so it's quite recent already...

Actions #3

Updated by fixeria 12 months ago

  • Assignee changed from osmith to fixeria

This is what I am getting when running pylint on dexter 's patchset:

$ python3 -m pylint -j0 --errors-only --disable E1102 --disable E0401 --enable W0301 pySim *.py
************* Module pySim-shell
pySim-shell.py:30:4: E0611: No name 'fg' in module 'cmd2' (no-name-in-module)
pySim-shell.py:30:4: E0611: No name 'bg' in module 'cmd2' (no-name-in-module)
pySim-shell.py:154:8: E1123: Unexpected keyword argument 'use_ipython' in method call (unexpected-keyword-arg)
pySim-shell.py:171:30: E1120: No value for argument 'settable_object' in constructor call (no-value-for-parameter)
pySim-shell.py:173:30: E1120: No value for argument 'settable_object' in constructor call (no-value-for-parameter)
pySim-shell.py:175:30: E1120: No value for argument 'settable_object' in constructor call (no-value-for-parameter)
pySim-shell.py:176:30: E1120: No value for argument 'settable_object' in constructor call (no-value-for-parameter)

pySim-shell.py seems to work with cmd2 v2.4.3 on my system, but pylint is not smart enough to skip checking conditional blocks for older cmd2 versions.

Actions #4

Updated by fixeria 12 months ago

  • Subject changed from migrate to a more recent pylint version to pylint is not happy about cmd2 backwards compatibility
  • Assignee deleted (fixeria)
Actions #5

Updated by osmith 12 months ago

  • Assignee set to osmith
  • % Done changed from 0 to 90

As master-pysim has been failing for a few days, I looked into it. This fixes it:
https://gerrit.osmocom.org/c/pysim/+/32924/1

fixeria wrote in #note-2:

I submitted https://gerrit.osmocom.org/c/pysim/+/32729 to see which version we're actually running:

[...]

It was released 3 weeks ago, so it's quite recent already...

I've rebased your patch, it is pylint==2.17.4 now.

Actions #6

Updated by osmith 12 months ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)