machow / siuba

Python library for using dplyr like syntax with pandas and SQL
https://siuba.org
MIT License
1.14k stars 48 forks source link

Remove siuba.siu.utils.py module #384

Closed machow closed 2 years ago

machow commented 2 years ago

The siuba.siu.utils.py module does some dynamic type inspection, in order to decide whether a singledispatch function should be called.

It's pretty complicated, but the gist is it detects whether the return type of functions like this are compatible with the dialect being run (see ADR 004):

@symbolic_dispatch
def f_good(x: ClauseElement) -> ClauseElement:
    return x.contains('woah')

This won't be necessary after #304, and will be useful to remove.

machow commented 2 years ago

Going to punt on this, since it is being used in the codata visitor.