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

Fix TypeError: 'type' object is not subscriptable #987

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

d33tah
Copy link

@d33tah d33tah commented Jan 28, 2025

I caught this in my CI

@@ -227,7 +227,7 @@ def get_tables_data(self):
"""
return self.tables_data

def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
Copy link
Owner

Choose a reason for hiding this comment

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

Are you using python 3.8? The dict[str, Any] (PEP 585) syntax is supported by python 3.9, which is confirmed by a recent CI run: https://github.com/jieter/django-tables2/actions/runs/13018224209/job/36312532791#step:8:19

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.

2 participants