diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-06-10 14:49:05 +0200 |
---|---|---|
committer | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-06-10 14:49:05 +0200 |
commit | e783d94751690d5d9a18401938e2f21a565da299 (patch) | |
tree | fbdccb36622c5429b25234c680eae3d5a39e351c /tests/functional/c | |
parent | 30bb75930bace1ff166de990ea1d0b80ecffef6d (diff) | |
download | pylint-git-e783d94751690d5d9a18401938e2f21a565da299.tar.gz |
Move remaining extension fixtures
Diffstat (limited to 'tests/functional/c')
-rw-r--r-- | tests/functional/c/confusing_consecutive_elif.py | 41 | ||||
-rw-r--r-- | tests/functional/c/confusing_consecutive_elif.rc | 2 | ||||
-rw-r--r-- | tests/functional/c/confusing_consecutive_elif.txt | 1 |
3 files changed, 0 insertions, 44 deletions
diff --git a/tests/functional/c/confusing_consecutive_elif.py b/tests/functional/c/confusing_consecutive_elif.py deleted file mode 100644 index 9f1d1ffe9..000000000 --- a/tests/functional/c/confusing_consecutive_elif.py +++ /dev/null @@ -1,41 +0,0 @@ -# pylint: disable=missing-module-docstring, missing-function-docstring - -def check_config(machine, old_conf, new_conf): - """Example code that will trigger the message""" - if old_conf: - if not new_conf: - machine.disable() - elif old_conf.value != new_conf.value: - machine.disable() - machine.enable(new_conf.value) - elif new_conf: # [confusing-consecutive-elif] - machine.enable(new_conf.value) - - -def check_config_2(machine, old_conf, new_conf): - """Example code must not trigger the message, because the inner block ends with else.""" - if old_conf: - if not new_conf: - machine.disable() - elif old_conf.value != new_conf.value: - machine.disable() - machine.enable(new_conf.value) - else: - pass - elif new_conf: - machine.enable(new_conf.value) - -def check_config_3(machine, old_conf, new_conf): - """ - Example code must not trigger the message, - because the inner if is not the final node of the body. - """ - if old_conf: - if not new_conf: - machine.disable() - elif old_conf.value != new_conf.value: - machine.disable() - machine.enable(new_conf.value) - print("Processed old configuration...") - elif new_conf: - machine.enable(new_conf.value) diff --git a/tests/functional/c/confusing_consecutive_elif.rc b/tests/functional/c/confusing_consecutive_elif.rc deleted file mode 100644 index 6a11b2c09..000000000 --- a/tests/functional/c/confusing_consecutive_elif.rc +++ /dev/null @@ -1,2 +0,0 @@ -[MASTER] -load-plugins=pylint.extensions.confusing_elif diff --git a/tests/functional/c/confusing_consecutive_elif.txt b/tests/functional/c/confusing_consecutive_elif.txt deleted file mode 100644 index 55cc0d13f..000000000 --- a/tests/functional/c/confusing_consecutive_elif.txt +++ /dev/null @@ -1 +0,0 @@ -confusing-consecutive-elif:11:4:check_config:Consecutive elif with differing indentation level, consider creating a function to separate the inner elif |