Skip to content

Commit

Permalink
disable many polars checks
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Richards <mrichards7@outlook.com.au>
  • Loading branch information
m-richards committed Feb 15, 2025
1 parent e9744b3 commit bba5674
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,12 @@ exclude=(?x)(
follow_imports = skip
[mypy-docs.*] # -> docs\source\conf.py:356: error: "LogRecord" has no attribute "location"
follow_imports = skip

[mypy-pandera.engines.polars_engine]
ignore_errors = True

[mypy-pandera.backends.polars.builtin_checks]
ignore_errors = True

[mypy-tests.polars.*]
ignore_errors = True
5 changes: 4 additions & 1 deletion pandera/backends/polars/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def subsample(
obj_subsample.append(check_obj.tail(tail))
if sample is not None:
obj_subsample.append(
check_obj.sample(sample, random_state=random_state)
# mypy is detecting a bug https://github.com/unionai-oss/pandera/issues/1912
check_obj.sample( # type:ignore [attr-defined]
sample, random_state=random_state
)
)
return (
check_obj
Expand Down

0 comments on commit bba5674

Please sign in to comment.