[PATCH 00/10] scripts: fix nearly all flake8 style violations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We recently introduced flake8 to check for bogus semicolon at the end of
line in python code. It can check for sooo much more than this. In
general it is desirable to comply with as much as possible, since this
results in python code that is more consistent in style to that seen in
other projects. Thus the goal was to enable everything. At the end there
are only two flake8 warnings that are surpressed. The line length one
leads to horrible code which I felt cannot be justified. The knuth line
break / operators one which I felt was of dubious value and though I
wouldn't object if someone wanted todo the work to address it.

Daniel P. Berrangé (10):
  docs: remove some dead code in apibuild.py
  build: change flake8 to use blacklist instead of whitelist
  python: fix use of undeclared variables in python scripts
  python: mark regex strings with 'r' prefix
  python: avoid variable named 'l'
  python: avoid bare 'except:' clause
  python: sanitize blank line usage
  python: sanitize spaces either side of operators
  python: sanitize indentation after line continuations
  build: comment on why we're not adopting certain flake8 rules

 build-aux/syntax-check.mk          |  15 +-
 docs/apibuild.py                   | 446 ++++++++++++++---------------
 docs/reformat-news.py              |   1 +
 src/esx/esx_vi_generator.py        | 237 ++++++---------
 src/hyperv/hyperv_wmi_generator.py |  29 +-
 tests/cputestdata/cpu-cpuid.py     |   5 +-
 6 files changed, 326 insertions(+), 407 deletions(-)

-- 
2.21.0

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux