Skip to content

Rectify type-hints for set_data #6676

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

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

Dhruvanshu-Joshi
Copy link
Member

@Dhruvanshu-Joshi Dhruvanshu-Joshi commented Apr 14, 2023

What is this PR about?
This PR aims to solve issue 6667.

Checklist

Major / Breaking Changes

  • ...

New features

  • ...

Bugfixes

  • The type-hints for values in model.py is given as Dict[str, Optional[Sequence]]. We update it to be an array-like object as Sequence.

Documentation

  • ...

Maintenance

  • ...

📚 Documentation preview 📚: https://pymc--6676.org.readthedocs.build/en/6676/

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #6676 (95e562c) into main (9b712bf) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6676      +/-   ##
==========================================
- Coverage   92.01%   91.99%   -0.02%     
==========================================
  Files          95       95              
  Lines       16000    16003       +3     
==========================================
  Hits        14722    14722              
- Misses       1278     1281       +3     
Impacted Files Coverage Δ
pymc/model.py 90.03% <ø> (ø)
pymc/logprob/binary.py 98.11% <100.00%> (+0.11%) ⬆️

... and 1 file with indirect coverage changes

pymc/model.py Outdated
@@ -1155,7 +1155,7 @@ def set_initval(self, rv_var, initval):
def set_data(
self,
name: str,
values: Dict[str, Optional[Sequence]],
values: Optional[Sequence],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
values: Optional[Sequence],
values: Union[Sequence, np.ndarray],

@ricardoV94 ricardoV94 changed the title Rectify type-hints for set_data Rectify type-hints for set_data Apr 26, 2023
@ricardoV94 ricardoV94 merged commit 9f01be2 into pymc-devs:main Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants