pixie icon indicating copy to clipboard operation
pixie copied to clipboard

PxL Compiler doesn't know type of a negated boolean when passed to a typed argument

Open philkuz opened this issue 3 years ago • 1 comments

Describe the bug I wrote a PxL script that passed not var_name to a function argument. I received a message saying that the type of not var_name was unknown. image

To Reproduce Steps to reproduce the behavior:

  1. write script
import px

def blah(include_readyz: bool):
    return px.DataFrame('http_events', start_time='-1s')

px.display(blah(not True))
  1. Run script
  2. see error image

Expected behavior The compiler should understand that not True is a boolean expression.

App information (please complete the following information):

  • Pixie version: 0.11.6

philkuz avatar Jul 12 '22 18:07 philkuz

A temporary fix for anyone who experiences this is to remove the bool type annotation.

philkuz avatar Jul 12 '22 18:07 philkuz