Skip to content

Commit

Permalink
no mutation on plugin manifest name (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Mar 14, 2022
1 parent e306a09 commit 41c557d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions npe2/manifest/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 41c557d

Please sign in to comment.