606ab2e4f73fd749b9191de4313b92b125b1cbba,descarteslabs/workflows/types/containers/known_dict.py,KnownDict,get,#KnownDict#Any#Any#,80
Before Change
except (TypeError, KeyError):
result_cls = vt
try:
item = kt._promote(item)
except ProxyTypeError:
raise ProxyTypeError(
"Dict keys are of type {}, but indexed with {}".format(kt, item)
)
try:
default = vt._promote(default)
except ProxyTypeError:
raise ProxyTypeError(
After Change
def get(self, key, default):
try:
result_cls = self._type_params[0][key]
except (TypeError, KeyError):
result_cls = self.value_type
return result_cls._from_apply(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: descarteslabs/descarteslabs-python
Commit Name: 606ab2e4f73fd749b9191de4313b92b125b1cbba
Time: 2020-06-11
Author: gabe@descarteslabs.com
File Name: descarteslabs/workflows/types/containers/known_dict.py
Class Name: KnownDict
Method Name: get
Project Name: descarteslabs/descarteslabs-python
Commit Name: 68828f650886dad698320814f98ce520b31cb5a1
Time: 2020-02-06
Author: 51922948+sdelany2@users.noreply.github.com
File Name: descarteslabs/workflows/types/containers/tuple_.py
Class Name: Tuple
Method Name: __getitem__
Project Name: descarteslabs/descarteslabs-python
Commit Name: 606ab2e4f73fd749b9191de4313b92b125b1cbba
Time: 2020-06-11
Author: gabe@descarteslabs.com
File Name: descarteslabs/workflows/types/containers/known_dict.py
Class Name: KnownDict
Method Name: __getitem__