Tuukka Mustonen

Results 47 issues of Tuukka Mustonen

### Summary Typically, annotation-only imports may be skipped during runtime (for perf gains) with `if TYPE_CHECKING` blocks. There are even linters to enforce this, ie. nag when an annotation-only import...

Documentation :books:
Help Wanted :sos:
Good First Issue

### Description The `AbstractSecurityConfig` adds OpenAPI `securityScheme` and `security` entries to the generated spec, but it does so at the root level of the spec, instead of per endpoint. That...

Bug :bug:
Help Wanted :sos:
area/openapi

Hi, thanks for the great library. Taking it into use in a legacy repository that we've been refactoring mercilessly! The layered mode will come to good use. What would you...

While you're probably not supported to run this in production or in public servers, sometimes that would be just convenient. Securing with Basic auth wouldn't probably be too big a...

enhancement
help wanted

Add type hints to all (public API) code make the distribution PEP 561 compliant. This allows `mypy` (and other tools?) to find the type hints and use them in linting....

help-wanted

See: https://bitbucket.org/ollyc/yoyo/issues/14/mysql-with-innodb-utf8mb4-causes-problems I didn't actually test it, but looking at source code, it seems like arnold would suffer from the same issue, because table is created using `model.create_table()` and `migration`...

### Summary There are 4 ways to authenticate/authorize requests: 1. `AbstractAuthenticationMiddleware` middleware 2. `AbstractSecurityConfig` middleware 3. Usual DI logic 4. Guards There are certain shortcomings: 1. `AbstractAuthenticationMiddleware` does not add...

Enhancement

### Summary https://docs.litestar.dev/2/usage/requests.html#request-body states that: > The type of data an be any supported type, including > > - [dataclasses](https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass) > - [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict) > - Pydantic models > - Arbitrary...

Documentation :books:

```py async def factory(c: Container): some_stuff = await c.aget(SomeOtherType) # async factory because we want to do this return SomeType(some_stuff) registry.register_factory(SomeType, factory) ``` Let's say `SomeType` is also context manager....

bug

**Feature** Allow `mypy --no-module-detection` (or similar flag) to run without mypy attempting to map files as modules. For example, linting standalone scripts should not require module detection magic. **Pitch** Mypy...

feature