add options for several IO operation
Type of changes
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation / docstrings
- [ ] Tests
- [x] Other
Checklist
- [x] I've run the latest black with default args on new code.
- [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- [ ] I've added tests for new code.
- [x] I accept that @willmcgugan may be pedantic in the code review.
Description
Pre discuss in #361, this PR add options for readbytes and readtext in each class.
Also it changes a behavior in FS.open, I found this when I was investigate if there's any other thing to be changed.
It seems no extra parameters are required for iotools.make_stream, and the description for options is arguments for the filesystem. So I guess it was misplaced and move options for openbin inside the function.
Just an observation, readtext is as readable as read_text. But I guess it is down to historical design decision.
And maybe it's worth adding docstrings like this too?
Question for @willmcgugan - looking at https://docs.pyfilesystem.org/en/latest/reference/base.html , should all functions that take path parameter(s) also take an options kwargs?
@tzing Sorry for potentially opening a can of worms... :confused: Your PR looks great so far IMHO :+1:
ping @willmcgugan