Re: [PATCH 00/13] Fix some issues found by flake8

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

 





On Sat, Aug 4, 2018 at 12:47 PM, Nicolas Iooss <nicolas.iooss@xxxxxxx> wrote:
Hi,

I have been working on a script which uses flake8 to discover issues in
Python code. This led me to discover several issues which are fixed by
these patches. Distribution maintainers might be interested in
backporting some of them (at least patches 5 and 10 and probably the
ones which fix usage of undefined variables).

As Travis-CI is experiencing issues today (it fails to launch new
builds), I have not been able to test the integration of my script with
Travis-CI yet. Once it works again I will submit this script too.

Thanks,
Nicolas

---
Here comes the description generated by "git format-patch --cover":

Nicolas Iooss (13):
  libselinux: fix flake8 warnings in SWIG-generated code
  python/sepolgen: do not import twice the modules
  python/sepolgen: return NotImplemented instead of raising it
  python/sepolicy: drop unused CheckPolicyType
  python/sepolicy: use lowercase variable name
  python/sepolgen: fix refpolicy parsing of "permissive"
  python/sepolgen: silence linter warning about has_key

This is the only one I don't particularly like: 
  python/sepolgen: comment buggy code

If we choose to comment out it out, a block comment explaining why would be
helpful or just delete it if it is dead code.

   python/sepolgen: use self when accessing members in FilesystemUse
  python/sepolicy: fix "procotol" misspelling
  python/sepolicy: use variables which exists in the gui.py
  python/sepolicy: do not import sepolicy.generate.DAEMON twice
  python/sepolicy: do not import types

 libselinux/src/selinuxswig_python.i        |  5 +++--
 python/sepolgen/src/sepolgen/interfaces.py | 10 +++++-----
 python/sepolgen/src/sepolgen/refparser.py  |  4 ++--
 python/sepolgen/src/sepolgen/refpolicy.py  |  6 +++---
 python/sepolgen/src/sepolgen/util.py       |  6 +-----
 python/sepolicy/sepolicy.py                | 12 +-----------
 python/sepolicy/sepolicy/generate.py       |  1 -
 python/sepolicy/sepolicy/gui.py            | 12 ++++++------
 8 files changed, 21 insertions(+), 35 deletions(-)

--
2.18.0

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux