Skip to content

Commit 2ce4a1c

Browse files
committed
Update flask-blueprints example
1 parent 17be5f9 commit 2ce4a1c

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

examples/miniapps/flask-blueprints/README.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,21 @@ The output should be something like:
8181

8282
.. code-block::
8383
84-
platform darwin -- Python 3.9, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
85-
plugins: flask-1.0.0, cov-2.10.0
84+
platform darwin -- Python 3.10.0, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
85+
plugins: cov-3.0.0, flask-1.2.0
8686
collected 2 items
8787
8888
githubnavigator/tests.py .. [100%]
8989
90-
---------- coverage: platform darwin, python 3.9 -----------
91-
Name Stmts Miss Cover
92-
----------------------------------------------------
93-
githubnavigator/__init__.py 0 0 100%
94-
githubnavigator/application.py 15 0 100%
95-
githubnavigator/blueprints/example.py 12 0 100%
96-
githubnavigator/containers.py 7 0 100%
97-
githubnavigator/services.py 14 0 100%
98-
githubnavigator/tests.py 34 0 100%
99-
-----------------------------------------------------------
100-
TOTAL 82 0 100%
90+
---------- coverage: platform darwin, python 3.10.0-final-0 ----------
91+
Name Stmts Miss Cover
92+
------------------------------------------------------------
93+
githubnavigator/__init__.py 0 0 100%
94+
githubnavigator/application.py 13 0 100%
95+
githubnavigator/blueprints/__init__.py 0 0 100%
96+
githubnavigator/blueprints/example.py 12 0 100%
97+
githubnavigator/containers.py 8 0 100%
98+
githubnavigator/services.py 14 0 100%
99+
githubnavigator/tests.py 34 0 100%
100+
------------------------------------------------------------
101+
TOTAL 81 0 100%

examples/miniapps/flask-blueprints/githubnavigator/application.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
def create_app() -> Flask:
1111
container = Container()
12-
container.config.from_yaml("config.yml")
1312
container.config.github.auth_token.from_env("GITHUB_TOKEN")
14-
container.wire(modules=[example])
1513

1614
app = Flask(__name__)
1715
app.container = container

examples/miniapps/flask-blueprints/githubnavigator/containers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
class Container(containers.DeclarativeContainer):
1010

11-
config = providers.Configuration()
11+
wiring_config = containers.WiringConfiguration(packages=[".blueprints"])
12+
13+
config = providers.Configuration(yaml_files=["config.yml"])
1214

1315
github_client = providers.Factory(
1416
Github,

0 commit comments

Comments
 (0)