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 08630ca744)
This commit is contained in:
Nicki Křížek 2025-12-31 10:53:23 +01:00
parent 39e1eac692
commit 73a049d99a
3 changed files with 12 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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