Skip to content

selftests: openvswitch: pylint cleanup of ovs-dpctl.py

Minxi Hou linux-kselftest netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyIn review
  2. v14 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Rewrote patch 3/4 (docstrings). In v2 many of the added docstrings were shifted by one method and described the wrong operation (e.g. OvsDatapath.create carried "Destroy a datapath."). Every docstring is now derived from the method it documents.
- Dropped the ctact -> CtAct class rename and the parsed_len -> parsedLen variable rename that had leaked into patches 2/4 and 3/4. Class and variable names now stay as upstream has them; the corresponding invalid-name warnings are covered by the module-level disable in patch 4/4 instead.
- Moved three hunks to the patches they belong to: one f-string conversion went to patch 1/4, the bare-except fix and the two @staticmethod decorators went to patch 2/4 (the v2 patch 2/4 changelog claimed the except fix but the hunk itself sat in 3/4).
- Rebased onto ab217fbb9b21 ("Merge branch 'net-sysfs-use-ops-lock- for-speed-and-duplex'") to resolve the pw-ci contest conflict.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests: openvswitch: convert %-formatting to f-stringstools/testing/selftests/net/openvswitch/ovs-dpctl.py+121 -1480 replies
2/4selftests: openvswitch: fix misc pylint warnings in ovs-dpctl.pytools/testing/selftests/net/openvswitch/ovs-dpctl.py+22 -260 replies
3/4selftests: openvswitch: add missing docstrings in ovs-dpctl.pytools/testing/selftests/net/openvswitch/ovs-dpctl.py+87 -01 reply
4/4selftests: openvswitch: suppress pylint complexity warningstools/testing/selftests/net/openvswitch/ovs-dpctl.py+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net-next v3 0/4] selftests: openvswitch: pylint cleanup of ovs-dpctl.py

Hi,

This is a respin of the ovs-dpctl.py pylint cleanup series. The series raises the pylint score of ovs-dpctl.py from 7.69 to 10.00. Each patch targets one warning class and makes no behavior change.

v2 -> v3:
- Rewrote patch 3/4 (docstrings). In v2 many of the added docstrings were shifted by one method and described the wrong operation (e.g. OvsDatapath.create carried "Destroy a datapath."). Every docstring is now derived from the method it documents.
- Dropped the ctact -> CtAct class rename and the parsed_len -> parsedLen variable rename that had leaked into patches 2/4 and 3/4. Class and variable names now stay as upstream has them; the corresponding invalid-name warnings are covered by the module-level disable in patch 4/4 instead.
- Moved three hunks to the patches they belong to: one f-string conversion went to patch 1/4, the bare-except fix and the two @staticmethod decorators went to patch 2/4 (the v2 patch 2/4 changelog claimed the except fix but the hunk itself sat in 3/4).
- Rebased onto ab217fbb9b21 ("Merge branch 'net-sysfs-use-ops-lock- for-speed-and-duplex'") to resolve the pw-ci contest conflict.

v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

Thanks,
Minxi

Minxi Hou (4):
selftests: openvswitch: convert %-formatting to f-strings
selftests: openvswitch: fix misc pylint warnings in ovs-dpctl.py
selftests: openvswitch: add missing docstrings in ovs-dpctl.py
selftests: openvswitch: suppress pylint complexity warnings

 .../selftests/net/openvswitch/ovs-dpctl.py    | 408 ++++++++++--------
 1 file changed, 236 insertions(+), 172 deletions(-)

base-commit: ab217fbb9b2169ce677b09a66558d5c3adcfbb76

Signature · 1 line
2.55.0