0d601f9bcb41dd6aaed16cf39dd75f6f0fb63930,src/syft/lib/python/string.py,String,rindex,#String#Any#Any#Any#,288
Before Change
def rindex(
self, sub: Any, start: int = 0, end: Optional[int] = None
) -> PyPrimitive:
if end is None:
end = super().__len__()
res = super().rindex(sub, start, end)
return PrimitiveFactory.generate_primitive(value=res)
@syft_decorator(typechecking=True, prohibit_args=False)
After Change
start: Optional[int] = 0,
end: Optional[int] = None,
) -> PyPrimitive:
sub = str(sub) if isinstance(sub, String) else sub
res = super().rindex(sub, start, end) // type: ignore
return PrimitiveFactory.generate_primitive(value=res)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: OpenMined/PySyft
Commit Name: 0d601f9bcb41dd6aaed16cf39dd75f6f0fb63930
Time: 2020-10-24
Author: tudorcebere@gmail.com
File Name: src/syft/lib/python/string.py
Class Name: String
Method Name: rindex
Project Name: OpenMined/PySyft
Commit Name: 0d601f9bcb41dd6aaed16cf39dd75f6f0fb63930
Time: 2020-10-24
Author: tudorcebere@gmail.com
File Name: src/syft/lib/python/string.py
Class Name: String
Method Name: rfind
Project Name: OpenMined/PySyft
Commit Name: 0d601f9bcb41dd6aaed16cf39dd75f6f0fb63930
Time: 2020-10-24
Author: tudorcebere@gmail.com
File Name: src/syft/lib/python/string.py
Class Name: String
Method Name: replace