[libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python

Daniel P. Berrangé posted 23 patches 5 years ago
Test syntax-check failed
Failed in applying to current master (apply log)
There is a newer version of this series
Makefile.am                                   |  33 +-
build-aux/check-spacing.pl                    | 198 -------
build-aux/header-ifdef.pl                     | 182 -------
build-aux/mock-noinline.pl                    |  75 ---
build-aux/prohibit-duplicate-header.pl        |  26 -
build-aux/syntax-check.mk                     |  32 +-
docs/Makefile.am                              |  16 +-
docs/genaclperms.pl                           | 125 -----
docs/hvsupport.pl                             | 459 ----------------
{docs => scripts}/apibuild.py                 |   0
scripts/check-aclperms.py                     |  75 +++
scripts/check-aclrules.py                     | 263 +++++++++
scripts/check-driverimpls.py                  | 102 ++++
scripts/check-drivername.py                   | 114 ++++
scripts/check-file-access.py                  | 123 +++++
scripts/check-remote-protocol.py              | 136 +++++
scripts/check-spacing.py                      | 229 ++++++++
scripts/check-symfile.py                      |  80 +++
scripts/check-symsorting.py                   | 117 ++++
scripts/dtrace2systemtap.py                   | 143 +++++
{src/esx => scripts}/esx_vi_generator.py      |   0
scripts/genaclperms.py                        | 123 +++++
scripts/genpolkit.py                          | 122 +++++
scripts/gensystemtap.py                       | 184 +++++++
scripts/group-qemu-caps.py                    | 123 +++++
scripts/header-ifdef.py                       | 231 ++++++++
scripts/hvsupport.py                          | 504 ++++++++++++++++++
.../hyperv_wmi_generator.py                   |   0
scripts/mock-noinline.py                      |  85 +++
scripts/prohibit-duplicate-header.py          |  56 ++
{docs => scripts}/reformat-news.py            |   0
scripts/test-wrap-argv.py                     | 170 ++++++
src/Makefile.am                               | 146 ++---
src/access/Makefile.inc.am                    |   6 +-
src/access/genpolkit.pl                       | 119 -----
src/admin/Makefile.inc.am                     |   6 +-
src/check-aclperms.pl                         |  73 ---
src/check-aclrules.pl                         | 252 ---------
src/check-driverimpls.pl                      |  80 ---
src/check-drivername.pl                       |  83 ---
src/check-symfile.pl                          |  70 ---
src/check-symsorting.pl                       | 106 ----
src/dtrace2systemtap.pl                       | 130 -----
src/esx/Makefile.inc.am                       |   6 +-
src/hyperv/Makefile.inc.am                    |   5 +-
src/rpc/Makefile.inc.am                       |   1 -
src/rpc/gensystemtap.pl                       | 193 -------
tests/Makefile.am                             |   3 +-
tests/check-file-access.pl                    | 126 -----
tests/file_access_whitelist.txt               |   2 +-
tests/group-qemu-caps.pl                      | 124 -----
tests/test-wrap-argv.pl                       | 174 ------
tests/testutils.c                             |  16 +-
53 files changed, 3092 insertions(+), 2755 deletions(-)
delete mode 100755 build-aux/check-spacing.pl
delete mode 100644 build-aux/header-ifdef.pl
delete mode 100644 build-aux/mock-noinline.pl
delete mode 100644 build-aux/prohibit-duplicate-header.pl
delete mode 100755 docs/genaclperms.pl
delete mode 100755 docs/hvsupport.pl
rename {docs => scripts}/apibuild.py (100%)
create mode 100755 scripts/check-aclperms.py
create mode 100755 scripts/check-aclrules.py
create mode 100755 scripts/check-driverimpls.py
create mode 100644 scripts/check-drivername.py
create mode 100755 scripts/check-file-access.py
create mode 100644 scripts/check-remote-protocol.py
create mode 100755 scripts/check-spacing.py
create mode 100755 scripts/check-symfile.py
create mode 100755 scripts/check-symsorting.py
create mode 100755 scripts/dtrace2systemtap.py
rename {src/esx => scripts}/esx_vi_generator.py (100%)
create mode 100755 scripts/genaclperms.py
create mode 100755 scripts/genpolkit.py
create mode 100755 scripts/gensystemtap.py
create mode 100755 scripts/group-qemu-caps.py
create mode 100644 scripts/header-ifdef.py
create mode 100755 scripts/hvsupport.py
rename {src/hyperv => scripts}/hyperv_wmi_generator.py (100%)
create mode 100644 scripts/mock-noinline.py
create mode 100644 scripts/prohibit-duplicate-header.py
rename {docs => scripts}/reformat-news.py (100%)
create mode 100755 scripts/test-wrap-argv.py
delete mode 100755 src/access/genpolkit.pl
delete mode 100755 src/check-aclperms.pl
delete mode 100755 src/check-aclrules.pl
delete mode 100755 src/check-driverimpls.pl
delete mode 100755 src/check-drivername.pl
delete mode 100755 src/check-symfile.pl
delete mode 100755 src/check-symsorting.pl
delete mode 100755 src/dtrace2systemtap.pl
delete mode 100755 src/rpc/gensystemtap.pl
delete mode 100755 tests/check-file-access.pl
delete mode 100755 tests/group-qemu-caps.pl
delete mode 100755 tests/test-wrap-argv.pl
[libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python
Posted by Daniel P. Berrangé 5 years ago
This series is an effort to reduce the number of different
languages we use by eliminating most use of perl in favour
of python.

This aligns with fact that the likely future build system
we'll use (meson) is written in python, and that python
is much more commonly used/understood by developers these
days than perl.

With this applied we use perl in a handful of places only:

 - src/rpc/gendispatch.pl - this is a horrendously large
   script and very hard to understand/follow. A straight
   syntax conversion to Python would still leave a hgue
   and hard to understand/follow script. It really needs
   a clean room rewrite from scratch, with better structure.

 - src/rpc/genprotocol.pl - fairly easy to convert, but
   might be obsolete depending on approach for rewriting
   gendispatch.pl, so ignored for now

 - tests/oomtrace.pl - will be purge by the patches that
   drop OOM handling anyway

 - tools/wireshark/util/genxdrstub.pl - a very large
   script, which I haven't got the courage to tackle
   yet.

 - cfg.mk/maint.mk - many syntax rules involve regexes
   which are fed to perl. Decision on what to do
   with syntax-check rules punted to another time.

 - build-aux/gitlog-to-changelog
 - build-aux/useless-if-before-free - Both pulled in
   from gnulib. Could be rewritten quite easily if
   desired, but given that we aren't maintainers of
   them right now, they're ignored as they don't
   really impact our developers.

Note that the check-spacing.py script is significantly
slower in Python than in Perl. After researching this
it appears there is nothing that can be done. The Perl
regex engine is simply much better optimized than the
Python one.  As previously discussed we need to loook
at uncrustify or clang-format or some other tool to
validate whitespace formatting. This is ongoing. We
can either accept the slow down in the short term or
keep the Perl version in the short term.

In v5:

 - Rebased to cope with changes to require VPATH build
 - Merged the already-ACKd scripts

In v4:

 - Moved all scripts into the scripts/ directory instead
   of having them scattered around source tree
 - Use re.search instead of re.match
 - Don't bother re-compiling regexes

In v3:

 - All scripts comply with all flake8 style rules with
   exception of

    E129 visually indented line with same indent as next logical line

In v2:

 - Pulled in patch to hacking file
 - Converted many more scripts
 - Forced UTF-8 character set to avoid ascii codec
   on py3 < 3.7

Daniel P. Berrangé (23):
  build-aux: rewrite duplicate header checker in Python
  build-aux: rewrite whitespace checker in Python
  build-aux: rewrite mock inline checker in Python
  build-aux: rewrite header ifdef checker in Python
  src: rewrite ACL permissions checker in Python
  src: rewrite symfile sorting checker in Python
  src: rewrite symfile library checker in Python
  src: rewrite systemtap probe generator in Python
  src: rewrite systemtap function generator in Python
  src: rewrite driver name checker in Python
  src: rewrite driver impl checker in Python
  src: rewrite ACL rule checker in Python
  src: rewrite polkit ACL generator in Python
  src: rewrite remote protocol checker in Python
  tests: rewrite test argv line wrapper in Python
  tests: rewrite qemu capability grouper in Python
  tests: rewrite file access checker in Python
  docs: rewrite hvsupport.html page generator in python
  docs: rewrite polkit docs generator in Python
  docs: move apibuild.py to the scripts/ directory
  docs: move reformat-news.py to the scripts/ directory
  docs: move esx_vi_generator.py to the scripts/ directory
  docs: move hyperv_wmi_generator.py to the scripts/ directory

 Makefile.am                                   |  33 +-
 build-aux/check-spacing.pl                    | 198 -------
 build-aux/header-ifdef.pl                     | 182 -------
 build-aux/mock-noinline.pl                    |  75 ---
 build-aux/prohibit-duplicate-header.pl        |  26 -
 build-aux/syntax-check.mk                     |  32 +-
 docs/Makefile.am                              |  16 +-
 docs/genaclperms.pl                           | 125 -----
 docs/hvsupport.pl                             | 459 ----------------
 {docs => scripts}/apibuild.py                 |   0
 scripts/check-aclperms.py                     |  75 +++
 scripts/check-aclrules.py                     | 263 +++++++++
 scripts/check-driverimpls.py                  | 102 ++++
 scripts/check-drivername.py                   | 114 ++++
 scripts/check-file-access.py                  | 123 +++++
 scripts/check-remote-protocol.py              | 136 +++++
 scripts/check-spacing.py                      | 229 ++++++++
 scripts/check-symfile.py                      |  80 +++
 scripts/check-symsorting.py                   | 117 ++++
 scripts/dtrace2systemtap.py                   | 143 +++++
 {src/esx => scripts}/esx_vi_generator.py      |   0
 scripts/genaclperms.py                        | 123 +++++
 scripts/genpolkit.py                          | 122 +++++
 scripts/gensystemtap.py                       | 184 +++++++
 scripts/group-qemu-caps.py                    | 123 +++++
 scripts/header-ifdef.py                       | 231 ++++++++
 scripts/hvsupport.py                          | 504 ++++++++++++++++++
 .../hyperv_wmi_generator.py                   |   0
 scripts/mock-noinline.py                      |  85 +++
 scripts/prohibit-duplicate-header.py          |  56 ++
 {docs => scripts}/reformat-news.py            |   0
 scripts/test-wrap-argv.py                     | 170 ++++++
 src/Makefile.am                               | 146 ++---
 src/access/Makefile.inc.am                    |   6 +-
 src/access/genpolkit.pl                       | 119 -----
 src/admin/Makefile.inc.am                     |   6 +-
 src/check-aclperms.pl                         |  73 ---
 src/check-aclrules.pl                         | 252 ---------
 src/check-driverimpls.pl                      |  80 ---
 src/check-drivername.pl                       |  83 ---
 src/check-symfile.pl                          |  70 ---
 src/check-symsorting.pl                       | 106 ----
 src/dtrace2systemtap.pl                       | 130 -----
 src/esx/Makefile.inc.am                       |   6 +-
 src/hyperv/Makefile.inc.am                    |   5 +-
 src/rpc/Makefile.inc.am                       |   1 -
 src/rpc/gensystemtap.pl                       | 193 -------
 tests/Makefile.am                             |   3 +-
 tests/check-file-access.pl                    | 126 -----
 tests/file_access_whitelist.txt               |   2 +-
 tests/group-qemu-caps.pl                      | 124 -----
 tests/test-wrap-argv.pl                       | 174 ------
 tests/testutils.c                             |  16 +-
 53 files changed, 3092 insertions(+), 2755 deletions(-)
 delete mode 100755 build-aux/check-spacing.pl
 delete mode 100644 build-aux/header-ifdef.pl
 delete mode 100644 build-aux/mock-noinline.pl
 delete mode 100644 build-aux/prohibit-duplicate-header.pl
 delete mode 100755 docs/genaclperms.pl
 delete mode 100755 docs/hvsupport.pl
 rename {docs => scripts}/apibuild.py (100%)
 create mode 100755 scripts/check-aclperms.py
 create mode 100755 scripts/check-aclrules.py
 create mode 100755 scripts/check-driverimpls.py
 create mode 100644 scripts/check-drivername.py
 create mode 100755 scripts/check-file-access.py
 create mode 100644 scripts/check-remote-protocol.py
 create mode 100755 scripts/check-spacing.py
 create mode 100755 scripts/check-symfile.py
 create mode 100755 scripts/check-symsorting.py
 create mode 100755 scripts/dtrace2systemtap.py
 rename {src/esx => scripts}/esx_vi_generator.py (100%)
 create mode 100755 scripts/genaclperms.py
 create mode 100755 scripts/genpolkit.py
 create mode 100755 scripts/gensystemtap.py
 create mode 100755 scripts/group-qemu-caps.py
 create mode 100644 scripts/header-ifdef.py
 create mode 100755 scripts/hvsupport.py
 rename {src/hyperv => scripts}/hyperv_wmi_generator.py (100%)
 create mode 100644 scripts/mock-noinline.py
 create mode 100644 scripts/prohibit-duplicate-header.py
 rename {docs => scripts}/reformat-news.py (100%)
 create mode 100755 scripts/test-wrap-argv.py
 delete mode 100755 src/access/genpolkit.pl
 delete mode 100755 src/check-aclperms.pl
 delete mode 100755 src/check-aclrules.pl
 delete mode 100755 src/check-driverimpls.pl
 delete mode 100755 src/check-drivername.pl
 delete mode 100755 src/check-symfile.pl
 delete mode 100755 src/check-symsorting.pl
 delete mode 100755 src/dtrace2systemtap.pl
 delete mode 100755 src/rpc/gensystemtap.pl
 delete mode 100755 tests/check-file-access.pl
 delete mode 100755 tests/group-qemu-caps.pl
 delete mode 100755 tests/test-wrap-argv.pl

-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python
Posted by Cole Robinson 5 years ago
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote:
> This series is an effort to reduce the number of different
> languages we use by eliminating most use of perl in favour
> of python.

I'm testing the series now. On fedora 31, make syntax-check is showing
some flake8 errors, see attached. I also attach a run of pycodestyle and
pylint using my standard configs. There's nothing that looks like a
legitimate bug in any of the output, though I didn't look too closely at
the overridden variable warnings

- Cole
.ycm_extra_conf.py.in:44: [E302] expected 2 blank lines, found 1
.ycm_extra_conf.py.in:45: [E111] indentation is not a multiple of four
.ycm_extra_conf.py.in:45: [E201] whitespace after '{'
.ycm_extra_conf.py.in:45: [E202] whitespace before '}'
scripts/check-symsorting.py:62: [E226] missing whitespace around arithmetic operator
scripts/check-symsorting.py:62: [E226] missing whitespace around arithmetic operator
scripts/check-symsorting.py:63: [E226] missing whitespace around arithmetic operator
scripts/check-symsorting.py:63: [E226] missing whitespace around arithmetic operator
scripts/check-spacing.py:139: [W503] line break before binary operator
************* Module .ycm_extra_conf.py
.ycm_extra_conf.py.in:45:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
.ycm_extra_conf.py.in:44:17: W0613: Unused argument 'filename' (unused-argument)
.ycm_extra_conf.py.in:44:0: W0613: Unused argument 'kwargs' (unused-argument)
************* Module dtrace2systemtap
scripts/dtrace2systemtap.py:126:8: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
************* Module mock-noinline
scripts/mock-noinline.py:35:21: W0621: Redefining name 'filename' from outer scope (line 70) (redefined-outer-name)
scripts/mock-noinline.py:37:8: W0621: Redefining name 'func' from outer scope (line 77) (redefined-outer-name)
scripts/mock-noinline.py:55:19: W0621: Redefining name 'filename' from outer scope (line 70) (redefined-outer-name)
************* Module check-aclrules
scripts/check-aclrules.py:60:2: W0511: XXX this vzDomainMigrateConfirm3Params looks (fixme)
scripts/check-aclrules.py:136:17: W0621: Redefining name 'filename' from outer scope (line 259) (redefined-outer-name)
scripts/check-aclrules.py:145:32: W0621: Redefining name 'fh' from outer scope (line 114) (redefined-outer-name)
scripts/check-aclrules.py:147:12: W0621: Redefining name 'line' from outer scope (line 118) (redefined-outer-name)
scripts/check-aclrules.py:153:16: W0621: Redefining name 'm' from outer scope (line 126) (redefined-outer-name)
scripts/check-aclrules.py:218:20: W0621: Redefining name 'api' from outer scope (line 128) (redefined-outer-name)
scripts/check-aclrules.py:174:34: E1305: Too many arguments for format string (too-many-format-args)
scripts/check-aclrules.py:193:34: E1305: Too many arguments for format string (too-many-format-args)
scripts/check-aclrules.py:228:34: E1305: Too many arguments for format string (too-many-format-args)
scripts/check-aclrules.py:235:34: E1305: Too many arguments for format string (too-many-format-args)
************* Module check-symsorting
scripts/check-symsorting.py:30:18: W0621: Redefining name 'group' from outer scope (line 84) (redefined-outer-name)
scripts/check-symsorting.py:30:25: W0621: Redefining name 'symfile' from outer scope (line 80) (redefined-outer-name)
scripts/check-symsorting.py:30:34: W0621: Redefining name 'line' from outer scope (line 87) (redefined-outer-name)
scripts/check-symsorting.py:30:40: W0621: Redefining name 'groupfile' from outer scope (line 83) (redefined-outer-name)
scripts/check-symsorting.py:30:51: W0621: Redefining name 'lastgroup' from outer scope (line 79) (redefined-outer-name)
scripts/check-symsorting.py:53:4: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
scripts/check-symsorting.py:95:19: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/check-symsorting.py:110:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
************* Module header-ifdef
scripts/header-ifdef.py:66:17: W0621: Redefining name 'filename' from outer scope (line 221) (redefined-outer-name)
scripts/header-ifdef.py:104:16: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/header-ifdef.py:164:16: W0104: Statement seems to have no effect (pointless-statement)
scripts/header-ifdef.py:174:4: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/header-ifdef.py:199:8: R1705: Unnecessary "else" after "return" (no-else-return)
************* Module augeas-gentest
scripts/augeas-gentest.py:35:18: W0621: Redefining name 'config' from outer scope (line 31) (redefined-outer-name)
scripts/augeas-gentest.py:56:20: W0621: Redefining name 'template' from outer scope (line 32) (redefined-outer-name)
scripts/augeas-gentest.py:56:30: W0621: Redefining name 'config' from outer scope (line 31) (redefined-outer-name)
************* Module prohibit-duplicate-header
scripts/prohibit-duplicate-header.py:33:0: C0301: Line too long (82/80) (line-too-long)
scripts/prohibit-duplicate-header.py:25:15: W0621: Redefining name 'filename' from outer scope (line 49) (redefined-outer-name)
************* Module check-remote-protocol
scripts/check-remote-protocol.py:59:11: W0612: Unused variable 'fname' (unused-variable)
scripts/check-remote-protocol.py:83:4: W0715: Exception arguments suggest string formatting might be intended (raising-format-tuple)
************* Module check-spacing
scripts/check-spacing.py:28:21: W0621: Redefining name 'filename' from outer scope (line 225) (redefined-outer-name)
************* Module hyperv_wmi_generator
scripts/hyperv_wmi_generator.py:144:0: C0301: Line too long (84/80) (line-too-long)
scripts/hyperv_wmi_generator.py:147:0: C0301: Line too long (82/80) (line-too-long)
scripts/hyperv_wmi_generator.py:214:0: C0301: Line too long (99/80) (line-too-long)
scripts/hyperv_wmi_generator.py:226:0: C0301: Line too long (88/80) (line-too-long)
scripts/hyperv_wmi_generator.py:227:0: C0301: Line too long (84/80) (line-too-long)
scripts/hyperv_wmi_generator.py:263:0: C0301: Line too long (81/80) (line-too-long)
scripts/hyperv_wmi_generator.py:295:0: C0301: Line too long (81/80) (line-too-long)
scripts/hyperv_wmi_generator.py:311:0: C0301: Line too long (89/80) (line-too-long)
scripts/hyperv_wmi_generator.py:367:0: C0301: Line too long (81/80) (line-too-long)
scripts/hyperv_wmi_generator.py:371:0: C0301: Line too long (81/80) (line-too-long)
scripts/hyperv_wmi_generator.py:374:0: C0301: Line too long (103/80) (line-too-long)
scripts/hyperv_wmi_generator.py:440:0: C0301: Line too long (86/80) (line-too-long)
scripts/hyperv_wmi_generator.py:443:0: C0301: Line too long (106/80) (line-too-long)
scripts/hyperv_wmi_generator.py:444:0: C0301: Line too long (99/80) (line-too-long)
scripts/hyperv_wmi_generator.py:445:0: C0301: Line too long (99/80) (line-too-long)
scripts/hyperv_wmi_generator.py:120:16: W0622: Redefining built-in 'property' (redefined-builtin)
scripts/hyperv_wmi_generator.py:164:16: W0622: Redefining built-in 'property' (redefined-builtin)
scripts/hyperv_wmi_generator.py:350:23: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/hyperv_wmi_generator.py:359:8: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/hyperv_wmi_generator.py:366:8: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/hyperv_wmi_generator.py:459:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
************* Module check-driverimpls
scripts/check-driverimpls.py:26:21: W0621: Redefining name 'filename' from outer scope (line 99) (redefined-outer-name)
scripts/check-driverimpls.py:57:34: E1305: Too many arguments for format string (too-many-format-args)
scripts/check-driverimpls.py:80:30: E1305: Too many arguments for format string (too-many-format-args)
************* Module test-wrap-argv
scripts/test-wrap-argv.py:45:4: W0621: Redefining name 'args' from outer scope (line 161) (redefined-outer-name)
scripts/test-wrap-argv.py:100:11: W0621: Redefining name 'filename' from outer scope (line 164) (redefined-outer-name)
scripts/test-wrap-argv.py:107:7: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
************* Module reformat-news
scripts/reformat-news.py:59:7: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
************* Module gensystemtap
scripts/gensystemtap.py:162:8: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/gensystemtap.py:37:14: W0621: Redefining name 'fh' from outer scope (line 91) (redefined-outer-name)
scripts/gensystemtap.py:95:27: W0621: Redefining name 'types' from outer scope (line 32) (redefined-outer-name)
scripts/gensystemtap.py:99:4: W0621: Redefining name 'first' from outer scope (line 128) (redefined-outer-name)
scripts/gensystemtap.py:101:8: W0621: Redefining name 'cond' from outer scope (line 130) (redefined-outer-name)
************* Module hvsupport
scripts/hvsupport.py:251:0: C0301: Line too long (81/80) (line-too-long)
scripts/hvsupport.py:284:0: C0301: Line too long (83/80) (line-too-long)
scripts/hvsupport.py:297:0: C0301: Line too long (82/80) (line-too-long)
scripts/hvsupport.py:75:4: W0621: Redefining name 'files' from outer scope (line 58) (redefined-outer-name)
scripts/hvsupport.py:77:27: W0621: Redefining name 'fh' from outer scope (line 230) (redefined-outer-name)
scripts/hvsupport.py:78:12: W0621: Redefining name 'line' from outer scope (line 231) (redefined-outer-name)
scripts/hvsupport.py:83:7: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/hvsupport.py:92:4: W0621: Redefining name 'vers' from outer scope (line 302) (redefined-outer-name)
scripts/hvsupport.py:97:27: W0621: Redefining name 'fh' from outer scope (line 230) (redefined-outer-name)
scripts/hvsupport.py:98:12: W0621: Redefining name 'line' from outer scope (line 231) (redefined-outer-name)
scripts/hvsupport.py:136:16: W0621: Redefining name 'name' from outer scope (line 245) (redefined-outer-name)
scripts/hvsupport.py:130:36: E1305: Too many arguments for format string (too-many-format-args)
scripts/hvsupport.py:457:16: W0621: Redefining name 'field' from outer scope (line 246) (redefined-outer-name)
************* Module esx_vi_generator
scripts/esx_vi_generator.py:136:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:231:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:234:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:299:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:323:0: C0301: Line too long (84/80) (line-too-long)
scripts/esx_vi_generator.py:339:0: C0301: Line too long (84/80) (line-too-long)
scripts/esx_vi_generator.py:347:0: C0301: Line too long (91/80) (line-too-long)
scripts/esx_vi_generator.py:351:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:354:0: C0301: Line too long (86/80) (line-too-long)
scripts/esx_vi_generator.py:362:0: C0301: Line too long (98/80) (line-too-long)
scripts/esx_vi_generator.py:366:0: C0301: Line too long (88/80) (line-too-long)
scripts/esx_vi_generator.py:369:0: C0301: Line too long (93/80) (line-too-long)
scripts/esx_vi_generator.py:372:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:663:0: C0301: Line too long (85/80) (line-too-long)
scripts/esx_vi_generator.py:666:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:670:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:706:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:785:0: C0301: Line too long (85/80) (line-too-long)
scripts/esx_vi_generator.py:799:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:839:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:963:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:964:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:966:0: C0301: Line too long (88/80) (line-too-long)
scripts/esx_vi_generator.py:970:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:1020:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:1076:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:1087:0: C0301: Line too long (84/80) (line-too-long)
scripts/esx_vi_generator.py:1119:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:1332:0: C0301: Line too long (94/80) (line-too-long)
scripts/esx_vi_generator.py:1333:0: C0301: Line too long (96/80) (line-too-long)
scripts/esx_vi_generator.py:1334:0: C0301: Line too long (104/80) (line-too-long)
scripts/esx_vi_generator.py:1335:0: C0301: Line too long (108/80) (line-too-long)
scripts/esx_vi_generator.py:1336:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:1337:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:1338:0: C0301: Line too long (91/80) (line-too-long)
scripts/esx_vi_generator.py:1339:0: C0301: Line too long (91/80) (line-too-long)
scripts/esx_vi_generator.py:1340:0: C0301: Line too long (94/80) (line-too-long)
scripts/esx_vi_generator.py:1341:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:1342:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:1401:0: C0301: Line too long (81/80) (line-too-long)
scripts/esx_vi_generator.py:1416:0: C0301: Line too long (84/80) (line-too-long)
scripts/esx_vi_generator.py:1418:0: C0301: Line too long (88/80) (line-too-long)
scripts/esx_vi_generator.py:1419:0: C0301: Line too long (82/80) (line-too-long)
scripts/esx_vi_generator.py:1428:0: C0301: Line too long (85/80) (line-too-long)
scripts/esx_vi_generator.py:1519:0: C0301: Line too long (82/80) (line-too-long)
scripts/esx_vi_generator.py:1660:0: C0301: Line too long (83/80) (line-too-long)
scripts/esx_vi_generator.py:1661:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:1677:0: C0301: Line too long (87/80) (line-too-long)
scripts/esx_vi_generator.py:1678:0: C0301: Line too long (98/80) (line-too-long)
scripts/esx_vi_generator.py:1441:8: W0622: Redefining built-in 'property' (redefined-builtin)
scripts/esx_vi_generator.py:54:23: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/esx_vi_generator.py:81:23: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/esx_vi_generator.py:81:29: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:97:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:91:8: R1720: Unnecessary "elif" after "raise" (no-else-raise)
scripts/esx_vi_generator.py:116:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:112:8: R1720: Unnecessary "else" after "raise" (no-else-raise)
scripts/esx_vi_generator.py:124:8: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/esx_vi_generator.py:131:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:143:8: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:163:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:176:23: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:182:12: W0621: Redefining name 'parameter' from outer scope (line 1394) (redefined-outer-name)
scripts/esx_vi_generator.py:195:16: W0621: Redefining name 'parameter' from outer scope (line 1394) (redefined-outer-name)
scripts/esx_vi_generator.py:192:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:225:16: W0621: Redefining name 'parameter' from outer scope (line 1394) (redefined-outer-name)
scripts/esx_vi_generator.py:222:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:274:23: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/esx_vi_generator.py:274:29: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:283:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:280:8: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/esx_vi_generator.py:288:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:296:12: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/esx_vi_generator.py:307:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:316:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:332:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:346:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:361:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:376:8: R1705: Unnecessary "elif" after "return" (no-else-return)
scripts/esx_vi_generator.py:387:29: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:399:8: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:405:8: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:419:23: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:429:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:431:52: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:435:11: E1101: Instance of 'GenericObject' has no 'extended_by' member (no-member)
scripts/esx_vi_generator.py:436:31: E1101: Instance of 'GenericObject' has no 'extended_by' member (no-member)
scripts/esx_vi_generator.py:456:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:463:12: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:455:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:456:47: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:460:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:463:24: E1101: Instance of 'GenericObject' has no 'properties' member (no-member)
scripts/esx_vi_generator.py:466:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:466:15: E1101: Instance of 'GenericObject' has no 'properties' member (no-member)
scripts/esx_vi_generator.py:485:16: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:474:11: E1101: Instance of 'GenericObject' has no 'extended_by' member (no-member)
scripts/esx_vi_generator.py:480:31: E1101: Instance of 'GenericObject' has no 'extended_by' member (no-member)
scripts/esx_vi_generator.py:484:31: E1101: Instance of 'GenericObject' has no 'extended_by' member (no-member)
scripts/esx_vi_generator.py:494:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:503:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:505:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:493:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:494:47: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:497:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:500:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:500:15: E1101: Instance of 'GenericObject' has no 'properties' member (no-member)
scripts/esx_vi_generator.py:505:28: E1101: Instance of 'GenericObject' has no 'properties' member (no-member)
scripts/esx_vi_generator.py:508:15: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:519:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:528:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:530:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:518:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:519:47: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:522:11: E1101: Instance of 'GenericObject' has no 'extends' member (no-member)
scripts/esx_vi_generator.py:525:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:525:15: E1101: Instance of 'GenericObject' has no 'properties' member (no-member)
scripts/esx_vi_generator.py:530:28: E1101: Instance of 'GenericObject' has no 'properties' member (no-member)
scripts/esx_vi_generator.py:533:15: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:542:23: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:567:16: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:576:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:585:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:587:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:582:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:590:15: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:601:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:610:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:607:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:619:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:628:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:625:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:881:23: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:896:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:905:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:907:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:902:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:910:15: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:921:12: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:930:12: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:932:16: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:927:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:935:15: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:1063:23: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:1142:21: W0621: Redefining name 'string' from outer scope (line 1677) (redefined-outer-name)
scripts/esx_vi_generator.py:1146:17: W0621: Redefining name 'block' from outer scope (line 1350) (redefined-outer-name)
scripts/esx_vi_generator.py:1160:4: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:1171:8: W0621: Redefining name 'line' from outer scope (line 1354) (redefined-outer-name)
scripts/esx_vi_generator.py:1184:4: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/esx_vi_generator.py:1190:15: W0621: Redefining name 'block' from outer scope (line 1350) (redefined-outer-name)
scripts/esx_vi_generator.py:1199:4: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:1203:8: W0621: Redefining name 'line' from outer scope (line 1354) (redefined-outer-name)
scripts/esx_vi_generator.py:1210:17: W0621: Redefining name 'block' from outer scope (line 1350) (redefined-outer-name)
scripts/esx_vi_generator.py:1219:4: W0621: Redefining name 'name' from outer scope (line 1617) (redefined-outer-name)
scripts/esx_vi_generator.py:1231:8: W0621: Redefining name 'line' from outer scope (line 1354) (redefined-outer-name)
scripts/esx_vi_generator.py:1247:18: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/esx_vi_generator.py:1362:7: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/esx_vi_generator.py:1499:22: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
scripts/esx_vi_generator.py:1505:8: W0621: Redefining name 'property' from outer scope (line 1441) (redefined-outer-name)
scripts/esx_vi_generator.py:1530:21: W0621: Redefining name 'obj' from outer scope (line 1375) (redefined-outer-name)
************* Module apibuild
scripts/apibuild.py:29:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:43:0: C0301: Line too long (90/80) (line-too-long)
scripts/apibuild.py:44:0: C0301: Line too long (86/80) (line-too-long)
scripts/apibuild.py:96:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:110:0: C0301: Line too long (87/80) (line-too-long)
scripts/apibuild.py:234:0: C0301: Line too long (86/80) (line-too-long)
scripts/apibuild.py:266:0: C0301: Line too long (108/80) (line-too-long)
scripts/apibuild.py:523:0: C0301: Line too long (83/80) (line-too-long)
scripts/apibuild.py:839:0: C0301: Line too long (89/80) (line-too-long)
scripts/apibuild.py:912:0: C0301: Line too long (87/80) (line-too-long)
scripts/apibuild.py:960:0: C0301: Line too long (90/80) (line-too-long)
scripts/apibuild.py:961:0: C0301: Line too long (108/80) (line-too-long)
scripts/apibuild.py:964:0: C0301: Line too long (96/80) (line-too-long)
scripts/apibuild.py:966:0: C0301: Line too long (96/80) (line-too-long)
scripts/apibuild.py:1247:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:1252:0: C0301: Line too long (83/80) (line-too-long)
scripts/apibuild.py:1297:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:1302:0: C0301: Line too long (83/80) (line-too-long)
scripts/apibuild.py:1361:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:1433:0: C0301: Line too long (82/80) (line-too-long)
scripts/apibuild.py:1561:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:1570:0: C0301: Line too long (82/80) (line-too-long)
scripts/apibuild.py:1592:0: C0301: Line too long (82/80) (line-too-long)
scripts/apibuild.py:1719:0: C0301: Line too long (82/80) (line-too-long)
scripts/apibuild.py:1935:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:1949:0: C0301: Line too long (85/80) (line-too-long)
scripts/apibuild.py:1957:0: C0301: Line too long (85/80) (line-too-long)
scripts/apibuild.py:2066:0: C0301: Line too long (122/80) (line-too-long)
scripts/apibuild.py:2172:0: C0301: Line too long (91/80) (line-too-long)
scripts/apibuild.py:2180:0: C0301: Line too long (99/80) (line-too-long)
scripts/apibuild.py:2205:0: C0301: Line too long (119/80) (line-too-long)
scripts/apibuild.py:2217:0: C0301: Line too long (83/80) (line-too-long)
scripts/apibuild.py:2259:0: C0301: Line too long (88/80) (line-too-long)
scripts/apibuild.py:2260:0: C0301: Line too long (90/80) (line-too-long)
scripts/apibuild.py:2270:0: C0301: Line too long (105/80) (line-too-long)
scripts/apibuild.py:2272:0: C0301: Line too long (108/80) (line-too-long)
scripts/apibuild.py:2274:0: C0301: Line too long (121/80) (line-too-long)
scripts/apibuild.py:2278:0: C0301: Line too long (87/80) (line-too-long)
scripts/apibuild.py:2293:0: C0301: Line too long (85/80) (line-too-long)
scripts/apibuild.py:2436:0: C0301: Line too long (86/80) (line-too-long)
scripts/apibuild.py:2462:0: C0301: Line too long (81/80) (line-too-long)
scripts/apibuild.py:2519:0: C0301: Line too long (106/80) (line-too-long)
scripts/apibuild.py:2540:0: C0301: Line too long (83/80) (line-too-long)
scripts/apibuild.py:415:2: W0511: TODO: do the same for variables. (fixme)
scripts/apibuild.py:988:2: W0511: TODO macros with arguments (fixme)
scripts/apibuild.py:1145:2: W0511: TODO report missing or misformatted comments (fixme)
scripts/apibuild.py:2056:2: W0511: TODO: generalize this a bit (fixme)
scripts/apibuild.py:141:55: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:151:35: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:179:23: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:195:35: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:227:37: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:266:52: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:289:48: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:320:16: E1121: Too many positional arguments for method call (too-many-function-args)
scripts/apibuild.py:328:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:401:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:417:27: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:417:33: W0622: Redefining built-in 'dict' (redefined-builtin)
scripts/apibuild.py:421:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:443:23: W0622: Redefining built-in 'input' (redefined-builtin)
scripts/apibuild.py:512:16: W0201: Attribute 'last' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:537:16: W0201: Attribute 'last' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:541:16: W0201: Attribute 'last' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:602:8: W0201: Attribute 'last' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:640:46: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:648:50: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:735:37: W0621: Redefining name 'quiet' from outer scope (line 18) (redefined-outer-name)
scripts/apibuild.py:771:38: W0621: Redefining name 'quiet' from outer scope (line 18) (redefined-outer-name)
scripts/apibuild.py:801:14: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:820:19: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:824:14: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:827:14: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:829:18: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:848:54: W0621: Redefining name 'quiet' from outer scope (line 18) (redefined-outer-name)
scripts/apibuild.py:882:14: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:901:19: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:914:14: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:917:14: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:935:22: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:937:26: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
scripts/apibuild.py:1103:20: W0612: Unused variable 'info' (unused-variable)
scripts/apibuild.py:1127:8: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:1176:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
scripts/apibuild.py:1698:20: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:1899:8: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:1859:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
scripts/apibuild.py:1891:8: R1705: Unnecessary "else" after "return" (no-else-return)
scripts/apibuild.py:1221:16: W0201: Attribute 'struct_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1260:8: W0201: Attribute 'struct_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1502:8: W0201: Attribute 'struct_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1241:28: W0201: Attribute 'union_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1276:16: W0201: Attribute 'union_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1310:8: W0201: Attribute 'union_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1503:8: W0201: Attribute 'union_fields' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1259:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1309:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1501:8: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1511:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1513:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1518:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1520:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1526:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1534:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1541:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1543:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1547:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1549:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1559:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1562:20: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1571:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1581:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1583:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1593:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1603:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1605:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1664:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1666:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1675:12: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1682:12: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1685:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1690:12: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1694:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1700:20: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1718:16: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1720:20: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1724:24: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1727:20: W0201: Attribute 'type' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1319:8: W0201: Attribute 'enums' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1606:12: W0201: Attribute 'enums' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1504:8: W0201: Attribute 'signature' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1747:12: W0201: Attribute 'signature' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1771:8: W0201: Attribute 'signature' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1900:8: W0201: Attribute 'name' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:1975:24: W0201: Attribute 'name' defined outside __init__ (attribute-defined-outside-init)
scripts/apibuild.py:2000:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
scripts/apibuild.py:2000:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
scripts/apibuild.py:2029:26: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2029:30: W0622: Redefining built-in 'str' (redefined-builtin)
scripts/apibuild.py:2111:13: E1136: Value 'module' is unsubscriptable (unsubscriptable-object)
scripts/apibuild.py:2116:8: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2124:26: W0123: Use of eval (eval-used)
scripts/apibuild.py:2144:8: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2186:8: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2225:8: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2234:8: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2284:8: W0622: Redefining built-in 'dict' (redefined-builtin)
scripts/apibuild.py:2299:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2331:12: W0622: Redefining built-in 'dict' (redefined-builtin)
scripts/apibuild.py:2338:16: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2341:8: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/apibuild.py:2346:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2359:12: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:2348:17: W0612: Unused variable 'ret' (unused-variable)
scripts/apibuild.py:2348:30: W0612: Unused variable 'desc' (unused-variable)
scripts/apibuild.py:2375:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2387:12: W0622: Redefining built-in 'type' (redefined-builtin)
scripts/apibuild.py:2377:22: W0612: Unused variable 'params' (unused-variable)
scripts/apibuild.py:2377:30: W0612: Unused variable 'desc' (unused-variable)
scripts/apibuild.py:2399:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2411:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2420:8: W0621: Redefining name 'index' from outer scope (line 246) (redefined-outer-name)
scripts/apibuild.py:2427:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/apibuild.py:2576:8: E1120: No value for argument 'filename' in unbound method call (no-value-for-parameter)
scripts/apibuild.py:2578:8: E1120: No value for argument 'name' in unbound method call (no-value-for-parameter)
scripts/apibuild.py:2579:8: E1120: No value for argument 'name' in unbound method call (no-value-for-parameter)
scripts/apibuild.py:2580:8: E1120: No value for argument 'name' in unbound method call (no-value-for-parameter)
scripts/apibuild.py:2581:8: E1120: No value for argument 'name' in unbound method call (no-value-for-parameter)
finding files
running pycodestyle-3
running pylint-3
/home/crobinso/src/libvirt/scripts/check-aclrules.py:223:25: E129 visually indented line with same indent as next logical line
                        table != "virStateDriver"):
                        ^
/home/crobinso/src/libvirt/scripts/check-aclrules.py:226:5: E129 visually indented line with same indent as next logical line
                            impl not in implwhitelist):
    ^
