From bc66353135f3e740f71fc83c0710c5baf5b016af Mon Sep 17 00:00:00 2001 From: Adria Montoto <75563346+adriamontoto@users.noreply.github.com> Date: Sat, 21 Dec 2024 19:59:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20refactor:=20update=20import=20of?= =?UTF-8?q?=20override=20for=20compatibility=20with=20Python=203.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- object_mother_pattern/mothers/primitives/bool_mother.py | 7 ++++++- object_mother_pattern/mothers/primitives/integer_mother.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/object_mother_pattern/mothers/primitives/bool_mother.py b/object_mother_pattern/mothers/primitives/bool_mother.py index 516d557..5446a30 100644 --- a/object_mother_pattern/mothers/primitives/bool_mother.py +++ b/object_mother_pattern/mothers/primitives/bool_mother.py @@ -2,7 +2,12 @@ BoolMother module. """ -from typing import override +from sys import version_info + +if version_info >= (3, 12): + from typing import override # pragma: no cover +else: + from typing_extensions import override # pragma: no cover from ..base_mother import BaseMother diff --git a/object_mother_pattern/mothers/primitives/integer_mother.py b/object_mother_pattern/mothers/primitives/integer_mother.py index 545d235..36c9bcc 100644 --- a/object_mother_pattern/mothers/primitives/integer_mother.py +++ b/object_mother_pattern/mothers/primitives/integer_mother.py @@ -2,7 +2,12 @@ IntegerMother module. """ -from typing import override +from sys import version_info + +if version_info >= (3, 12): + from typing import override # pragma: no cover +else: + from typing_extensions import override # pragma: no cover from ..base_mother import BaseMother