Skip to content

Commit 13aa5fa

Browse files
committed
Refactor @containers.copy() decorator
1 parent 64a7a18 commit 13aa5fa

File tree

3 files changed

+110
-90
lines changed

3 files changed

+110
-90
lines changed

docs/main/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ follows `Semantic versioning`_
99

1010
Development version
1111
-------------------
12+
- Refactor ``@containers.copy()`` decorator.
1213
- Refactor async mode support in containers module.
1314

1415
4.23.5

src/dependency_injector/containers.c

Lines changed: 107 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dependency_injector/containers.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ def override(object container):
659659
def copy(object container):
660660
""":py:class:`DeclarativeContainer` copying decorator.
661661
662-
This decorator copy all providers from provided container to decorated one.
662+
This decorator copies all providers from provided container to decorated one.
663663
If one of the decorated container providers matches to source container
664664
providers by name, it would be replaced by reference.
665665
@@ -676,7 +676,7 @@ def copy(object container):
676676
try:
677677
source_provider = source_providers[name]
678678
except KeyError:
679-
...
679+
continue
680680
else:
681681
memo[id(source_provider)] = provider
682682

0 commit comments

Comments
 (0)