Skip to content

Commit

Permalink
Add Regex as a valid column type in typespec
Browse files Browse the repository at this point in the history
Dialyzer is complaining when we pass a regular expression to functions like `Explorer.DataFrame.select/2`, even though the documentation says it's a valid argument.

This commit solves the issue by adding `Regex.t()` to the type definition of `columns()` type.
  • Loading branch information
viniciussbs authored Dec 10, 2024
1 parent fb613c9 commit 16473ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/explorer/data_frame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ defmodule Explorer.DataFrame do
@type columns ::
[column]
| Range.t()
| Regex.t()
| (String.t() -> boolean())
| (String.t(), Explorer.Series.dtype() -> boolean())

Expand Down

0 comments on commit 16473ad

Please sign in to comment.