mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 09:03:57 +00:00
typing: Fix function signatures.
This fixes mypy errors for function signatures discovered with django-stubs.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import re
|
||||
from typing import Any, Dict
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from django.http import HttpRequest
|
||||
from django.views.debug import SafeExceptionReporterFilter
|
||||
|
||||
|
||||
class ZulipExceptionReporterFilter(SafeExceptionReporterFilter):
|
||||
def get_post_parameters(self, request: HttpRequest) -> Dict[str, Any]:
|
||||
def get_post_parameters(self, request: Optional[HttpRequest]) -> Dict[str, Any]:
|
||||
post_data = SafeExceptionReporterFilter.get_post_parameters(self, request)
|
||||
assert isinstance(post_data, dict)
|
||||
filtered_post = post_data.copy()
|
||||
|
||||
Reference in New Issue
Block a user