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

Bump to Py3.9 #554

Merged
merged 4 commits into from
Jun 21, 2023
Merged

Bump to Py3.9 #554

merged 4 commits into from
Jun 21, 2023

Conversation

junpenglao
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #554 (d6ec11a) into main (5abb248) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #554   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files          49       49           
  Lines        2099     2099           
=======================================
  Hits         2081     2081           
  Misses         18       18           
Impacted Files Coverage Δ
blackjax/adaptation/mass_matrix.py 100.00% <100.00%> (ø)
blackjax/adaptation/pathfinder_adaptation.py 100.00% <100.00%> (ø)
blackjax/adaptation/step_size.py 100.00% <100.00%> (ø)
blackjax/adaptation/window_adaptation.py 100.00% <100.00%> (ø)
blackjax/base.py 100.00% <100.00%> (ø)
blackjax/mcmc/elliptical_slice.py 95.77% <100.00%> (ø)
blackjax/mcmc/ghmc.py 100.00% <100.00%> (ø)
blackjax/mcmc/hmc.py 100.00% <100.00%> (ø)
blackjax/mcmc/mala.py 100.00% <100.00%> (ø)
blackjax/mcmc/metrics.py 100.00% <100.00%> (ø)
... and 13 more

@@ -68,7 +68,7 @@ class MassMatrixAdaptationState(NamedTuple):

def mass_matrix_adaptation(
is_diagonal_matrix: bool = True,
) -> Tuple[Callable, Callable, Callable]:
) -> tuple[Callable, Callable, Callable]:
Copy link
Member

@rlouf rlouf Jun 21, 2023

Choose a reason for hiding this comment

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

Are Tuple and List deprecated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, but from py3.9 onward we can "use built-in collection types such as list and dict as generic types instead of importing the corresponding capitalized types (e.g. List or Dict) from typing."

https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections

@rlouf rlouf merged commit cf94b27 into main Jun 21, 2023
@rlouf rlouf deleted the py_version branch June 21, 2023 08:03
junpenglao added a commit that referenced this pull request Mar 12, 2024
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.

3 participants