mirror of
https://github.com/openai/shap-e.git
synced 2026-02-03 02:04:33 +08:00
Fix TypeError for AttrDcit in Python <= 3.8 (#75)
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Callable, Dict, List, Optional
|
||||
from typing import OrderedDict, Generic, TypeVar
|
||||
|
||||
K = TypeVar('K')
|
||||
V = TypeVar('V')
|
||||
|
||||
class AttrDict(OrderedDict):
|
||||
class AttrDict(OrderedDict[K, V], Generic[K, V]):
|
||||
"""
|
||||
An attribute dictionary that automatically handles nested keys joined by "/".
|
||||
|
||||
|
||||
Reference in New Issue
Block a user