소스 검색

refactor: remove unneeded try-finally from Context.extend

Sam Jaffe 1 개월 전
부모
커밋
a04aa028b7
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  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):