diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-31 10:08:01 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-08-31 16:28:54 -0400 |
commit | b60bd0e299460c436acba43de27ac52afb11026b (patch) | |
tree | d1e66beb2c83625bfc86acbac7ce419980fd5013 /.pylintrc | |
parent | 4d7031437c7a81b52c776d4ae1e32741bdb851ca (diff) | |
download | meson-b60bd0e299460c436acba43de27ac52afb11026b.zip meson-b60bd0e299460c436acba43de27ac52afb11026b.tar.gz meson-b60bd0e299460c436acba43de27ac52afb11026b.tar.bz2 |
pyllint: enable consider-user-enumerate
This caught a couple of cases of us doing:
```python
for i in range(len(x)):
v = x[i]
```
which are places to use enumerate instead.
It also caught a couple of cases of:
```python
assert len(x) == len(y)
for i in range(len(x)):
xv = x[i]
yv = y[i]
```
Which should instead be using zip()
```python
for xv, yv in zip(x, y):
...
```
Diffstat (limited to '.pylintrc')
-rw-r--r-- | .pylintrc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -13,6 +13,7 @@ enable= bare-except, compare-to-zero, consider-iterating-dictionary, + consider-using-enumerate, dangerous-default-value, deprecated-lambda, len-as-condition, |