Last active
August 30, 2021 23:52
-
-
Save stabacco/51cab1431ed3e0a74283a5bfe5f303a5 to your computer and use it in GitHub Desktop.
Python Postfix Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.jdump : Json Dumps | |
ANY → import json;json.dumps($expr$)$END$ | |
.pypara: Pytest Mark Parametrize | |
ANY → @pytest.mark.parametrize("one, two", [(),()])$END$ | |
.log : Logging Init | |
ANY → import logging\n LOGGER = logging.getLogger(__name__)$END$ | |
.quote : Quotes Around String | |
ANY → '$expr$'$END$ | |
.pprint: PPrint it | |
ANY → import pprint;pprint.pprint($expr$)$END$ | |
.Optional: Wrap with Typing Optional | |
ANY → Optional[($expr$)]$END$ | |
.List: Wrap with Typing List | |
ANY → List[($expr$)]$END$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment