Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore parameters with default values #1

Closed
simonw opened this issue Nov 17, 2021 · 4 comments
Closed

Ignore parameters with default values #1

simonw opened this issue Nov 17, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Nov 17, 2021

e.g. in this signature:

    @inject
    async def foo(bar, baz=1):
        # ...

Only bar should get the injection treatment. baz should be ignored.

@simonw simonw added the enhancement New feature or request label Nov 17, 2021
@simonw simonw closed this as completed in 25a73fd Nov 17, 2021
@simonw
Copy link
Owner Author

simonw commented Nov 17, 2021

@simonw simonw reopened this Nov 17, 2021
@simonw
Copy link
Owner Author

simonw commented Nov 17, 2021

Actually tests started failing with previous commit here: f5358ac

@simonw
Copy link
Owner Author

simonw commented Nov 17, 2021

I think the problem is here:

121  	        awaitable_results = await asyncio.gather(*awaitables)
122  ->	        assert False
123  	        results.update(
124  	            {p[0].__name__: p[1] for p in zip(awaitables, awaitable_results)}
125  	        )
126  	
127  	    return results
(Pdb) awaitables
[<coroutine object inner at 0x10ad8a0a0>]

The name of that coroutine object shouldn't be inner.

simonw added a commit that referenced this issue Nov 17, 2021
@simonw simonw closed this as completed Nov 17, 2021
simonw added a commit that referenced this issue Nov 17, 2021
simonw added a commit that referenced this issue Dec 21, 2021
Refs #1, #2, #3, #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant