mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:05:31 +02:00
Use in dict rather than "in dict.keys()". Fix linting warnings about "not in". (#8298)
* Fixed a few linting warnings for if not x in y. These should have been caught by pylint, but weren't. * Replaced "x in y.keys()" with "x in y". It's much faster, and more Pythonic.
This commit is contained in:
@@ -127,7 +127,7 @@ def write_renewal_config(o_filename, n_filename, archive_dir, target, relevant_d
|
||||
|
||||
config["renewalparams"].update(relevant_data)
|
||||
|
||||
for k in config["renewalparams"].keys():
|
||||
for k in config["renewalparams"]:
|
||||
if k not in relevant_data:
|
||||
del config["renewalparams"][k]
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class PluginStorage(object):
|
||||
if not self._initialized:
|
||||
self._initialize_storage()
|
||||
|
||||
if not self._classkey in self._data.keys():
|
||||
if self._classkey not in self._data:
|
||||
self._data[self._classkey] = {}
|
||||
self._data[self._classkey][key] = value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user