Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 40c57ec6c70fc19a938a9f0985d0744349de5af1
https://github.com/tribe29/checkmk/commit/40c57ec6c70fc19a938a9f0985d074434…
Author: Sven Panne <sven.panne(a)tribe29.com>
Date: 2020-05-07 (Thu, 07 May 2020)
Changed paths:
M cmk/gui/watolib/rulespecs.py
Log Message:
-----------
Unobscurify register_rule a bit.
This commit just unrolls an obscure loop and moves code around a bit,
bringing related things closer together. Still obscure, though...
Change-Id: I52bed9f8e3f40ab5ac45f32e0bc012acf78a9456
Commit: 3180ac688f276640ea5229bd3bf18104bf43576c
https://github.com/tribe29/checkmk/commit/3180ac688f276640ea5229bd3bf18104b…
Author: Sven Panne <sven.panne(a)tribe29.com>
Date: 2020-05-07 (Thu, 07 May 2020)
Changed paths:
M cmk/gui/watolib/rulespecs.py
Log Message:
-----------
Make recent pylint happy with ManualCheckParameterRulespec.
The Rulespec class hierarchy is quite confusing to human readers and tools:
The constructors vary quite a lot, sometimes a parameter is a kwarg,
sometimes it's a simple arg, sometimes it's there, sometimes not. And to
make things even more interesting, the order of arguments varies, too.
OTOH, in register_rule() we pretend that we can handle those constructors in
a consistent way, which was simply not true previously. This commit fixes
that problem by adding match_type/name/factory_default kwargs with
compatible defaults to ManualCheckParameterRulespec.__init__.
When we use Python 3, we should probably make the epic argument lists
kwargs-only, which is the only sane way to use them (and we do this already
most of the time, anyway).
Change-Id: Ibb84248ab33afcb8adce9e545c17cceef0151a1a
Compare:
https://github.com/tribe29/checkmk/compare/c30bb6320b87...3180ac688f27