Closed josephaxisa closed 4 years ago
Explores containing just dimensions (or only measures) fail on L208, introduced due to dimensions and measures having an optional type because of the fields parameter of GET /lookml_models/{lookml_model_name}/explores/{explore_name}.
dimensions
measures
fields
GET /lookml_models/{lookml_model_name}/explores/{explore_name}
https://github.com/looker-open-source/henry/blob/45893109b7ec0d4df8927d9a49bc630443662555/henry/modules/fetcher.py#L201-L212
Since the request in get_explores does not include the fields param, the response will contain these attributes, even though they can be empty lists. https://github.com/looker-open-source/henry/blob/45893109b7ec0d4df8927d9a49bc630443662555/henry/modules/fetcher.py#L137 As a result, I removed the assertions and told mypy to look the other way.
get_explores
Problem
Explores containing just dimensions (or only measures) fail on L208, introduced due to
dimensions
andmeasures
having an optional type because of thefields
parameter ofGET /lookml_models/{lookml_model_name}/explores/{explore_name}
.https://github.com/looker-open-source/henry/blob/45893109b7ec0d4df8927d9a49bc630443662555/henry/modules/fetcher.py#L201-L212
Solution
Since the request in
get_explores
does not include thefields
param, the response will contain these attributes, even though they can be empty lists. https://github.com/looker-open-source/henry/blob/45893109b7ec0d4df8927d9a49bc630443662555/henry/modules/fetcher.py#L137 As a result, I removed the assertions and told mypy to look the other way.