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
Use FileLock as a decorator #127
Comments
This is already possible https://github.com/tox-dev/py-filelock/blob/main/src/filelock/_api.py#L207-L229 |
@gaborbernat sorry, I meant as a context decorator. |
Can you give an example of where, how and why you would want this? |
I am using this for a regression test, where if I have multiple instances running on the same machine they interfere with each other. My current usage is:
Thanks |
Sure, put in a PR with tests, documentation and changelog entry 👌 |
@gaborbernat I made a PR with tests, documentation (I added an example in the tutorial in index.rst) & a changelog entry Is there anything else I should add? Thanks |
Should be possible by inheriting from contextlib.ContextDecorator. What's required to contribute to the project?
The text was updated successfully, but these errors were encountered: