From 32af4fdad00a0147e6947bb60cdea19c7dbe53fd Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com> Date: Sat, 11 Jan 2025 13:34:06 +0200 Subject: [PATCH] Rename MYPY as TYPE_CHECKING (see https://github.com/python/mypy/pull/18443) --- src/tomli/_parser.py | 4 ++-- src/tomli/_re.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 1cd9b4c..47f467e 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -16,8 +16,8 @@ match_to_number, ) -MYPY = False -if MYPY: # pragma: no cover +TYPE_CHECKING = False +if TYPE_CHECKING: from collections.abc import Iterable from typing import IO, Any, Final diff --git a/src/tomli/_re.py b/src/tomli/_re.py index 88a6821..6734196 100644 --- a/src/tomli/_re.py +++ b/src/tomli/_re.py @@ -8,8 +8,8 @@ from functools import lru_cache import re -MYPY = False -if MYPY: # pragma: no cover +TYPE_CHECKING = False +if TYPE_CHECKING: from typing import Any, Final from ._types import ParseFloat