From 4dbafedf4c09fff44d0af19a81b83ebf163a7acf Mon Sep 17 00:00:00 2001 From: David Robertson Date: Mon, 8 Aug 2022 19:17:26 +0100 Subject: [PATCH] Fix lint --- synapse/rest/client/models.py | 2 +- synapse/types.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/rest/client/models.py b/synapse/rest/client/models.py index 04c7723b0df4..dcdf01fdf67c 100644 --- a/synapse/rest/client/models.py +++ b/synapse/rest/client/models.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import TYPE_CHECKING, Dict, Optional, Type +from typing import TYPE_CHECKING, Dict, Optional from pydantic import Extra, StrictInt, StrictStr, constr, validator diff --git a/synapse/types.py b/synapse/types.py index 8542a0dbfcb9..0a32825c72f4 100644 --- a/synapse/types.py +++ b/synapse/types.py @@ -934,6 +934,7 @@ class SynapseBaseModel(BaseModel): Subclassing in this way is recommended by https://pydantic-docs.helpmanual.io/usage/model_config/#change-behaviour-globally """ + class Config: # By default, ignore fields that we don't recognise. extra = Extra.ignore