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:
24
24
_mutated_ : bool = False # TODO: Remove after deprecation warning is solved
25
25
26
26
27
- def _prevent_modification (target : type , method : str , copying : str ):
27
+ def _prevent_modification (target : type , method : str , copying : str ) -> None :
28
28
"""
29
29
Because setuptools is very flexible we cannot fully prevent
30
30
plugins and user customisations from modifying static values that were
31
31
parsed from config files.
32
32
But we can attempt to block "in-place" mutations and identify when they
33
33
were done.
34
34
"""
35
- fn = getattr (target , method )
35
+ fn = getattr (target , method , None )
36
+ if fn is None :
37
+ return
36
38
37
39
@wraps (fn )
38
40
def _replacement (self : Static , * args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments