mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
516adf40f8
Pylint 2.9 introduced new check: > Emitted when iterating over the dictionary items (key-item pairs) and accessing the value by index lookup. The value can be accessed directly instead. Note: in Python3 removing from dict during an iteration is not possible even. For example, ``` cat a.py d = {"a": 1} for k, v in d.items(): if v is not None: del d[k] python3 a.py Traceback (most recent call last): File "/usr/src/RPM/BUILD/freeipa/a.py", line 3, in <module> for k, v in d.items(): RuntimeError: dictionary changed size during iteration ``` Fixes: https://pagure.io/freeipa/issue/9117 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Rob Crittenden <rcritten@redhat.com> |
||
---|---|---|
.. | ||
advise | ||
custodia | ||
dnssec | ||
install | ||
plugins | ||
secrets | ||
__init__.py | ||
dcerpc_common.py | ||
dcerpc.py | ||
dns_data_management.py | ||
Makefile.am | ||
masters.py | ||
p11helper.py | ||
rpcserver.py | ||
servroles.py | ||
setup.cfg | ||
setup.py | ||
topology.py | ||
wsgi.py |