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

publication fill both updates **in place** and returns the same publication #532

Open
1 task done
neuromechanist opened this issue Feb 1, 2024 · 0 comments
Open
1 task done
Labels

Comments

@neuromechanist
Copy link

Describe the bug
Here is the definition of the fill method:

def fill(self, publication: Publication)->Publication:
.
.
.
    return publication

To Reproduce

import scholarly
query = scholarly.search_pubs('general relativity')
query = next(query)

filled_query = scholarly.fill(query)

# check if filled_query and query are the same
filled_query is query

Expected behavior
Updating the publication in place is redundant when there is a returned publication. I suggest copying the the publication and updating the copy, so the original publication remains intact. The other option is to make the changes in place and remove the return statement.

Do you plan on contributing?
Your response below will clarify whether the maintainers can expect you to fix the bug you reported.

  • Yes, I will create a Pull Request with the bugfix, if the maintainers would want that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant