From 1b5c305a22522f5605e7da8adafbb31c8bc5f7ad Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Tue, 21 Nov 2023 12:42:02 -0500 Subject: [PATCH] improve python snippets --- configs/Code/User/snippets/python.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configs/Code/User/snippets/python.json b/configs/Code/User/snippets/python.json index acd1b1c..a60028e 100644 --- a/configs/Code/User/snippets/python.json +++ b/configs/Code/User/snippets/python.json @@ -56,15 +56,19 @@ "body": "from pathlib import Path" }, "Get a logger instance": { - "prefix": "getlogger", - "body": "logger = logging.getLogger(__name__)" + "prefix": "logger", + "body": "logger = logging.getLogger(${1|__name__,'werkzeug'|})" }, "Import dataclass": { "prefix":"impdataclass", - "body": "from dataclasses import dataclass, field" + "body": "from dataclasses import dataclass${1:, field}" + }, + "Import datetime": { + "prefix":"impdatetime", + "body": "from datetime import datetime" }, "Import enums": { "prefix":"impenum", - "body": "from enum import Enum, auto" + "body": "from enum import Enum${1:, auto}" } } \ No newline at end of file