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

Update typeguard #657

Closed
wants to merge 2 commits into from
Closed

Update typeguard #657

wants to merge 2 commits into from

Conversation

meretp
Copy link
Collaborator

@meretp meretp commented May 15, 2023

Based on #655

The following adaptions were made to be able to bump typeguard from 2.13.3 to 4.0.0

  • the error raised is a TypeCheckError
  • we need to enable the CollectionCheckStrategy.ALL_ITEMS to check each instance in a collection
  • instead of checking the generated error messages for each class we only check that an error is raised for every class and use only one invalid package as a proxy for all other tests to check the generated message

The generated error message changed with the update. In the test_error_message module you can see an example for the new message. I think the part for package.download_location(so a wrong type where a Union of types is possible) takes a bit of getting used to, but in my opinion the problem becomes clear and we don't need to customize this error.

Bumps [typeguard](https://github.com/agronholm/typeguard) from 2.13.3 to 4.0.0.
- [Changelog](https://github.com/agronholm/typeguard/blob/master/docs/versionhistory.rst)
- [Commits](agronholm/typeguard@2.13.3...4.0.0)

---
updated-dependencies:
- dependency-name: typeguard
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@meretp meretp force-pushed the update-typeguard branch 2 times, most recently from c67b294 to c42fc1b Compare May 15, 2023 11:09
- the error raised is a `TypeCheckError`
- we need to enable the CollectionCheckStrategy.ALL_ITEMS to check each instance in a collection
- instead of checking the generated error messages for each class we only check that an error is raised for every class and use only one invalid package as a proxy for all other tests to check the generated message

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
@meretp meretp force-pushed the update-typeguard branch from c42fc1b to 1089934 Compare May 15, 2023 11:10
@meretp meretp closed this May 15, 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.

1 participant