dbt-coverage
dbt-coverage copied to clipboard
Clean up `len(model_path_filter) >= 1` once a Typer issue gets resolved
Originally I had used is not None
as you say, however, this doesn't work due to a known issue with typer
: https://github.com/tiangolo/typer/issues/410 whereby [an] "Empty tuple [is] returned for Option instead of expected None
when no values passed". As such, I have to use len()
since until the issue is resolved model_path_filter
will never be None
.
~~Since you asked the question it's obvious that I could make the reason for my choice clearer, WDYT to the below suggestion?~~
Originally posted by @followingell in https://github.com/slidoapp/dbt-coverage/pull/45#discussion_r1012694530
@followingell please do not hesitate to suggest a better title here 🙂
For posterity, let us note that the Typer issue in question is https://github.com/tiangolo/typer/issues/410