Commit Graph

6 Commits

Author SHA1 Message Date
Roman Mogylatov
f961ff536a
Schemas (#429)
* Add single container prototype

* Add multiple containers prototype

* Add integration tests

* Implement from_*() methods and add tests

* Prototype inline injections

* Add integration test for inline providers

* Refactor integration tests

* Add integration test for reordered schema

* Remove unused imports from tests

* Refactor schema module

* Update tests to match latest schemas

* Add mypy_boto3_s3 to the test requirements

* Add boto3 to the test requirements

* Add set_provides for Callable, Factory, and Singleton providers

* Fix warnings in tests

* Add typing stubs for Callable, Factory, and Singleton .set_provides() attributes

* Fix singleton children to have optional provides

* Implement provider to provider resolving

* Fix pypy3 tests

* Implement boto3 session use case and add tests

* Implement lazy initialization and improve copying for Callable, Factory, Singleton, and Coroutine providers

* Fix Python 2 tests

* Add region name for boto3 integration example

* Remove f-strings from set_provides()

* Fix schema flake8 errors

* Implement lazy initialization and improve copying for Delegate provider

* Implement lazy initialization and improve copying for Object provider

* Speed up wiring tests

* Implement lazy initialization and improve copying for FactoryAggregate provider

* Implement lazy initialization and improve copying for Selector provider

* Implement lazy initialization and improve copying for Dependency provider

* Implement lazy initialization and improve copying for Resource provider

* Implement lazy initialization and improve copying for Configuration provider

* Implement lazy initialization and improve copying for ProvidedInstance provider

* Implement lazy initialization and improve copying for AttributeGetter provider

* Implement lazy initialization and improve copying for ItemGetter provider

* Implement lazy initialization and improve copying for MethodCaller provder

* Update changelog

* Fix typing in wiring module

* Fix wiring module loader uninstallation issue

* Fix provided instance providers error handing in asynchronous mode

Co-authored-by: Roman Mogylatov <rmk@Romans-MacBook-Pro.local>
2021-03-20 13:16:51 -04:00
Roman Mogylatov
6c1b7cc677 Remove restriction to wire a dynamic container 2021-03-19 20:23:10 -04:00
Roman Mogylatov
da13341453
Wiring: attribute injections (#414)
* Add implementation

* Add tests for module and class

* Add tests for module and class for string ids

* Update tests with typing

* Add tests for invalid type of marker

* Add docs and the example

* Update changelog

* Fix Python 3.6 tests and flake8
2021-02-28 21:07:50 -05:00
Shubhendra Singh Chauhan
43eb15ed65
fix: code quality issues (#406)
* Refactor unnecessary `else` / `elif` when `if` block has a `return` statement

* Remove unused imports

* Use literal syntax to create data structure

* revert "remove unused import"
2021-02-25 09:44:15 -05:00
Roman Mogylatov
5f6777db19 Add tests for `.as_float()` modifier usage with wiring 2021-02-23 10:20:04 -05:00
Roman Mogylatov
a4a84bea54
Wiring by string id (#403)
* Add prototype implementation

* Implement wiring by string id

* Fix pydocstyle errors

* Refactor wiring module

* Fix flake8 errors

* Update changelog

* Fix flake8 errors

* Add example and docs
2021-02-21 10:34:28 -05:00