dbt-coverage icon indicating copy to clipboard operation
dbt-coverage copied to clipboard

Clean up `len(model_path_filter) >= 1` once a Typer issue gets resolved

Open mrshu opened this issue 2 years ago • 2 comments

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

mrshu avatar Nov 15 '22 09:11 mrshu

@followingell please do not hesitate to suggest a better title here 🙂

mrshu avatar Nov 15 '22 09:11 mrshu

For posterity, let us note that the Typer issue in question is https://github.com/tiangolo/typer/issues/410

mrshu avatar Nov 15 '22 09:11 mrshu