yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80172
[Bug 1845489] Re: Variable self-assignments causing pylint W0127 (self-assigning-variable)
This looks like an incorrect pylint warning to me. `schema` is in the
module namespace in test_snap.py, but `schema = schema` binds the value
of the module-level `schema` to `schema` on the test class. This is
required because self.assertSchemaValid refers to `self.schema`.
I'm going to look at finding/filing a pylint issue for this now, and
will mark this as Invalid.
** Changed in: cloud-init
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1845489
Title:
Variable self-assignments causing pylint W0127 (self-assigning-
variable)
Status in cloud-init:
Invalid
Bug description:
The newly released pylint 2.4.0 detects variable self-assignments and
throws a W0127 when one is found. There are four of these self-
assignments in cloud-init, all in this form:
@skipUnlessJsonSchema()
class TestSchema(CiTestCase, SchemaTestCaseMixin):
with_logs = True
schema = schema
^^^^^^^^^^^^^^^
and all introduced by this commit:
https://git.launchpad.net/cloud-
init/commit/cloudinit/config/tests/test_snap.py?id=5037252ca5
I'd drop them, but it seems they have been introduced on purpose. Is
there a good reason to keep them?
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1845489/+subscriptions
References