Sfoglia il codice sorgente

refactor: remove unneeded try-finally from Context.extend

Sam Jaffe 1 mese fa
parent
commit
a04aa028b7
1 ha cambiato i file con 1 aggiunte e 4 eliminazioni
  1. 1 4
      src/cipy/common.py

+ 1 - 4
src/cipy/common.py

@@ -155,10 +155,7 @@ class Context(SimpleNamespace):
     @contextmanager
     def extend(self, **kwargs: Any) -> Iterator[Context]:
         """Create a new context that inherits an extra property"""
-        try:
-            yield Context(**vars(self), **kwargs)
-        finally:
-            pass
+        yield Context(**vars(self), **kwargs)
 
 
 class Action(BaseModel, abc.ABC):