-
Notifications
You must be signed in to change notification settings - Fork 663
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
Enhance BlacklistMixin with Generic Type for Accurate Type Inference #768
Conversation
T = TypeVar("T", bound="Token") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bounded context. Looks good to me.
tests/test_init.py
Outdated
|
||
|
||
class TestInit(SimpleTestCase): | ||
def test_package_is_not_installed(self): | ||
with patch( | ||
"pkg_resources.get_distribution", Mock(side_effect=DistributionNotFound) | ||
"importlib.metadata.version", Mock(side_effect=PackageNotFoundError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this patch, moving from legacy pkg_resources
to importlib
is a positive move forward to accessing modules metadata.
tldr; Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This really just reflects the changes that were made to rest_framework_simplejwt/__init__.py
in 19cf38e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few tox
tests seems to be breaking, though. Mostly version-dependent tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few tests that seem to not have been passing for a while. I just opened #769 to consolidate the fixes, and I'll update this MR to remove the tests fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh great this should be ready for ready for merge then, @Andrew-Chen-Wang just merged #769
Tests should pass once #769 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving changes, since tests fixes had been removed from #769
Thank you @Dresdn and @50-Course ! |
Closes #767