Skip to content

Commit

Permalink
only import polars in typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelizimm committed Jul 5, 2024
1 parent 39066f8 commit 55823ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ dev =
pytest-cov
pytest-snapshot
vetiver[typecheck]
polars

docs =
quartodoc
Expand Down
8 changes: 7 additions & 1 deletion vetiver/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@

import pandas as pd
import numpy as np
import polars as pl
import pydantic
import typing
from pydantic import Field
from warnings import warn
from .types import create_prototype

if typing.TYPE_CHECKING:
try:
import polars as pl
except ImportError:
pl = None


class InvalidPTypeError(Exception):
"""
Expand Down

0 comments on commit 55823ba

Please sign in to comment.