File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,17 @@ class Static:
2424 _mutated_ : bool = False # TODO: Remove after deprecation warning is solved
2525
2626
27- def _prevent_modification (target : type , method : str , copying : str ):
27+ def _prevent_modification (target : type , method : str , copying : str ) -> None :
2828 """
2929 Because setuptools is very flexible we cannot fully prevent
3030 plugins and user customisations from modifying static values that were
3131 parsed from config files.
3232 But we can attempt to block "in-place" mutations and identify when they
3333 were done.
3434 """
35- fn = getattr (target , method )
35+ fn = getattr (target , method , None )
36+ if fn is None :
37+ return
3638
3739 @wraps (fn )
3840 def _replacement (self : Static , * args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments