typing: Fix function signatures.

This fixes mypy errors for function signatures discovered with
django-stubs.
This commit is contained in:
PIG208
2021-08-19 16:45:20 +08:00
committed by Tim Abbott
parent 71427239d0
commit 3b11c36ed9
7 changed files with 14 additions and 12 deletions

View File

@@ -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()