diff options
author | BonfaceKilz | 2021-05-19 22:00:02 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-05-20 23:25:59 +0300 |
commit | 6556efbaeba3a49de8d821de30d723a965ef4ada (patch) | |
tree | b7cd309fb9acbf2f8df9e9124aed5beeea10534f /gn3 | |
parent | 7565712744fdda4b530e4f40dd2765617546c393 (diff) | |
download | genenetwork3-6556efbaeba3a49de8d821de30d723a965ef4ada.tar.gz |
db: phenotypes: Add type for Dataclass
See: https://www.py4u.net/discuss/188952
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/db/phenotypes.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gn3/db/phenotypes.py b/gn3/db/phenotypes.py index be5fb7b..e97322a 100644 --- a/gn3/db/phenotypes.py +++ b/gn3/db/phenotypes.py @@ -3,9 +3,16 @@ the db""" from dataclasses import dataclass, asdict, astuple -from typing import Any, Optional +from typing import Any, Dict, Optional from MySQLdb import escape_string +from typing_extensions import Protocol + + +class Dataclass(Protocol): + """Type Definition for a Dataclass""" + __dataclass_fields__: Dict + @dataclass(frozen=True) class Phenotype: |