From 73a049d99a4ce5addb4a059580f8e62da09d2fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Wed, 31 Dec 2025 10:53:23 +0100 Subject: [PATCH] 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) --- bin/tests/system/nsec3-answer/tests_nsec3.py | 4 ++++ bin/tests/system/tsig/tests_tsig_hypothesis.py | 4 ++++ bin/tests/system/wildcard/tests_wildcard.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/bin/tests/system/nsec3-answer/tests_nsec3.py b/bin/tests/system/nsec3-answer/tests_nsec3.py index da74a599ff..72d065e7d5 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 3a1c05d1d1..3e134d5bb0 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 b086fc0d13..60d75384f0 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