Skip to content

Commit

Permalink
Fix compatibility wity beartype==0.9.1
Browse files Browse the repository at this point in the history
Needed to add upper limit in mypy
  • Loading branch information
berland committed Dec 22, 2021
1 parent ebbca9c commit b72a134
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions ert/data/record/_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
)

from beartype import beartype
from beartype.roar import ( # type: ignore
BeartypeDecorHintPepDeprecatedWarning,
BeartypeException,
)
from beartype.roar import BeartypeDecorHintPepDeprecationWarning, BeartypeException
from pydantic import PositiveInt

import ert

# Mute PEP-585 warnings from Python 3.9:
warnings.simplefilter(action="ignore", category=BeartypeDecorHintPepDeprecatedWarning)
warnings.simplefilter(action="ignore", category=BeartypeDecorHintPepDeprecationWarning)

number = Union[int, float]
numerical_record_data = Union[List[number], Dict[str, number], Dict[int, number]]
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import sys
import os
import sys

from setuptools import find_packages
from skbuild import setup
from setuptools_scm import get_version

from skbuild import setup

# Corporate networks tend to be behind a proxy server with their own non-public
# SSL certificates. Conan keeps its own certificates, whose path we can override
Expand Down Expand Up @@ -68,7 +68,7 @@ def package_files(directory):
"ansicolors==1.1.8",
"async-exit-stack; python_version < '3.7'",
"async-generator",
"beartype >= 0.8.0, <0.9.0",
"beartype >= 0.9.1",
"cloudevents",
"cloudpickle",
"tqdm>=4.62.0",
Expand Down
2 changes: 1 addition & 1 deletion types-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mypy != 0.920
mypy < 0.920
types-aiofiles
types-requests
types-pkg_resources
Expand Down

0 comments on commit b72a134

Please sign in to comment.