diff options
author | BonfaceKilz | 2021-05-19 22:00:02 +0300 |
---|---|---|
committer | zsloan | 2021-06-18 22:08:04 +0000 |
commit | 5c48d14d95b46caa10bcdbd80aec1ae04ec7f225 (patch) | |
tree | 474233b3aa1b8db3e34589593168666fa38d8ff2 /gn3/db | |
parent | a1f48d95f17e939512fa9c276caf39d9f75878f9 (diff) | |
download | genenetwork3-5c48d14d95b46caa10bcdbd80aec1ae04ec7f225.tar.gz |
db: phenotypes: Add type for Dataclass
See: https://www.py4u.net/discuss/188952
Diffstat (limited to 'gn3/db')
-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: |