emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/yasnippet-snippets b00a7c9f9a 08/13: Implement missing pyt


From: ELPA Syncer
Subject: [nongnu] elpa/yasnippet-snippets b00a7c9f9a 08/13: Implement missing python special methods. (#467)
Date: Fri, 5 Jan 2024 07:00:46 -0500 (EST)

branch: elpa/yasnippet-snippets
commit b00a7c9f9a17ccdfddcd701af60cf02bf4893cb9
Author: Julien Palard <julien@palard.fr>
Commit: GitHub <noreply@github.com>

    Implement missing python special methods. (#467)
---
 snippets/python-mode/__aenter__        | 8 ++++++++
 snippets/python-mode/__aexit__         | 7 +++++++
 snippets/python-mode/__aiter__         | 7 +++++++
 snippets/python-mode/__anext__         | 7 +++++++
 snippets/python-mode/__await__         | 7 +++++++
 snippets/python-mode/__bytes__         | 7 +++++++
 snippets/python-mode/__ceil__          | 7 +++++++
 snippets/python-mode/__class_getitem__ | 7 +++++++
 snippets/python-mode/__dir__           | 7 +++++++
 snippets/python-mode/__floor__         | 7 +++++++
 snippets/python-mode/__format__        | 7 +++++++
 snippets/python-mode/__imatmul__       | 7 +++++++
 snippets/python-mode/__init_subclass__ | 8 ++++++++
 snippets/python-mode/__length_hint__   | 7 +++++++
 snippets/python-mode/__matmul__        | 7 +++++++
 snippets/python-mode/__missing__       | 7 +++++++
 snippets/python-mode/__prepare__       | 7 +++++++
 snippets/python-mode/__rmatmul__       | 7 +++++++
 snippets/python-mode/__round__         | 7 +++++++
 snippets/python-mode/__set_name__      | 7 +++++++
 snippets/python-mode/__trunc__         | 7 +++++++
 21 files changed, 149 insertions(+)

diff --git a/snippets/python-mode/__aenter__ b/snippets/python-mode/__aenter__
new file mode 100644
index 0000000000..1e6db3bbcb
--- /dev/null
+++ b/snippets/python-mode/__aenter__
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: __aenter__
+# key: _aenter
+# group: Special methods
+# --
+async def __aenter__(self):
+    $0
+    return self
diff --git a/snippets/python-mode/__aexit__ b/snippets/python-mode/__aexit__
new file mode 100644
index 0000000000..78ab8e2be2
--- /dev/null
+++ b/snippets/python-mode/__aexit__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __aexit__
+# key: _aexit
+# group: Special methods
+# --
+async def __aexit__(self, exc_type, exc_value, traceback):
+    $0
diff --git a/snippets/python-mode/__aiter__ b/snippets/python-mode/__aiter__
new file mode 100644
index 0000000000..3c8e08babb
--- /dev/null
+++ b/snippets/python-mode/__aiter__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __aiter__
+# key: _aiter
+# group: Special methods
+# --
+def __aiter__(self):
+    return $0
diff --git a/snippets/python-mode/__anext__ b/snippets/python-mode/__anext__
new file mode 100644
index 0000000000..aaab2fac8c
--- /dev/null
+++ b/snippets/python-mode/__anext__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __anext__
+# key: _anext
+# group: Special methods
+# --
+async def __anext__(self):
+    return $0
diff --git a/snippets/python-mode/__await__ b/snippets/python-mode/__await__
new file mode 100644
index 0000000000..10463d5561
--- /dev/null
+++ b/snippets/python-mode/__await__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __await__
+# key: _await
+# group: Special methods
+# --
+def __await__(self):
+    $0
diff --git a/snippets/python-mode/__bytes__ b/snippets/python-mode/__bytes__
new file mode 100644
index 0000000000..f1ab4c963f
--- /dev/null
+++ b/snippets/python-mode/__bytes__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __bytes__
+# key: _bytes
+# group: Special methods
+# --
+def __bytes__(self):
+    return $0
diff --git a/snippets/python-mode/__ceil__ b/snippets/python-mode/__ceil__
new file mode 100644
index 0000000000..8ea4c81f45
--- /dev/null
+++ b/snippets/python-mode/__ceil__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ceil__
+# key: _ceil
+# group: Special methods
+# --
+def __ceil__(self):
+    return $0
diff --git a/snippets/python-mode/__class_getitem__ 
b/snippets/python-mode/__class_getitem__
new file mode 100644
index 0000000000..9a3f99f834
--- /dev/null
+++ b/snippets/python-mode/__class_getitem__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __class_getitem__
+# key: _class_getitem
+# group: Special methods
+# --
+def __class_getitem__(cls, key):
+    return $0
diff --git a/snippets/python-mode/__dir__ b/snippets/python-mode/__dir__
new file mode 100644
index 0000000000..0eef364326
--- /dev/null
+++ b/snippets/python-mode/__dir__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __dir__
+# key: _dir
+# group: Special methods
+# --
+def __dir__(self):
+    return $0
diff --git a/snippets/python-mode/__floor__ b/snippets/python-mode/__floor__
new file mode 100644
index 0000000000..9c5941229a
--- /dev/null
+++ b/snippets/python-mode/__floor__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __floor__
+# key: _floor
+# group: Special methods
+# --
+def __floor__(self):
+    return $0
diff --git a/snippets/python-mode/__format__ b/snippets/python-mode/__format__
new file mode 100644
index 0000000000..efbe00c01a
--- /dev/null
+++ b/snippets/python-mode/__format__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __format__
+# key: _format
+# group: Special methods
+# --
+def __format__(self, format_spec):
+    return $0
diff --git a/snippets/python-mode/__imatmul__ b/snippets/python-mode/__imatmul__
new file mode 100644
index 0000000000..e162beedea
--- /dev/null
+++ b/snippets/python-mode/__imatmul__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __imatmul__
+# key: _imatmul
+# group: Special methods
+# --
+def __imatmul__(self, other):
+    return $0
diff --git a/snippets/python-mode/__init_subclass__ 
b/snippets/python-mode/__init_subclass__
new file mode 100644
index 0000000000..371f264c28
--- /dev/null
+++ b/snippets/python-mode/__init_subclass__
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: __init_subclass__
+# key: _init_subclass
+# group: Special methods
+# --
+def __init_subclass__(cls, /${1:, param}, **kwargs):
+    super().__init_subclass__(**kwargs)
+    $0
diff --git a/snippets/python-mode/__length_hint__ 
b/snippets/python-mode/__length_hint__
new file mode 100644
index 0000000000..4725963acd
--- /dev/null
+++ b/snippets/python-mode/__length_hint__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __length_hint__
+# key: _length_hint
+# group: Special methods
+# --
+def __length_hint__(self):
+    return $0
diff --git a/snippets/python-mode/__matmul__ b/snippets/python-mode/__matmul__
new file mode 100644
index 0000000000..983d29bc54
--- /dev/null
+++ b/snippets/python-mode/__matmul__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __matmul__
+# key: _matmul
+# group: Special methods
+# --
+def __matmul__(self, other):
+    return $0
diff --git a/snippets/python-mode/__missing__ b/snippets/python-mode/__missing__
new file mode 100644
index 0000000000..bf7985150f
--- /dev/null
+++ b/snippets/python-mode/__missing__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __missing__
+# key: _missing
+# group: Special methods
+# --
+def __missing__(self):
+    return $0
diff --git a/snippets/python-mode/__prepare__ b/snippets/python-mode/__prepare__
new file mode 100644
index 0000000000..0041ab06b5
--- /dev/null
+++ b/snippets/python-mode/__prepare__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __prepare__
+# key: _prepare
+# group: Special methods
+# --
+def __prepare__(name, bases, **kwds):
+    return ${0:\{\}}
diff --git a/snippets/python-mode/__rmatmul__ b/snippets/python-mode/__rmatmul__
new file mode 100644
index 0000000000..2acfe418f5
--- /dev/null
+++ b/snippets/python-mode/__rmatmul__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rmatmul__
+# key: _rmatmul
+# group: Special methods
+# --
+def __rmatmul__(self, other):
+    return $0
diff --git a/snippets/python-mode/__round__ b/snippets/python-mode/__round__
new file mode 100644
index 0000000000..5d6c3f1daa
--- /dev/null
+++ b/snippets/python-mode/__round__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __round__
+# key: _round
+# group: Special methods
+# --
+def __round__(self, ndigits=None):
+    return $0
diff --git a/snippets/python-mode/__set_name__ 
b/snippets/python-mode/__set_name__
new file mode 100644
index 0000000000..5bba1fec65
--- /dev/null
+++ b/snippets/python-mode/__set_name__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __set_name__
+# key: _set_name
+# group: Special methods
+# --
+def __set_name__(self, owner, name):
+    $0
diff --git a/snippets/python-mode/__trunc__ b/snippets/python-mode/__trunc__
new file mode 100644
index 0000000000..52401bf1e1
--- /dev/null
+++ b/snippets/python-mode/__trunc__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __trunc__
+# key: _trunc
+# group: Special methods
+# --
+def __trunc__(self):
+    return $0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]