The Wayback Machine - https://web.archive.org/web/20220429191540/https://github.com/topics/dataclasses
Skip to content
#

dataclasses

Here are 120 public repositories matching this topic...

notion-sdk-py
stereorobin
stereorobin commented Oct 7, 2021

Hello,
I'm having problems creating a database, mostly due to lack of any examples.
I can create a page just fine, but am having problems with databases.
I think I just get type/format of the title and properties wrong.

Would be great to have an example of how to create a database with a title and a text property.

Thanks for your great work!

documentation enhancement good first issue
corranwebster
corranwebster commented Sep 30, 2020

It is common to have Union traits of the form Union(None, <something>). As a convenience to developers, and following a similar convention in Python's typing module, we should consider having Optional(<something>) as an alternative way of writing Union(None, <something>).

An alternative would be to make allow_none metadata universally accepted across TraitType instances.

SimpleParsing
aoikaneko
aoikaneko commented Jan 15, 2022

Is your feature request related to a problem? Please describe.
'choices' does not seem to be checked in load() method and invalid value can be set via the method.

To reproduce:

config.yml

animal: bird

argtest.py

import dataclasses
import simple_parsing as sp
from simple_parsing.helpers import Serializable

@dataclasses.dataclass
class Config(Serializabl
help wanted good first issue
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

Improve this page

Add a description, image, and links to the dataclasses 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 dataclasses topic, visit your repo's landing page and select "manage topics."

Learn more