Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LabelAnalysisRequestResult object #196

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

giovanni-guidini
Copy link
Contributor

instead of using the result as a dictionary we can use it as the object we wrap it into.
There are 2 benefits to this:

  1. It's cleaner to read
  2. It does the fallback to [] if the api returns any of the values as None. This avoids a bug we saw yesterday when trying to concatenate list to None.

We do the wrapping in labelanalysis, before passing it to the runner.

instead of using the result as a dictionary we can use it as the object we wrap it into.
There are 2 benefits to this:
1. It's cleaner to read
2. It does the fallback to `[]` if the api returns any of the values as `None`. This avoids a bug we saw yesterday when trying to concatenate list to None.

We do the wrapping in labelanalysis, before passing it to the runner.
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #196 (592e14d) into master (9d671c5) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #196   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files          70       70           
  Lines        2475     2475           
=======================================
  Hits         2368     2368           
  Misses        107      107           
Flag Coverage Δ
python3.10 95.67% <100.00%> (ø)
python3.7 95.67% <100.00%> (ø)
python3.8 95.67% <100.00%> (ø)
python3.9 95.67% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
codecov_cli/runners/python_standard_runner.py 98.29% <100.00%> (ø)

@giovanni-guidini giovanni-guidini merged commit 7dd911e into master Jul 14, 2023
7 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/use-result-object branch July 14, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants