From: Nicki Křížek Date: Wed, 31 Dec 2025 09:53:23 +0000 (+0100) Subject: Silence incorrect pylint warnings for hypothesis.assume() X-Git-Tag: v9.18.45~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73a049d99a4ce5addb4a059580f8e62da09d2fd8;p=thirdparty%2Fbind9.git Silence incorrect pylint warnings for hypothesis.assume() With hypothesis>6.148.3, pylint generates W0101: Unreachable code (unreachable) when any code is present after hypothesis.assume(). Silence these until it is fixed upstream. See https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217 (cherry picked from commit 08630ca744a05bacba7eb187274507e64121c965) --- diff --git a/bin/tests/system/nsec3-answer/tests_nsec3.py b/bin/tests/system/nsec3-answer/tests_nsec3.py index da74a599ffd..72d065e7d5a 100755 --- a/bin/tests/system/nsec3-answer/tests_nsec3.py +++ b/bin/tests/system/nsec3-answer/tests_nsec3.py @@ -11,6 +11,10 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +# Silence incorrect warnings cause by hypothesis.assume() +# https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217 +# pylint: disable=unreachable + from dataclasses import dataclass import os from pathlib import Path diff --git a/bin/tests/system/tsig/tests_tsig_hypothesis.py b/bin/tests/system/tsig/tests_tsig_hypothesis.py index 3a1c05d1d11..3e134d5bb07 100644 --- a/bin/tests/system/tsig/tests_tsig_hypothesis.py +++ b/bin/tests/system/tsig/tests_tsig_hypothesis.py @@ -11,6 +11,10 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +# Silence incorrect warnings cause by hypothesis.assume() +# https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217 +# pylint: disable=unreachable + import time import pytest diff --git a/bin/tests/system/wildcard/tests_wildcard.py b/bin/tests/system/wildcard/tests_wildcard.py index b086fc0d136..60d75384f03 100755 --- a/bin/tests/system/wildcard/tests_wildcard.py +++ b/bin/tests/system/wildcard/tests_wildcard.py @@ -27,6 +27,10 @@ Limitations - untested properties: - special behavior of rdtypes like CNAME """ +# Silence incorrect warnings cause by hypothesis.assume() +# https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217 +# pylint: disable=unreachable + import pytest import dns