Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove{suffix,prefix} replaces {l,r}strip in pytorch/data/torchdata/d…
…atapipes/iter/util/bz2fileloader.py +1 Summary: `x.lstrip("string")` is equivalent to `re.sub(r"[string]", "", x)`. This means that `"fbcode/fbcode_file".lstrip("fbcode/")` returns `_file`. This can easily be an unintended behaviour! Instead, as of Python 3.10, we should use `string.removeprefix` or `string.removesuffix`. This diff makes one or more such fixes that we believe are likely to be bugs. Please double-check before approving. Reviewed By: zsol Differential Revision: D55386281 fbshipit-source-id: 16a082f06f2820e87bbe9df69877a8d07ee97218
- Loading branch information