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

Skip to content

Upgrade typeguard#5702

Merged
sw005320 merged 23 commits intomasterfrom
sw005320-patch-2
Apr 8, 2024
Merged

Upgrade typeguard#5702
sw005320 merged 23 commits intomasterfrom
sw005320-patch-2

Conversation

@sw005320
Copy link
Contributor

@sw005320 sw005320 commented Mar 14, 2024

What?

  • use the latest version of typeguard
  • moved check_argument_types() to the beginning of the function and renamed as @typechecked
  • deleted check_return_type by assuming that @typechecked can cover it.

Why?

There are several requests to update typeguard

See also

#5701
#5660
#5009

@mergify mergify bot added the Installation label Mar 14, 2024
@mergify mergify bot added the ESPnet2 label Mar 14, 2024
@sw005320 sw005320 changed the title Update setup.py Upgrade typeguard Mar 15, 2024
@sw005320 sw005320 added this to the v.202405 milestone Mar 15, 2024
@sw005320 sw005320 requested a review from simpleoier March 15, 2024 03:09
Copy link
Collaborator

@simpleoier simpleoier left a comment

Choose a reason for hiding this comment

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

Thanks a lot! This is a lot of effort!
There is one typo in the PR.
I think this should be good if it passes the CI tests.

@typechecked
def number_updates(self, iiter: int):
assert check_argument_types() and iiter >= 0
iiter >= 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might not work without assert

@sw005320 sw005320 merged commit 41a4780 into master Apr 8, 2024
@sw005320 sw005320 deleted the sw005320-patch-2 branch April 8, 2024 23:10
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.

2 participants