diff options
author | Matt Clay <matt@mystile.com> | 2023-03-08 11:06:54 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2023-03-14 17:52:20 -0700 |
commit | 106257520654759c8f2970079b29857f526ba112 (patch) | |
tree | d30008dc4f375637f5ec62654b656914dddadfb1 | |
parent | 915c83fad7737b7bd908230b4c5651bd41e6eff8 (diff) | |
download | ansible-106257520654759c8f2970079b29857f526ba112.tar.gz |
[stable-2.12] ansible-test - Remove pointless comparison (#80168)
(cherry picked from commit 31658031ed40f3db002b690b436b793634c2b5e7)
Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r-- | changelogs/fragments/ansible-test-fix-pointless-comparison.yml | 2 | ||||
-rw-r--r-- | test/lib/ansible_test/_internal/test.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/ansible-test-fix-pointless-comparison.yml b/changelogs/fragments/ansible-test-fix-pointless-comparison.yml new file mode 100644 index 0000000000..6c881b5956 --- /dev/null +++ b/changelogs/fragments/ansible-test-fix-pointless-comparison.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - Removed pointless comparison in diff evaluation logic. diff --git a/test/lib/ansible_test/_internal/test.py b/test/lib/ansible_test/_internal/test.py index 05ec5b5959..c955ebcfb4 100644 --- a/test/lib/ansible_test/_internal/test.py +++ b/test/lib/ansible_test/_internal/test.py @@ -46,7 +46,7 @@ def calculate_confidence(path, line, metadata): # type: (str, int, Metadata) -> return 0 # changes were made to the same file and line - if any(r[0] <= line <= r[1] in r for r in ranges): + if any(r[0] <= line <= r[1] for r in ranges): return 100 # changes were made to the same file and the line number is unknown |