[code-quality] W0602 global-variable-not-assigned

Josh Powers josh.powers at canonical.com
Thu Apr 6 17:30:35 EDT 2017


Hi,

I have code similar to [1] where instead of directly assigning a dictionary
global variable the dictionary method update is used. Right now this
results in a W0602 global-variable-not-assigned.

Is this expected behavior and if so is there a better way to write the
above?

The actual code giving me this message is in cloud-init [2].

[1] https://paste.ubuntu.com/24330114/
[2]
https://github.com/cloud-init/cloud-init/blob/master/cloudinit/util.py#L114

---
Josh Powers
Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/code-quality/attachments/20170406/258de545/attachment.html>


More information about the code-quality mailing list