/home/crobinso/src/libvirt/scripts/check-driverimpls.py:91:33: E127 continuation line over-indented for visual indent
                                "virConnectDriver"]:
                                ^
/home/crobinso/src/libvirt/scripts/check-file-access.py:98:13: E129 visually indented line with same indent as next logical line
            not re.search("^" + rule["action"], file["action"])):
            ^
/home/crobinso/src/libvirt/scripts/check-file-access.py:102:13: E129 visually indented line with same indent as next logical line
            not re.search("^" + rule["progname"], file["progname"])):
            ^
/home/crobinso/src/libvirt/scripts/check-file-access.py:107:13: E129 visually indented line with same indent as next logical line
            not re.search("^" + rule["testname"], file["testname"])):
            ^
/home/crobinso/src/libvirt/scripts/check-spacing.py:139:17: W503 line break before binary operator
                or whitespaceprog3.match(data)):
                ^
/home/crobinso/src/libvirt/scripts/check-spacing.py:139:17: E129 visually indented line with same indent as next logical line
                or whitespaceprog3.match(data)):
                ^
/home/crobinso/src/libvirt/scripts/check-spacing.py:207:17: E129 visually indented line with same indent as next logical line
                cb_scolon):
                ^
/home/crobinso/src/libvirt/scripts/check-symsorting.py:62:35: E226 missing whitespace around arithmetic operator
        actual = group[first:(last-first+1)]
                                  ^
