6b642c8e0fa07c971a89e4fb70bdf539b04042cc,functions/KeyMetadata.py,KeyMetadata,updateKeyMetadata,#KeyMetadata#Any#Any#,66
Before Change
if bandIndex == -1:
if len(self.propertyName) > 0:
keyMetadata[self.propertyName] = self.propertyValue
elif bandIndex < len(self.bandNames):
keyMetadata["bandname"] = self.bandNames[bandIndex]
return keyMetadata
After Change
return kwargs
def updateKeyMetadata(self, names, bandIndex, **keyMetadata):
if self.props is None:
return keyMetadata
properties = self.props
if bandIndex != -1:
if "bandproperties" not in properties.keys():
return keyMetadata
bandProps = self.props["bandproperties"]
if not bandProps or len(bandProps) < bandIndex + 1:
return keyMetadata
properties = bandProps[bandIndex]
for name in names:
if name in properties.keys():
assign = properties[name]
keyMetadata[name] = str(assign) if isinstance(assign, unicode) else assign
return keyMetadata
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: Esri/raster-functions
Commit Name: 6b642c8e0fa07c971a89e4fb70bdf539b04042cc
Time: 2015-05-25
Author: rsumbaly@esri.com
File Name: functions/KeyMetadata.py
Class Name: KeyMetadata
Method Name: updateKeyMetadata
Project Name: catalyst-cooperative/pudl
Commit Name: e2d9e370df886382d0815f2e68925f8dc49986b0
Time: 2019-05-30
Author: zane.selvans@catalyst.coop
File Name: pudl/extract/ferc1.py
Class Name:
Method Name: extract
Project Name: apache/incubator-tvm
Commit Name: 6770d28a844597e064b2e0902a36207ff877857d
Time: 2020-09-03
Author: kevinthesunwy@gmail.com
File Name: python/tvm/relay/frontend/tensorflow.py
Class Name: GraphProto
Method Name: _get_relay_func