Skip to content
#

type-hints

Here are 63 public repositories matching this topic...

prisma-client-py
RobertCraigie
RobertCraigie commented Feb 4, 2022

Problem

We could improve the readability / experience reading through the library source code if there were module level docstrings.

Suggested solution

All python modules should include a docstring explaining

topic: docs good first issue kind/docs level/beginner
s-knibbs
s-knibbs commented Jun 30, 2019

It seems that the typing module doesn't flatten nested literal type definitions, so the following does not currently work:

SuccessStatus = Literal[200, 201, 204]
ClientError = Literal[404, 401, 403, 409, 400]
ServerError = Literal[500, 504, 503]

@dataclass
class HttpResponse(JsonSchemaMixin):
    status: Literal[SuccessStatus, ClientError, ServerError]
    ...
enhancement good first issue

A python 3 library providing functions and decorators to automatically generate class code, such as constructor body or properties getters/setters along with optional support of validation contracts on the generated setters. Its objective is to reduce the amount of copy/paste code in your classes - and hence to help reducing human mistakes :).

  • Updated Apr 19, 2021
  • Python

Improve this page

Add a description, image, and links to the type-hints topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the type-hints topic, visit your repo's landing page and select "manage topics."

Learn more