From 41c557dff60c3693dbd40de212e67768a157dcb4 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 14 Mar 2022 07:54:14 -0400 Subject: [PATCH] no mutation on plugin manifest name (#127) --- npe2/manifest/schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/npe2/manifest/schema.py b/npe2/manifest/schema.py index fc56a7ad..dba3422f 100644 --- a/npe2/manifest/schema.py +++ b/npe2/manifest/schema.py @@ -52,6 +52,7 @@ class PluginManifest(ImportExportModel): ..., description="The name of the plugin. Though this field is mandatory, it *must*" " match the package `name` as defined in the python package metadata.", + allow_mutation=False, ) _validate_name = validator("name", pre=True, allow_reuse=True)( _validators.package_name @@ -224,6 +225,7 @@ def from_distribution(cls, name: str) -> PluginManifest: class Config: underscore_attrs_are_private = True extra = Extra.forbid + validate_assignment = True @classmethod def discover(