Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@erikvullings
Copy link
Contributor

As requested, I''ve opened a PR to fix it.

if isinstance(author, dict):
authors.append(author.get("name", ""))
author = author.get("name", None)
if author:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use a different variable than author, it is the same as the loop variable extracted_author may be more appropriate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - I have updated the PR. Any idea when you will create a new pip release?

if isinstance(author, dict):
author = author.get("name", None)
extracted_author = author.get("name", None)
if author:
Copy link
Collaborator

@barrust barrust Jul 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this also be extracted author? Otherwise a None might be inserted into the array. (Line 73)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are completely right - stupid oversight on my part. Thanks for catching it!

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #183 (df9b8af) into master (662dd22) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #183   +/-   ##
=======================================
  Coverage   91.43%   91.44%           
=======================================
  Files          30       30           
  Lines        2464     2465    +1     
=======================================
+ Hits         2253     2254    +1     
  Misses        211      211           
Impacted Files Coverage Δ
goose3/extractors/authors.py 97.43% <100.00%> (+0.06%) ⬆️

@barrust
Copy link
Collaborator

barrust commented Jul 4, 2023

@lababidi if you are good with this PR, we can merge and we can then push a new version.

@lababidi
Copy link
Contributor

lababidi commented Jul 4, 2023

@barrust looks good. I would simplify eventually to return from_schema() or from_meta()

@lababidi lababidi merged commit 38a1581 into goose3:master Jul 4, 2023
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.

4 participants