Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .set(), and .save() to be chainable. #11

Open
cjwelborn opened this issue Jun 9, 2020 · 0 comments · May be fixed by #15
Open

Allow .set(), and .save() to be chainable. #11

cjwelborn opened this issue Jun 9, 2020 · 0 comments · May be fixed by #15

Comments

@cjwelborn
Copy link
Member

There is a setsave() method for all classes, but this wouldn't even be needed if set() and save() were chainable. Neither have a return, so they're just returning None. There may be other places where this would make a difference. Just return self to allow:

settings = load_json_settings(myfile, {'mykey': 'myvalue'})
settings.set('this', 'that').save()

It was just a thought. setsave() probably wouldn't exist if I had considered this earlier (I usually do, but this project is kinda old).

@aitorres aitorres linked a pull request Dec 15, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant