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 type hint for the package_filter argument of ResolvedContext's constructor #1582

Conversation

brycegbrazen
Copy link
Contributor

Closes #1581

Updates type hint to be what is actually expected by ResolvedContext under the hood.

As noted by #1581, ResolvedContext expects a PackageFilterList rather than a PackageFilterBase when deserializing from a dict, so this PR improves the documentation to match that.

Signed-off-by: brycegbrazen <[email protected]>
@brycegbrazen brycegbrazen requested a review from a team as a code owner November 12, 2023 18:49
@JeanChristopheMorinPerso
Copy link
Member

This makes sense to me, considering that the default type is a PackageFilterList as seen in the constructor:

self.package_filter = (PackageFilterList.singleton if package_filter is None

@JeanChristopheMorinPerso JeanChristopheMorinPerso added this to the 2.114.0 milestone Nov 12, 2023
@JeanChristopheMorinPerso JeanChristopheMorinPerso merged commit 762a6c6 into AcademySoftwareFoundation:main Nov 12, 2023
28 checks passed
@JeanChristopheMorinPerso JeanChristopheMorinPerso changed the title Update package_filter type hint on ResolvedContext Update type hint for the package_filter argument of ResolvedContext's constructor Nov 12, 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.

package_filter parameter on ResolvedContext class shows incorrect expected type
2 participants