diff options
| author | Dani Alcala <112832187+clavedeluna@users.noreply.github.com> | 2022-11-23 14:11:20 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-23 18:11:20 +0100 |
| commit | f7d681b5a79e5781ab8072fe64459b199955a1f6 (patch) | |
| tree | 57e5c051cf7384ae01d50007386b73b1dab616e1 /doc/data/messages/d | |
| parent | ed404d361f24f068693d59619961e575810af3d9 (diff) | |
| download | pylint-git-f7d681b5a79e5781ab8072fe64459b199955a1f6.tar.gz | |
Add a new check `dict-init-mutate` (#7794)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'doc/data/messages/d')
| -rw-r--r-- | doc/data/messages/d/dict-init-mutate/bad.py | 3 | ||||
| -rw-r--r-- | doc/data/messages/d/dict-init-mutate/good.py | 1 | ||||
| -rw-r--r-- | doc/data/messages/d/dict-init-mutate/pylintrc | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/doc/data/messages/d/dict-init-mutate/bad.py b/doc/data/messages/d/dict-init-mutate/bad.py new file mode 100644 index 000000000..d6d1cfe18 --- /dev/null +++ b/doc/data/messages/d/dict-init-mutate/bad.py @@ -0,0 +1,3 @@ +fruit_prices = {} # [dict-init-mutate] +fruit_prices['apple'] = 1 +fruit_prices['banana'] = 10 diff --git a/doc/data/messages/d/dict-init-mutate/good.py b/doc/data/messages/d/dict-init-mutate/good.py new file mode 100644 index 000000000..02137f287 --- /dev/null +++ b/doc/data/messages/d/dict-init-mutate/good.py @@ -0,0 +1 @@ +fruit_prices = {"apple": 1, "banana": 10} diff --git a/doc/data/messages/d/dict-init-mutate/pylintrc b/doc/data/messages/d/dict-init-mutate/pylintrc new file mode 100644 index 000000000..bbe6bd1f7 --- /dev/null +++ b/doc/data/messages/d/dict-init-mutate/pylintrc @@ -0,0 +1,2 @@ +[MAIN] +load-plugins=pylint.extensions.dict_init_mutate, |