/home/crobinso/src/libvirt/scripts/check-symsorting.py:62:41: E226 missing whitespace around arithmetic operator
        actual = group[first:(last-first+1)]
                                        ^
/home/crobinso/src/libvirt/scripts/check-symsorting.py:63:41: E226 missing whitespace around arithmetic operator
        expect = sortedgroup[first:(last-first+1)]
                                        ^
/home/crobinso/src/libvirt/scripts/check-symsorting.py:63:47: E226 missing whitespace around arithmetic operator
        expect = sortedgroup[first:(last-first+1)]
                                              ^
/home/crobinso/src/libvirt/scripts/header-ifdef.py:77:9: E129 visually indented line with same indent as next logical line
        filename.find("libvirt_internal.h") != -1):
        ^
/home/crobinso/src/libvirt/scripts/hvsupport.py:66:5: E129 visually indented line with same indent as next logical line
            file.endswith("udev.c")):
    ^
/home/crobinso/src/libvirt/scripts/hvsupport.py:337:25: E129 visually indented line with same indent as next logical line
                        api == "domainMigratePrepare3"):
                        ^
/home/crobinso/src/libvirt/scripts/hvsupport.py:339:5: E129 visually indented line with same indent as next logical line
                            groups[ingrp]["drivers"][impl]):

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python
Posted by Daniel P. Berrangé 5 years ago
On Fri, Nov 15, 2019 at 03:07:32PM -0500, Cole Robinson wrote:
> On 11/11/19 9:38 AM, Daniel P. Berrangé wrote:
> > This series is an effort to reduce the number of different
> > languages we use by eliminating most use of perl in favour
> > of python.
> 
> I'm testing the series now. On fedora 31, make syntax-check is showing
> some flake8 errors, see attached. I also attach a run of pycodestyle and
> pylint using my standard configs. There's nothing that looks like a
> legitimate bug in any of the output, though I didn't look too closely at
> the overridden variable warnings

