Josiah Kaviani

Results 172 issues of Josiah Kaviani

`shield` object does not exist at the moment we implemented positional check in #360

feature

The first argument of the shield object should be a class. Functions or other objects are not allowed.

feature

If we wrote `shield(ClassWithKwargs, x=this.x, y=this.y)` then `ClassWithKwargs` should has `**kwargs` in it signature.

feature

If we wrote `shield(ClassWithArgs, this.x, this.y)` then `ClassWithArgs` should has `*args` in it signature.

feature

```python class Foo: def __init__(self, a, b, **kwargs): ... class Container(Injector): foo = shield(Foo, a=this.a) # -------- error ```

feature

Follow up of the #427 ```python from dependencies import Injector, shield, this class ClassWithKwargs: def __init__(self, x, y, **kwargs): ... class Container(Injector): foo = shield(ClassWithKwargs) x = 1 y =...

feature

Follow up of the #427 ```python from dependencies import Injector, shield, this class ClassWithArgs: def __init__(self, x, y, *args): ... class Container(Injector): foo = shield(ClassWithArgs) x = 1 y =...

feature

Supersedes #289 ```python @attrs class Book: title = attrib() author = attrib() def is_written_by(self, writer): return self.author == writer @attrs class LoggedBook: book = attrib() logger = attrib() def is_written_by(self,...

feature

#### Problem ```python >>> from dependencies import Injector, pluck, this >>> class Foo: ... def __init__(self, bar): ... self.bar = bar ... ... def do(self): ... return self.bar + '1'...

feature