]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Remove unecessary override of Headers.get (#1810)
authorAdrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
Sun, 14 Aug 2022 10:39:02 +0000 (05:39 -0500)
committerGitHub <noreply@github.com>
Sun, 14 Aug 2022 10:39:02 +0000 (05:39 -0500)
starlette/datastructures.py

index f49dbc35e3322c098f3a4beb469e0b7822c1db9c..42ec7a9ea474a4006a7cd416ab80c8b245856c0e 100644 (file)
@@ -540,12 +540,6 @@ class Headers(typing.Mapping[str, str]):
             for key, value in self._list
         ]
 
-    def get(self, key: str, default: typing.Any = None) -> typing.Any:
-        try:
-            return self[key]
-        except KeyError:
-            return default
-
     def getlist(self, key: str) -> typing.List[str]:
         get_header_key = key.lower().encode("latin-1")
         return [