The obvious errors here these ones:

> scripts/check-aclrules.py:174:34: E1305: Too many arguments for format string (too-many-format-args)
> scripts/check-aclrules.py:193:34: E1305: Too many arguments for format string (too-many-format-args)
> scripts/check-aclrules.py:228:34: E1305: Too many arguments for format string (too-many-format-args)
> scripts/check-aclrules.py:235:34: E1305: Too many arguments for format string (too-many-format-args)

> scripts/check-driverimpls.py:57:34: E1305: Too many arguments for format string (too-many-format-args)
> scripts/check-driverimpls.py:80:30: E1305: Too many arguments for format string (too-many-format-args)

> scripts/hvsupport.py:130:36: E1305: Too many arguments for format string (too-many-format-args)

all were in exception formatting where we broke the message across
lines - % binds more strongly than +

So

   "foo %s bar" +
   "wizz" % "eek"

Needs to be

   ("foo %s bar" +
    "wizz") % "eek"



Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python
Posted by Cole Robinson 5 years ago
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote:
> This series is an effort to reduce the number of different
> languages we use by eliminating most use of perl in favour
> of python.
> 

I tested all the new scripts, see individual mails. I didn't really
'review' any of them; since many are just direct conversions from the
old scripts, it's unclear if it's worth the effort of doing a full
review. I think testing is reasonable grounds for pushing to git

Thanks,
Cole

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list