Add an advent of code template for python-base-mode
This commit is contained in:
parent
124681c875
commit
5ecb04b86f
20
templates
20
templates
|
@ -10,6 +10,26 @@ nix-mode
|
||||||
"in" n
|
"in" n
|
||||||
> "fhs.env")
|
> "fhs.env")
|
||||||
|
|
||||||
|
python-base-mode
|
||||||
|
|
||||||
|
(aoc "EXAMPLE=\"\"\"" n
|
||||||
|
"\"\"\"" n n
|
||||||
|
"class " (p "MyClass" class) ":" n
|
||||||
|
> "def __init__(self, input: str) -> None:" n
|
||||||
|
> "self._input = input[1:]" n
|
||||||
|
> "return" n n
|
||||||
|
> "def __str__(self) -> str:" n
|
||||||
|
> "return f\"Part1: {self._part1}\\nPart2: {self._part2}\"" n n
|
||||||
|
> "@property" n
|
||||||
|
> "def _part1(self) -> int:" n
|
||||||
|
> "return None" n n
|
||||||
|
> "@property" n
|
||||||
|
> "def _part2(self) -> int:" n
|
||||||
|
> "return None" n n n
|
||||||
|
"if __name__ == \"__main__\":" n
|
||||||
|
> "example = " (s class) "(EXAMPLE)" n
|
||||||
|
> "print(example)")
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; mode: lisp-data
|
;; mode: lisp-data
|
||||||
;; outline-regexp: "[a-z]"
|
;; outline-regexp: "[a-z]"
|
||||||
|
|
Loading…
Reference in a new issue