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

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

[nongnu] elpa/yasnippet-snippets 9f67370d9d 01/13: Merge elpy snippets (


From: ELPA Syncer
Subject: [nongnu] elpa/yasnippet-snippets 9f67370d9d 01/13: Merge elpy snippets (again) (#465)
Date: Fri, 5 Jan 2024 07:00:44 -0500 (EST)

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

    Merge elpy snippets (again) (#465)
    
    * elpy-initialize-variables: Add the Elpy snippet directory.
    
    Elpy now ships with a few YASnippet snippets for Python.
    
    Fixes #43.
    
    * Small rework of the snippets.
    
    The enter and exit snippets now conform to the yasnippet-snippets
    repository (mostly), while super now makes use of the .yas-setup.el
    mechanism and is seriously improved. There's a new snippet for
    __init__ methods, too, which automatically assigns arguments to
    instance variables.
    
    * Rework and expand the snippet collection.
    
    * Add __bool__ snippet.
    
    * updated yasnippet variable 'text' to 'yas-text'
    
    * Return correct form of "super" depending on Python version
    
    Previously when using the yasnippet "super", it will always return
    "(class, arg).method" which was the Py2 way of doing it. In Py3, you
    could simply do "().method" and Python will understand.
    
    * Move yasnippet-snippets onto their own branch
    
    * PR #259 Change keys for __foo__ from "foo" to "_foo"
    
    Thanks to galaunay for the idea to use this to "avoid unnecessary
    keyspace pollution."
    
    * Fix bug due to passage from elpy to yasnippet
    
    * Use snippet expansion for foo -> __foo__
    
    * Fix bug when specifying arguments on several lines
    
    * Allow detection of Python 3 on PEP 394-compliant systems.
    
    Please note that python-interpreter must be set to "python3" for this
    to function correctly.
    
    As a side-effect it also allows the use of Python 2 on systems that
    install version 3 to /usr/bin/python and version 2 to
    /usr/bin/python2.
    
    * Change elpy prefixes to yas-snips
    
    Thanks to Andrea Crotti for the review and suggestion.
    
    * Add newline at end of file for all files that were missing one.
    
    * Make python snippets able to handle arguments with type annotations.
    
    * Use start-point from yas--apply-transform in snippet-init-assignment
    
    yas-snips-snippet-init-assignments should use values provided by
    yas--apply-transform instead of grabbing them itself.
    
    Thanks to npostavs for finding this issue.  See review discussion at
    PR #278 for more info (search for "yas--apply-transform").
    
    * Removing Python 2 snippets, it's EOL since 2020-01-01.
    
    * Some consistenty in group names.
    
    * Removing a duplicate.
    
    * Owner is documented as optional.
    
    cf. https://docs.python.org/3/reference/datamodel.html#object.__get__
    
    * Resolve a conflict between _getattr and _getattribute
    
    * Deduplicate: it already exists in master (named pdb).
    
    * Dedup: already exists as __repr__
    
    * Dedup: already exists as __str__
    
    * fix: try is already used by ./try
    
    * fix misleading key.
    
    * Consistency with other dunders.
    
    * Consistency with other naming.
    
    * Removing super, we don't have all needed elisp yet.
    
    * Deduplicate two keys.
    
    * s not needed.
    
    * The hook does not works for me.
    
    * Add few missing newlines at end of file.
    
    ---------
    
    Co-authored-by: Jorgen Schaefer <forcer@forcix.cx>
    Co-authored-by: Jorgen Schaefer <contact@jorgenschaefer.de>
    Co-authored-by: Daniel Wu <dawu@wgen.net>
    Co-authored-by: Daniel Gopar <gopardaniel@yahoo.com>
    Co-authored-by: Nicholas D Steeves <nsteeves@gmail.com>
    Co-authored-by: galaunay <gaby.launay@tutanota.com>
---
 snippets/python-mode/.yas-setup.el          | 31 ++++++++++++++++++-----------
 snippets/python-mode/__abs__                |  7 +++++++
 snippets/python-mode/__add__                |  7 +++++++
 snippets/python-mode/__and__                |  7 +++++++
 snippets/python-mode/__bool__               |  7 +++++++
 snippets/python-mode/__call__               |  7 +++++++
 snippets/python-mode/__cmp__                |  7 +++++++
 snippets/python-mode/__complex__            |  7 +++++++
 snippets/python-mode/__contains__           |  8 ++++----
 snippets/python-mode/__del__                |  7 +++++++
 snippets/python-mode/__delattr__            |  7 +++++++
 snippets/python-mode/__delete__             |  7 +++++++
 snippets/python-mode/__delitem__            |  7 +++++++
 snippets/python-mode/__div__                |  7 +++++++
 snippets/python-mode/__divmod__             |  7 +++++++
 snippets/python-mode/__enter__              |  6 +++---
 snippets/python-mode/{eq => __eq__}         |  6 +++---
 snippets/python-mode/__exit__               |  8 ++++----
 snippets/python-mode/__float__              |  7 +++++++
 snippets/python-mode/__floordiv__           |  7 +++++++
 snippets/python-mode/__ge__                 |  7 +++++++
 snippets/python-mode/__get__                |  7 +++++++
 snippets/python-mode/__getattr__            |  7 +++++++
 snippets/python-mode/__getattribute__       |  7 +++++++
 snippets/python-mode/__getitem__            |  8 ++++----
 snippets/python-mode/__gt__                 |  7 +++++++
 snippets/python-mode/__hash__               |  7 +++++++
 snippets/python-mode/__iadd__               |  7 +++++++
 snippets/python-mode/__iand__               |  7 +++++++
 snippets/python-mode/__idiv__               |  7 +++++++
 snippets/python-mode/__ifloordiv__          |  7 +++++++
 snippets/python-mode/__ilshift__            |  7 +++++++
 snippets/python-mode/__imod__               |  7 +++++++
 snippets/python-mode/__imul__               |  7 +++++++
 snippets/python-mode/__index__              |  7 +++++++
 snippets/python-mode/{init => __init__}     |  6 +++---
 snippets/python-mode/__instancecheck__      |  7 +++++++
 snippets/python-mode/__int__                |  7 +++++++
 snippets/python-mode/__invert__             |  7 +++++++
 snippets/python-mode/__ior__                |  7 +++++++
 snippets/python-mode/__ipow__               |  7 +++++++
 snippets/python-mode/__irshift__            |  7 +++++++
 snippets/python-mode/__isub__               |  7 +++++++
 snippets/python-mode/{iter => __iter__}     |  6 +++---
 snippets/python-mode/__itruediv__           |  7 +++++++
 snippets/python-mode/__ixor__               |  7 +++++++
 snippets/python-mode/__le__                 |  7 +++++++
 snippets/python-mode/__len__                |  6 +++---
 snippets/python-mode/__lshift__             |  7 +++++++
 snippets/python-mode/__lt__                 |  7 +++++++
 snippets/python-mode/__mod__                |  7 +++++++
 snippets/python-mode/__mul__                |  7 +++++++
 snippets/python-mode/__ne__                 |  7 +++++++
 snippets/python-mode/__neg__                |  7 +++++++
 snippets/python-mode/__new__                |  4 ++--
 snippets/python-mode/__or__                 |  7 +++++++
 snippets/python-mode/__pos__                |  7 +++++++
 snippets/python-mode/__pow__                |  7 +++++++
 snippets/python-mode/__radd__               |  7 +++++++
 snippets/python-mode/__rand__               |  7 +++++++
 snippets/python-mode/__rdivmod__            |  7 +++++++
 snippets/python-mode/{repr => __repr__}     |  6 +++---
 snippets/python-mode/__reversed__           |  7 +++++++
 snippets/python-mode/__rfloordiv__          |  7 +++++++
 snippets/python-mode/__rlshift__            |  7 +++++++
 snippets/python-mode/__rmod__               |  7 +++++++
 snippets/python-mode/__rmul__               |  7 +++++++
 snippets/python-mode/__ror__                |  7 +++++++
 snippets/python-mode/__rpow__               |  7 +++++++
 snippets/python-mode/__rrshift__            |  7 +++++++
 snippets/python-mode/__rshift__             |  7 +++++++
 snippets/python-mode/__rsub__               |  7 +++++++
 snippets/python-mode/__rtruediv__           |  7 +++++++
 snippets/python-mode/__rxor__               |  7 +++++++
 snippets/python-mode/__set__                |  7 +++++++
 snippets/python-mode/__setattr__            |  7 +++++++
 snippets/python-mode/__setitem__            |  8 ++++----
 snippets/python-mode/__slots__              |  7 +++++++
 snippets/python-mode/{str => __str__}       |  6 +++---
 snippets/python-mode/__sub__                |  7 +++++++
 snippets/python-mode/__subclasscheck__      |  7 +++++++
 snippets/python-mode/__truediv__            |  7 +++++++
 snippets/python-mode/__xor__                |  7 +++++++
 snippets/python-mode/all                    |  3 ++-
 snippets/python-mode/arg_positional         |  4 ++--
 snippets/python-mode/ase                    |  6 ++++++
 snippets/python-mode/asne                   |  6 ++++++
 snippets/python-mode/asr                    |  7 +++++++
 snippets/python-mode/assert                 |  2 +-
 snippets/python-mode/assertEqual            |  2 +-
 snippets/python-mode/assertFalse            |  2 +-
 snippets/python-mode/assertIn               |  2 +-
 snippets/python-mode/assertNotEqual         |  2 +-
 snippets/python-mode/assertNotIn            |  2 +-
 snippets/python-mode/assertRaises           |  2 +-
 snippets/python-mode/assertTrue             |  2 +-
 snippets/python-mode/bang                   |  2 +-
 snippets/python-mode/celery_pdb             |  2 +-
 snippets/python-mode/class_doxygen_doc      |  2 +-
 snippets/python-mode/classmethod            |  2 +-
 snippets/python-mode/dec                    |  2 +-
 snippets/python-mode/def                    |  7 +++++++
 snippets/python-mode/deftest                |  2 +-
 snippets/python-mode/django_test_class      |  4 ++--
 snippets/python-mode/doc                    |  2 +-
 snippets/python-mode/doctest                |  4 ++--
 snippets/python-mode/env                    |  6 ++++++
 snippets/python-mode/for                    |  2 +-
 snippets/python-mode/from                   |  7 ++++---
 snippets/python-mode/function_docstring     |  2 +-
 snippets/python-mode/function_doxygen_doc   |  2 +-
 snippets/python-mode/ife                    |  1 +
 snippets/python-mode/ifmain                 |  2 +-
 snippets/python-mode/import                 |  2 +-
 snippets/python-mode/init_docstring         |  2 +-
 snippets/python-mode/interact               |  2 +-
 snippets/python-mode/ipdb                   |  2 +-
 snippets/python-mode/iter                   |  4 ++--
 snippets/python-mode/lambda                 |  2 +-
 snippets/python-mode/list                   |  2 +-
 snippets/python-mode/logger_name            |  2 +-
 snippets/python-mode/main                   |  2 +-
 snippets/python-mode/metaclass              |  6 ------
 snippets/python-mode/method                 |  2 +-
 snippets/python-mode/method_docstring       |  2 +-
 snippets/python-mode/method_docstring_numpy |  2 +-
 snippets/python-mode/not_impl               |  2 +-
 snippets/python-mode/np                     |  2 +-
 snippets/python-mode/parse_args             |  2 +-
 snippets/python-mode/parser                 |  2 +-
 snippets/python-mode/pass                   |  2 +-
 snippets/python-mode/pdb                    |  2 +-
 snippets/python-mode/print                  |  2 +-
 snippets/python-mode/prop                   |  3 ++-
 snippets/python-mode/pudb                   |  2 +-
 snippets/python-mode/reg                    |  2 +-
 snippets/python-mode/return                 |  2 +-
 snippets/python-mode/self                   |  2 +-
 snippets/python-mode/self_without_dot       |  2 +-
 snippets/python-mode/selfassign             |  2 +-
 snippets/python-mode/setdef                 |  2 +-
 snippets/python-mode/size                   |  2 +-
 snippets/python-mode/super                  |  7 -------
 snippets/python-mode/test_file              |  2 +-
 snippets/python-mode/try                    |  3 ++-
 snippets/python-mode/tryelse                |  5 +++--
 snippets/python-mode/unicode                |  7 -------
 snippets/python-mode/unicode_literals       |  6 ------
 snippets/python-mode/while                  |  2 +-
 snippets/python-mode/with                   |  2 +-
 snippets/python-mode/with_statement         |  6 ------
 yasnippet-snippets.el                       |  4 ----
 152 files changed, 650 insertions(+), 151 deletions(-)

diff --git a/snippets/python-mode/.yas-setup.el 
b/snippets/python-mode/.yas-setup.el
index 76af532bb4..8b292156b2 100644
--- a/snippets/python-mode/.yas-setup.el
+++ b/snippets/python-mode/.yas-setup.el
@@ -1,23 +1,33 @@
 (require 'yasnippet)
 (defvar yas-text)
 
+(defvar python-split-arg-arg-regex
+"\\([[:alnum:]*]+\\)\\(:[[:blank:]]*[[:alpha:]]*\\)?\\([[:blank:]]*=[[:blank:]]*[[:alnum:]]*\\)?"
+"Regular expression matching an argument of a python function.
+First group should give the argument name.")
+
+(defvar python-split-arg-separator
+"[[:space:]]*,[[:space:]]*"
+"Regular expression matching the separator in a list of argument.")
+
 (defun python-split-args (arg-string)
-  "Split a python argument string into ((name, default)..) tuples"
+  "Split a python argument string ARG-STRING into a tuple of argument names."
   (mapcar (lambda (x)
-             (split-string x "[[:blank:]]*=[[:blank:]]*" t))
-          (split-string arg-string "[[:blank:]]*,[[:blank:]]*" t)))
+            (when (string-match python-split-arg-arg-regex x)
+              (match-string-no-properties 1 x)))
+          (split-string arg-string python-split-arg-separator t)))
 
 (defun python-args-to-docstring ()
-  "return docstring format for the python arguments in yas-text"
+  "Return docstring format for the python arguments in yas-text."
   (let* ((indent (concat "\n" (make-string (current-column) 32)))
          (args (python-split-args yas-text))
          (max-len (if args (apply 'max (mapcar (lambda (x) (length (nth 0 x))) 
args)) 0))
          (formatted-args (mapconcat
-                (lambda (x)
-                   (concat (nth 0 x) (make-string (- max-len (length (nth 0 
x))) ? ) " -- "
-                           (if (nth 1 x) (concat "\(default " (nth 1 x) 
"\)"))))
-                args
-                indent)))
+                          (lambda (x)
+                            (concat (nth 0 x) (make-string (- max-len (length 
(nth 0 x))) ? ) " -- "
+                                    (if (nth 1 x) (concat "\(default " (nth 1 
x) "\)"))))
+                          args
+                          indent)))
     (unless (string= formatted-args "")
       (mapconcat 'identity (list "Keyword Arguments:" formatted-args) 
indent))))
 
@@ -33,6 +43,3 @@
                  (list "\nParameters\n----------" formatted-params
                        "\nReturns\n-------" formatted-ret)
                  "\n"))))
-
-
-(add-hook 'python-mode-hook #'yasnippet-snippets--fixed-indent)
diff --git a/snippets/python-mode/__abs__ b/snippets/python-mode/__abs__
new file mode 100644
index 0000000000..67967be416
--- /dev/null
+++ b/snippets/python-mode/__abs__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __abs__
+# key: _abs
+# group: Special methods
+# --
+def __abs__(self):
+    return $0
diff --git a/snippets/python-mode/__add__ b/snippets/python-mode/__add__
new file mode 100644
index 0000000000..9fef7476d8
--- /dev/null
+++ b/snippets/python-mode/__add__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __add__
+# key: _add
+# group: Special methods
+# --
+def __add__(self, other):
+    return $0
diff --git a/snippets/python-mode/__and__ b/snippets/python-mode/__and__
new file mode 100644
index 0000000000..74c1c2a56e
--- /dev/null
+++ b/snippets/python-mode/__and__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __and__
+# key: _and
+# group: Special methods
+# --
+def __and__(self, other):
+    return $0
diff --git a/snippets/python-mode/__bool__ b/snippets/python-mode/__bool__
new file mode 100644
index 0000000000..fd53fd36d4
--- /dev/null
+++ b/snippets/python-mode/__bool__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __bool__
+# key: _bool
+# group: Special methods
+# --
+def __bool__(self):
+    return $0
diff --git a/snippets/python-mode/__call__ b/snippets/python-mode/__call__
new file mode 100644
index 0000000000..e807be58a6
--- /dev/null
+++ b/snippets/python-mode/__call__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __call__
+# key: _call
+# group: Special methods
+# --
+def __call__(self, ${1:*args}):
+    return $0
diff --git a/snippets/python-mode/__cmp__ b/snippets/python-mode/__cmp__
new file mode 100644
index 0000000000..ed18d210a1
--- /dev/null
+++ b/snippets/python-mode/__cmp__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __cmp__
+# key: _cmp
+# group: Special methods
+# --
+def __cmp__(self, other):
+    return $0
diff --git a/snippets/python-mode/__complex__ b/snippets/python-mode/__complex__
new file mode 100644
index 0000000000..69ced64896
--- /dev/null
+++ b/snippets/python-mode/__complex__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __complex__
+# key: _complex
+# group: Special methods
+# --
+def __complex__(self):
+    return $0
diff --git a/snippets/python-mode/__contains__ 
b/snippets/python-mode/__contains__
index 4d4ad501c8..4fca9004f6 100644
--- a/snippets/python-mode/__contains__
+++ b/snippets/python-mode/__contains__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __contains__
-# key: cont
-# group: dunder methods
+# key: _contains
+# group: Special methods
 # --
-def __contains__(self, el):
-    $0
\ No newline at end of file
+def __contains__(self, item):
+    return $0
diff --git a/snippets/python-mode/__del__ b/snippets/python-mode/__del__
new file mode 100644
index 0000000000..1f5673c347
--- /dev/null
+++ b/snippets/python-mode/__del__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __del__
+# key: _del
+# group: Special methods
+# --
+def __del__(self):
+    $0
diff --git a/snippets/python-mode/__delattr__ b/snippets/python-mode/__delattr__
new file mode 100644
index 0000000000..2c8ce9c9ef
--- /dev/null
+++ b/snippets/python-mode/__delattr__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __delattr__
+# key: _delattr
+# group: Special methods
+# --
+def __delattr__(self, name):
+    $0
diff --git a/snippets/python-mode/__delete__ b/snippets/python-mode/__delete__
new file mode 100644
index 0000000000..700de5b1a1
--- /dev/null
+++ b/snippets/python-mode/__delete__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __delete__
+# key: _delete
+# group: Special methods
+# --
+def __delete__(self, instance):
+    $0
diff --git a/snippets/python-mode/__delitem__ b/snippets/python-mode/__delitem__
new file mode 100644
index 0000000000..d843519932
--- /dev/null
+++ b/snippets/python-mode/__delitem__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __delitem__
+# key: _delitem
+# group: Special methods
+# --
+def __delitem__(self, key):
+    $0
diff --git a/snippets/python-mode/__div__ b/snippets/python-mode/__div__
new file mode 100644
index 0000000000..3e774f5d86
--- /dev/null
+++ b/snippets/python-mode/__div__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __div__
+# key: _div
+# group: Special methods
+# --
+def __div__(self, other):
+    return $0
diff --git a/snippets/python-mode/__divmod__ b/snippets/python-mode/__divmod__
new file mode 100644
index 0000000000..b2daa769b2
--- /dev/null
+++ b/snippets/python-mode/__divmod__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __divmod__
+# key: _divmod
+# group: Special methods
+# --
+def __divmod__(self, other):
+    return $0
diff --git a/snippets/python-mode/__enter__ b/snippets/python-mode/__enter__
index 3dcc3ba652..9508a3276a 100644
--- a/snippets/python-mode/__enter__
+++ b/snippets/python-mode/__enter__
@@ -1,9 +1,9 @@
 # -*- mode: snippet -*-
 # name: __enter__
-# key: ent
-# group: dunder methods
+# key: _enter
+# group: Special methods
 # --
 def __enter__(self):
     $0
 
-    return self
\ No newline at end of file
+    return self
diff --git a/snippets/python-mode/eq b/snippets/python-mode/__eq__
similarity index 51%
rename from snippets/python-mode/eq
rename to snippets/python-mode/__eq__
index e19c328510..7fdb0b4535 100644
--- a/snippets/python-mode/eq
+++ b/snippets/python-mode/__eq__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __eq__
-# key: eq
-# group: dunder methods
+# key: _eq
+# group: Special methods
 # --
 def __eq__(self, other):
-    return self.$1 == other.$1
\ No newline at end of file
+    return $0
diff --git a/snippets/python-mode/__exit__ b/snippets/python-mode/__exit__
index cd9de7d2fb..2bac6f2408 100644
--- a/snippets/python-mode/__exit__
+++ b/snippets/python-mode/__exit__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __exit__
-# key: ex
-# group: dunder methods
+# key: _exit
+# group: Special methods
 # --
-def __exit__(self, type, value, traceback):
-    $0
\ No newline at end of file
+def __exit__(self, exc_type, exc_value, traceback):
+    $0
diff --git a/snippets/python-mode/__float__ b/snippets/python-mode/__float__
new file mode 100644
index 0000000000..d1f81ab186
--- /dev/null
+++ b/snippets/python-mode/__float__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __float__
+# key: _float
+# group: Special methods
+# --
+def __float__(self):
+    return $0
diff --git a/snippets/python-mode/__floordiv__ 
b/snippets/python-mode/__floordiv__
new file mode 100644
index 0000000000..c335b587e2
--- /dev/null
+++ b/snippets/python-mode/__floordiv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __floordiv__
+# key: _floordiv
+# group: Special methods
+# --
+def __floordiv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ge__ b/snippets/python-mode/__ge__
new file mode 100644
index 0000000000..97f6873031
--- /dev/null
+++ b/snippets/python-mode/__ge__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ge__
+# key: _ge
+# group: Special methods
+# --
+def __ge__(self, other):
+    return $0
diff --git a/snippets/python-mode/__get__ b/snippets/python-mode/__get__
new file mode 100644
index 0000000000..3df0d71ddf
--- /dev/null
+++ b/snippets/python-mode/__get__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __get__
+# key: _get
+# group: Special methods
+# --
+def __get__(self, instance, owner=None):
+    return $0
diff --git a/snippets/python-mode/__getattr__ b/snippets/python-mode/__getattr__
new file mode 100644
index 0000000000..110d0d0177
--- /dev/null
+++ b/snippets/python-mode/__getattr__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __getattr__
+# key: _getattr
+# group: Special methods
+# --
+def __getattr__(self, name):
+    return $0
diff --git a/snippets/python-mode/__getattribute__ 
b/snippets/python-mode/__getattribute__
new file mode 100644
index 0000000000..22935eb8e3
--- /dev/null
+++ b/snippets/python-mode/__getattribute__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __getattribute__
+# key: _getattribute
+# group: Special methods
+# --
+def __getattribute__(self, name):
+    return $0
diff --git a/snippets/python-mode/__getitem__ b/snippets/python-mode/__getitem__
index 939bd1af9e..cd08775518 100644
--- a/snippets/python-mode/__getitem__
+++ b/snippets/python-mode/__getitem__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __getitem__
-# key: getit
-# group: dunder methods
+# key: _getitem
+# group: Special methods
 # --
-def __getitem__(self, ${1:key}):
-    $0
\ No newline at end of file
+def __getitem__(self, key):
+    return $0
diff --git a/snippets/python-mode/__gt__ b/snippets/python-mode/__gt__
new file mode 100644
index 0000000000..527717eb7b
--- /dev/null
+++ b/snippets/python-mode/__gt__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __gt__
+# key: _gt
+# group: Special methods
+# --
+def __gt__(self, other):
+    return $0
diff --git a/snippets/python-mode/__hash__ b/snippets/python-mode/__hash__
new file mode 100644
index 0000000000..e059f5a82e
--- /dev/null
+++ b/snippets/python-mode/__hash__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __hash__
+# key: _hash
+# group: Special methods
+# --
+def __hash__(self):
+    return $0
diff --git a/snippets/python-mode/__iadd__ b/snippets/python-mode/__iadd__
new file mode 100644
index 0000000000..77108c267d
--- /dev/null
+++ b/snippets/python-mode/__iadd__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __iadd__
+# key: _iadd
+# group: Special methods
+# --
+def __iadd__(self, other):
+    return $0
diff --git a/snippets/python-mode/__iand__ b/snippets/python-mode/__iand__
new file mode 100644
index 0000000000..8b61e1cff7
--- /dev/null
+++ b/snippets/python-mode/__iand__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __iand__
+# key: _iand
+# group: Special methods
+# --
+def __iand__(self, other):
+    return $0
diff --git a/snippets/python-mode/__idiv__ b/snippets/python-mode/__idiv__
new file mode 100644
index 0000000000..c9e5609f4b
--- /dev/null
+++ b/snippets/python-mode/__idiv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __idiv__
+# key: _idiv
+# group: Special methods
+# --
+def __idiv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ifloordiv__ 
b/snippets/python-mode/__ifloordiv__
new file mode 100644
index 0000000000..fd40fd2804
--- /dev/null
+++ b/snippets/python-mode/__ifloordiv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ifloordiv__
+# key: _ifloordiv
+# group: Special methods
+# --
+def __ifloordiv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ilshift__ b/snippets/python-mode/__ilshift__
new file mode 100644
index 0000000000..8e4576337f
--- /dev/null
+++ b/snippets/python-mode/__ilshift__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ilshift__
+# key: _ilshift
+# group: Special methods
+# --
+def __ilshift__(self, other):
+    return $0
diff --git a/snippets/python-mode/__imod__ b/snippets/python-mode/__imod__
new file mode 100644
index 0000000000..5d3f70e6b2
--- /dev/null
+++ b/snippets/python-mode/__imod__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __imod__
+# key: _imod
+# group: Special methods
+# --
+def __imod__(self, other):
+    return $0
diff --git a/snippets/python-mode/__imul__ b/snippets/python-mode/__imul__
new file mode 100644
index 0000000000..ecf66b6e60
--- /dev/null
+++ b/snippets/python-mode/__imul__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __imul__
+# key: _imul
+# group: Special methods
+# --
+def __imul__(self, other):
+    return $0
diff --git a/snippets/python-mode/__index__ b/snippets/python-mode/__index__
new file mode 100644
index 0000000000..e03b1c7f05
--- /dev/null
+++ b/snippets/python-mode/__index__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __index__
+# key: _index
+# group: Special methods
+# --
+def __index__(self):
+    return $0
diff --git a/snippets/python-mode/init b/snippets/python-mode/__init__
similarity index 73%
rename from snippets/python-mode/init
rename to snippets/python-mode/__init__
index aece55c497..17fcddfd56 100644
--- a/snippets/python-mode/init
+++ b/snippets/python-mode/__init__
@@ -1,8 +1,8 @@
 # -*- mode: snippet -*-
-# name: init
-# key: init
+# name: __init__
+# key: _init
 # group : definitions
 # --
 def __init__(self${1:, args}):
     ${2:"${3:docstring}"
-    }$0
\ No newline at end of file
+    }$0
diff --git a/snippets/python-mode/__instancecheck__ 
b/snippets/python-mode/__instancecheck__
new file mode 100644
index 0000000000..8a5e429755
--- /dev/null
+++ b/snippets/python-mode/__instancecheck__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __instancecheck__
+# key: _instancecheck
+# group: Special methods
+# --
+def __instancecheck__(self, instance):
+    return $0
diff --git a/snippets/python-mode/__int__ b/snippets/python-mode/__int__
new file mode 100644
index 0000000000..01224927e4
--- /dev/null
+++ b/snippets/python-mode/__int__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __int__
+# key: _int
+# group: Special methods
+# --
+def __int__(self):
+    $0
diff --git a/snippets/python-mode/__invert__ b/snippets/python-mode/__invert__
new file mode 100644
index 0000000000..e5e0a2de85
--- /dev/null
+++ b/snippets/python-mode/__invert__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __invert__
+# key: _invert
+# group: Special methods
+# --
+def __invert__(self):
+    return $0
diff --git a/snippets/python-mode/__ior__ b/snippets/python-mode/__ior__
new file mode 100644
index 0000000000..07ce0dcac3
--- /dev/null
+++ b/snippets/python-mode/__ior__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ior__
+# key: _ior
+# group: Special methods
+# --
+def __ior__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ipow__ b/snippets/python-mode/__ipow__
new file mode 100644
index 0000000000..8f0ea5d593
--- /dev/null
+++ b/snippets/python-mode/__ipow__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ipow__
+# key: _ipow
+# group: Special methods
+# --
+def __ipow__(self, other):
+    return $0
diff --git a/snippets/python-mode/__irshift__ b/snippets/python-mode/__irshift__
new file mode 100644
index 0000000000..b250a5a96c
--- /dev/null
+++ b/snippets/python-mode/__irshift__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __irshift__
+# key: _irshift
+# group: Special methods
+# --
+def __irshift__(self, other):
+    return $0
diff --git a/snippets/python-mode/__isub__ b/snippets/python-mode/__isub__
new file mode 100644
index 0000000000..abd0888c57
--- /dev/null
+++ b/snippets/python-mode/__isub__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __isub__
+# key: _isub
+# group: Special methods
+# --
+def __isub__(self, other):
+    return $0
diff --git a/snippets/python-mode/iter b/snippets/python-mode/__iter__
similarity index 52%
copy from snippets/python-mode/iter
copy to snippets/python-mode/__iter__
index a4fed13831..29414ad27f 100644
--- a/snippets/python-mode/iter
+++ b/snippets/python-mode/__iter__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __iter__
-# key: iter
-# group: dunder methods
+# key: _iter
+# group: Special methods
 # --
 def __iter__(self):
-    return ${1:iter($2)}
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/__itruediv__ 
b/snippets/python-mode/__itruediv__
new file mode 100644
index 0000000000..3332f321ef
--- /dev/null
+++ b/snippets/python-mode/__itruediv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __itruediv__
+# key: _itruediv
+# group: Special methods
+# --
+def __itruediv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ixor__ b/snippets/python-mode/__ixor__
new file mode 100644
index 0000000000..dae309506f
--- /dev/null
+++ b/snippets/python-mode/__ixor__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ixor__
+# key: _ixor
+# group: Special methods
+# --
+def __ixor__(self, other):
+    return $0
diff --git a/snippets/python-mode/__le__ b/snippets/python-mode/__le__
new file mode 100644
index 0000000000..774188b251
--- /dev/null
+++ b/snippets/python-mode/__le__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __le__
+# key: _le
+# group: Special methods
+# --
+def __le__(self, other):
+    return $0
diff --git a/snippets/python-mode/__len__ b/snippets/python-mode/__len__
index 9e6c16496a..e5544cb248 100644
--- a/snippets/python-mode/__len__
+++ b/snippets/python-mode/__len__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __len__
-# key: len
-# group: dunder methods
+# key: _len
+# group: Special methods
 # --
 def __len__(self):
-    $0
\ No newline at end of file
+    return $0
diff --git a/snippets/python-mode/__lshift__ b/snippets/python-mode/__lshift__
new file mode 100644
index 0000000000..bfb4cc2d94
--- /dev/null
+++ b/snippets/python-mode/__lshift__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __lshift__
+# key: _lshift
+# group: Special methods
+# --
+def __lshift__(self, other):
+    return $0
diff --git a/snippets/python-mode/__lt__ b/snippets/python-mode/__lt__
new file mode 100644
index 0000000000..8c34b05d59
--- /dev/null
+++ b/snippets/python-mode/__lt__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __lt__
+# key: _lt
+# group: Special methods
+# --
+def __lt__(self, other):
+    return $0
diff --git a/snippets/python-mode/__mod__ b/snippets/python-mode/__mod__
new file mode 100644
index 0000000000..22a987e483
--- /dev/null
+++ b/snippets/python-mode/__mod__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __mod__
+# key: _mod
+# group: Special methods
+# --
+def __mod__(self, other):
+    return $0
diff --git a/snippets/python-mode/__mul__ b/snippets/python-mode/__mul__
new file mode 100644
index 0000000000..d8fae7c45f
--- /dev/null
+++ b/snippets/python-mode/__mul__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __mul__
+# key: _mul
+# group: Special methods
+# --
+def __mul__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ne__ b/snippets/python-mode/__ne__
new file mode 100644
index 0000000000..0ed5f8f62b
--- /dev/null
+++ b/snippets/python-mode/__ne__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ne__
+# key: _ne
+# group: Special methods
+# --
+def __ne__(self, other):
+    return $0
diff --git a/snippets/python-mode/__neg__ b/snippets/python-mode/__neg__
new file mode 100644
index 0000000000..7e56f6b519
--- /dev/null
+++ b/snippets/python-mode/__neg__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __neg__
+# key: _neg
+# group: Special methods
+# --
+def __neg__(self):
+    return $0
diff --git a/snippets/python-mode/__new__ b/snippets/python-mode/__new__
index 8ccb151ef9..28ccc0b3e5 100644
--- a/snippets/python-mode/__new__
+++ b/snippets/python-mode/__new__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __new__
-# key: new
-# group: dunder methods
+# key: _new
+# group: Special methods
 # --
 def __new__(mcs, name, bases, dct):
     $0
diff --git a/snippets/python-mode/__or__ b/snippets/python-mode/__or__
new file mode 100644
index 0000000000..f6589061ae
--- /dev/null
+++ b/snippets/python-mode/__or__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __or__
+# key: _or
+# group: Special methods
+# --
+def __or__(self, other):
+    return $0
diff --git a/snippets/python-mode/__pos__ b/snippets/python-mode/__pos__
new file mode 100644
index 0000000000..de08b09751
--- /dev/null
+++ b/snippets/python-mode/__pos__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __pos__
+# key: _pos
+# group: Special methods
+# --
+def __pos__(self):
+    return $0
diff --git a/snippets/python-mode/__pow__ b/snippets/python-mode/__pow__
new file mode 100644
index 0000000000..4006c0a0ea
--- /dev/null
+++ b/snippets/python-mode/__pow__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __pow__
+# key: _pow
+# group: Special methods
+# --
+def __pow__(self, other, modulo=None):
+    return $0
diff --git a/snippets/python-mode/__radd__ b/snippets/python-mode/__radd__
new file mode 100644
index 0000000000..5fa27d13e0
--- /dev/null
+++ b/snippets/python-mode/__radd__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __radd__
+# key: _radd
+# group: Special methods
+# --
+def __radd__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rand__ b/snippets/python-mode/__rand__
new file mode 100644
index 0000000000..e3156ef711
--- /dev/null
+++ b/snippets/python-mode/__rand__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rand__
+# key: _rand
+# group: Special methods
+# --
+def __rand__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rdivmod__ b/snippets/python-mode/__rdivmod__
new file mode 100644
index 0000000000..4fc1ccb39b
--- /dev/null
+++ b/snippets/python-mode/__rdivmod__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rdivmod__
+# key: _rdivmod
+# group: Special methods
+# --
+def __rdivmod__(self, other):
+    return $0
diff --git a/snippets/python-mode/repr b/snippets/python-mode/__repr__
similarity index 55%
rename from snippets/python-mode/repr
rename to snippets/python-mode/__repr__
index a1f67833fa..85cb80f047 100644
--- a/snippets/python-mode/repr
+++ b/snippets/python-mode/__repr__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __repr__
-# key: repr
-# group: dunder methods
+# key: _repr
+# group: Special methods
 # --
 def __repr__(self):
-    $0
\ No newline at end of file
+    return $0
diff --git a/snippets/python-mode/__reversed__ 
b/snippets/python-mode/__reversed__
new file mode 100644
index 0000000000..ff2a5a12ae
--- /dev/null
+++ b/snippets/python-mode/__reversed__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __reversed__
+# key: _reversed
+# group: Special methods
+# --
+def __reversed__(self):
+    return $0
diff --git a/snippets/python-mode/__rfloordiv__ 
b/snippets/python-mode/__rfloordiv__
new file mode 100644
index 0000000000..cb5375df6c
--- /dev/null
+++ b/snippets/python-mode/__rfloordiv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rfloordiv__
+# key: _rfloordiv
+# group: Special methods
+# --
+def __rfloordiv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rlshift__ b/snippets/python-mode/__rlshift__
new file mode 100644
index 0000000000..64a676196a
--- /dev/null
+++ b/snippets/python-mode/__rlshift__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rlshift__
+# key: _rlshift
+# group: Special methods
+# --
+def __rlshift__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rmod__ b/snippets/python-mode/__rmod__
new file mode 100644
index 0000000000..1b4e035ef9
--- /dev/null
+++ b/snippets/python-mode/__rmod__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rmod__
+# key: _rmod
+# group: Special methods
+# --
+def __rmod__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rmul__ b/snippets/python-mode/__rmul__
new file mode 100644
index 0000000000..459d5323e1
--- /dev/null
+++ b/snippets/python-mode/__rmul__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rmul__
+# key: _rmul
+# group: Special methods
+# --
+def __rmul__(self, other):
+    return $0
diff --git a/snippets/python-mode/__ror__ b/snippets/python-mode/__ror__
new file mode 100644
index 0000000000..91293cbd69
--- /dev/null
+++ b/snippets/python-mode/__ror__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __ror__
+# key: _ror
+# group: Special methods
+# --
+def __ror__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rpow__ b/snippets/python-mode/__rpow__
new file mode 100644
index 0000000000..2521f161c6
--- /dev/null
+++ b/snippets/python-mode/__rpow__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rpow__
+# key: _rpow
+# group: Special methods
+# --
+def __rpow__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rrshift__ b/snippets/python-mode/__rrshift__
new file mode 100644
index 0000000000..78f4ae7e90
--- /dev/null
+++ b/snippets/python-mode/__rrshift__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rrshift__
+# key: _rrshift
+# group: Special methods
+# --
+def __rrshift__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rshift__ b/snippets/python-mode/__rshift__
new file mode 100644
index 0000000000..061c396b81
--- /dev/null
+++ b/snippets/python-mode/__rshift__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rshift__
+# key: _rshift
+# group: Special methods
+# --
+def __rshift__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rsub__ b/snippets/python-mode/__rsub__
new file mode 100644
index 0000000000..1d7b243257
--- /dev/null
+++ b/snippets/python-mode/__rsub__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rsub__
+# key: _rsub
+# group: Special methods
+# --
+def __rsub__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rtruediv__ 
b/snippets/python-mode/__rtruediv__
new file mode 100644
index 0000000000..a0cba2cd43
--- /dev/null
+++ b/snippets/python-mode/__rtruediv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rtruediv__
+# key: _rtruediv
+# group: Special methods
+# --
+def __rtruediv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__rxor__ b/snippets/python-mode/__rxor__
new file mode 100644
index 0000000000..b5473ad257
--- /dev/null
+++ b/snippets/python-mode/__rxor__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __rxor__
+# key: _rxor
+# group: Special methods
+# --
+def __rxor__(self, other):
+    return $0
diff --git a/snippets/python-mode/__set__ b/snippets/python-mode/__set__
new file mode 100644
index 0000000000..19572c15f5
--- /dev/null
+++ b/snippets/python-mode/__set__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __set__
+# key: _set
+# group: Special methods
+# --
+def __set__(self, instance, value):
+    $0
diff --git a/snippets/python-mode/__setattr__ b/snippets/python-mode/__setattr__
new file mode 100644
index 0000000000..5311cf0eeb
--- /dev/null
+++ b/snippets/python-mode/__setattr__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __setattr__
+# key: _setattr
+# group: Special methods
+# --
+def __setattr__(self, name, value):
+    $0
diff --git a/snippets/python-mode/__setitem__ b/snippets/python-mode/__setitem__
index c7db5b13a4..0287f0e5fb 100644
--- a/snippets/python-mode/__setitem__
+++ b/snippets/python-mode/__setitem__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __setitem__
-# key: setit
-# group: dunder methods
+# key: _setitem
+# group: Special methods
 # --
-def __setitem__(self, ${1:key}, ${2:val}):
-    $0
\ No newline at end of file
+def __setitem__(self, key, value):
+    $0
diff --git a/snippets/python-mode/__slots__ b/snippets/python-mode/__slots__
new file mode 100644
index 0000000000..e7ea51e506
--- /dev/null
+++ b/snippets/python-mode/__slots__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __slots__
+# key: _slots
+# group: Class attributes
+# --
+__slots__ = ($1)
+$0
diff --git a/snippets/python-mode/str b/snippets/python-mode/__str__
similarity index 55%
rename from snippets/python-mode/str
rename to snippets/python-mode/__str__
index b0572e3302..f623df7ee5 100644
--- a/snippets/python-mode/str
+++ b/snippets/python-mode/__str__
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __str__
-# key: str
-# group: dunder methods
+# key: _str
+# group: Special methods
 # --
 def __str__(self):
-    $0
\ No newline at end of file
+    return $0
diff --git a/snippets/python-mode/__sub__ b/snippets/python-mode/__sub__
new file mode 100644
index 0000000000..d21d13c9c8
--- /dev/null
+++ b/snippets/python-mode/__sub__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __sub__
+# key: _sub
+# group: Special methods
+# --
+def __sub__(self, other):
+    return $0
diff --git a/snippets/python-mode/__subclasscheck__ 
b/snippets/python-mode/__subclasscheck__
new file mode 100644
index 0000000000..0f3a61d42d
--- /dev/null
+++ b/snippets/python-mode/__subclasscheck__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __subclasscheck__
+# key: _subclasscheck
+# group: Special methods
+# --
+def __subclasscheck__(self, instance):
+    return $0
diff --git a/snippets/python-mode/__truediv__ b/snippets/python-mode/__truediv__
new file mode 100644
index 0000000000..00181b14d9
--- /dev/null
+++ b/snippets/python-mode/__truediv__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __truediv__
+# key: _truediv
+# group: Special methods
+# --
+def __truediv__(self, other):
+    return $0
diff --git a/snippets/python-mode/__xor__ b/snippets/python-mode/__xor__
new file mode 100644
index 0000000000..d84b99ff9c
--- /dev/null
+++ b/snippets/python-mode/__xor__
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: __xor__
+# key: _xor
+# group: Special methods
+# --
+def __xor__(self, other):
+    return $0
diff --git a/snippets/python-mode/all b/snippets/python-mode/all
index b92c4dc39a..3ef233e18c 100644
--- a/snippets/python-mode/all
+++ b/snippets/python-mode/all
@@ -1,7 +1,8 @@
 # -*- mode: snippet -*-
 # name: all
 # key: all
+# expand-env: ((yas-indent-line 'fixed))
 # --
 __all__ = [
     $0
-]
\ No newline at end of file
+]
diff --git a/snippets/python-mode/arg_positional 
b/snippets/python-mode/arg_positional
index b54fc46537..2e43a8a974 100644
--- a/snippets/python-mode/arg_positional
+++ b/snippets/python-mode/arg_positional
@@ -1,6 +1,6 @@
 # -*- mode: snippet -*-
 # name: arg_positional
-# key: arg
+# key: posarg
 # group: argparser
 # --
-parser.add_argument('${1:varname}', $0)
\ No newline at end of file
+parser.add_argument('${1:varname}', $0)
diff --git a/snippets/python-mode/ase b/snippets/python-mode/ase
new file mode 100644
index 0000000000..8675547483
--- /dev/null
+++ b/snippets/python-mode/ase
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: Assert Equal
+# key: ase
+# group: testing
+# --
+self.assertEqual(${1:expected}, ${2:actual})
diff --git a/snippets/python-mode/asne b/snippets/python-mode/asne
new file mode 100644
index 0000000000..bccff3e30a
--- /dev/null
+++ b/snippets/python-mode/asne
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: Assert Not Equal
+# key: asne
+# group: testing
+# --
+self.assertNotEqual(${1:expected}, ${2:actual})
diff --git a/snippets/python-mode/asr b/snippets/python-mode/asr
new file mode 100644
index 0000000000..21a10df71c
--- /dev/null
+++ b/snippets/python-mode/asr
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: Assert Raises
+# key: asr
+# group: testing
+# --
+with self.assertRaises(${1:Exception}):
+    $0
diff --git a/snippets/python-mode/assert b/snippets/python-mode/assert
index ec82efe194..dfd707f682 100644
--- a/snippets/python-mode/assert
+++ b/snippets/python-mode/assert
@@ -3,4 +3,4 @@
 # key: ass
 # group: testing
 # --
-assert $0
\ No newline at end of file
+assert $0
diff --git a/snippets/python-mode/assertEqual b/snippets/python-mode/assertEqual
index 29282b9057..64be83b557 100644
--- a/snippets/python-mode/assertEqual
+++ b/snippets/python-mode/assertEqual
@@ -3,4 +3,4 @@
 # key: ae
 # group: testing
 # --
-self.assertEqual($1, $2)
\ No newline at end of file
+self.assertEqual($1, $2)
diff --git a/snippets/python-mode/assertFalse b/snippets/python-mode/assertFalse
index 41a9dcfbb2..3c21b36680 100644
--- a/snippets/python-mode/assertFalse
+++ b/snippets/python-mode/assertFalse
@@ -3,4 +3,4 @@
 # key: af
 # group: testing
 # --
-self.assertFalse($0)
\ No newline at end of file
+self.assertFalse($0)
diff --git a/snippets/python-mode/assertIn b/snippets/python-mode/assertIn
index 74e1ee7c03..5ef11cad7b 100644
--- a/snippets/python-mode/assertIn
+++ b/snippets/python-mode/assertIn
@@ -3,4 +3,4 @@
 # key: ai
 # group: testing
 # --
-self.assertIn(${1:member}, ${2:container})
\ No newline at end of file
+self.assertIn(${1:member}, ${2:container})
diff --git a/snippets/python-mode/assertNotEqual 
b/snippets/python-mode/assertNotEqual
index 68374076cb..4cb759b2fd 100644
--- a/snippets/python-mode/assertNotEqual
+++ b/snippets/python-mode/assertNotEqual
@@ -3,4 +3,4 @@
 # key: ane
 # group: testing
 # --
-self.assertNotEqual($1, $2)
\ No newline at end of file
+self.assertNotEqual($1, $2)
diff --git a/snippets/python-mode/assertNotIn b/snippets/python-mode/assertNotIn
index 4780a7ec5c..d59f88604c 100644
--- a/snippets/python-mode/assertNotIn
+++ b/snippets/python-mode/assertNotIn
@@ -3,4 +3,4 @@
 # key: an
 # group: testing
 # --
-self.assertNotIn(${1:member}, ${2:container})
\ No newline at end of file
+self.assertNotIn(${1:member}, ${2:container})
diff --git a/snippets/python-mode/assertRaises 
b/snippets/python-mode/assertRaises
index db125da73c..489be0f502 100644
--- a/snippets/python-mode/assertRaises
+++ b/snippets/python-mode/assertRaises
@@ -3,4 +3,4 @@
 # key: ar
 # group: testing
 # --
-self.assertRaises(${1:Exception}, ${2:fun})
\ No newline at end of file
+self.assertRaises(${1:Exception}, ${2:fun})
diff --git a/snippets/python-mode/assertTrue b/snippets/python-mode/assertTrue
index 1cc59ac6a9..0d4b25edca 100644
--- a/snippets/python-mode/assertTrue
+++ b/snippets/python-mode/assertTrue
@@ -3,4 +3,4 @@
 # key: at
 # group: testing
 # --
-self.assertTrue($0)
\ No newline at end of file
+self.assertTrue($0)
diff --git a/snippets/python-mode/bang b/snippets/python-mode/bang
index d70a4a2c49..5e873f8f73 100644
--- a/snippets/python-mode/bang
+++ b/snippets/python-mode/bang
@@ -3,4 +3,4 @@
 # key: #!
 # contributor : @avelino
 # --
-#!/usr/bin/env python
\ No newline at end of file
+#!/usr/bin/env python
diff --git a/snippets/python-mode/celery_pdb b/snippets/python-mode/celery_pdb
index 6095b2d372..34c67858fb 100644
--- a/snippets/python-mode/celery_pdb
+++ b/snippets/python-mode/celery_pdb
@@ -3,4 +3,4 @@
 # key: cdb
 # group: debug
 # --
-from celery.contrib import rdb; rdb.set_trace()
\ No newline at end of file
+from celery.contrib import rdb; rdb.set_trace()
diff --git a/snippets/python-mode/class_doxygen_doc 
b/snippets/python-mode/class_doxygen_doc
index e8c6fa4365..fcfa0646ef 100644
--- a/snippets/python-mode/class_doxygen_doc
+++ b/snippets/python-mode/class_doxygen_doc
@@ -8,4 +8,4 @@
 @brief      ${1:class description}
 
 @details    ${2:detailed description}
-"""
\ No newline at end of file
+"""
diff --git a/snippets/python-mode/classmethod b/snippets/python-mode/classmethod
index 8e0e106e2d..e3121f4741 100644
--- a/snippets/python-mode/classmethod
+++ b/snippets/python-mode/classmethod
@@ -5,4 +5,4 @@
 # --
 @classmethod
 def ${1:meth}(cls, $2):
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/dec b/snippets/python-mode/dec
index b22c9e9208..b1bee7d028 100644
--- a/snippets/python-mode/dec
+++ b/snippets/python-mode/dec
@@ -11,4 +11,4 @@ def ${1:decorator}(func):
         $4
         return ret
 
-    return _$1
\ No newline at end of file
+    return _$1
diff --git a/snippets/python-mode/def b/snippets/python-mode/def
new file mode 100644
index 0000000000..a511a7a04a
--- /dev/null
+++ b/snippets/python-mode/def
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: def method(self, ...):
+# key: def
+# group: definitions
+# --
+def ${1:methodname}(self, ${2:arg}):
+    ${3:pass}
diff --git a/snippets/python-mode/deftest b/snippets/python-mode/deftest
index 394553aecb..ed3ec6c6e8 100644
--- a/snippets/python-mode/deftest
+++ b/snippets/python-mode/deftest
@@ -4,4 +4,4 @@
 # group: testing
 # --
 def test_${1:long_name}(self):
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/django_test_class 
b/snippets/python-mode/django_test_class
index 386e3058c0..1b63ad47b7 100644
--- a/snippets/python-mode/django_test_class
+++ b/snippets/python-mode/django_test_class
@@ -1,7 +1,7 @@
 # -*- mode: snippet; require-final-newline: nil -*-
 # name: django_test_class
-# key: tcs
+# key: dtcs
 # group: testing
 # --
 class ${1:Model}Test(TestCase):
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/doc b/snippets/python-mode/doc
index 2929e78975..a7d924afe7 100644
--- a/snippets/python-mode/doc
+++ b/snippets/python-mode/doc
@@ -3,4 +3,4 @@
 # key: d
 # --
 """$0
-"""
\ No newline at end of file
+"""
diff --git a/snippets/python-mode/doctest b/snippets/python-mode/doctest
index a5e4bb540c..884352a7dc 100644
--- a/snippets/python-mode/doctest
+++ b/snippets/python-mode/doctest
@@ -1,8 +1,8 @@
 # -*- mode: snippet -*-
 # name: doctest
-# key: doc
+# key: doctest
 # group: testing
 # --
 >>> ${1:function calls}
 ${2:desired output}
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/env b/snippets/python-mode/env
new file mode 100644
index 0000000000..d4fb804ab1
--- /dev/null
+++ b/snippets/python-mode/env
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: #!/usr/bin/env python
+# key: env
+# group: Header
+# --
+#!/usr/bin/env python
diff --git a/snippets/python-mode/for b/snippets/python-mode/for
index 47ab3394a2..1d8b6e9d3b 100644
--- a/snippets/python-mode/for
+++ b/snippets/python-mode/for
@@ -4,4 +4,4 @@
 # group : control structure
 # --
 for ${var} in ${collection}:
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/from b/snippets/python-mode/from
index 3a4acfc577..65d5050f1d 100644
--- a/snippets/python-mode/from
+++ b/snippets/python-mode/from
@@ -1,6 +1,7 @@
 # -*- mode: snippet -*-
-# name: from
+# name: from MOD import SYM
 # key: from
-# group : general
+# group: Header
 # --
-from ${1:lib} import ${2:funs}
\ No newline at end of file
+from ${1:module} import ${2:symbol}
+$0
diff --git a/snippets/python-mode/function_docstring 
b/snippets/python-mode/function_docstring
index f372d265e8..3e66c26fab 100644
--- a/snippets/python-mode/function_docstring
+++ b/snippets/python-mode/function_docstring
@@ -8,4 +8,4 @@ def ${1:name}($2):
  \"\"\"$3
  ${2:$(python-args-to-docstring)}
  \"\"\"
- $0
\ No newline at end of file
+ $0
diff --git a/snippets/python-mode/function_doxygen_doc 
b/snippets/python-mode/function_doxygen_doc
index f42b999705..8b7ba64b2f 100644
--- a/snippets/python-mode/function_doxygen_doc
+++ b/snippets/python-mode/function_doxygen_doc
@@ -12,4 +12,4 @@
 @param      ${3:param}
 
 @return     ${4:return type}
-"""
\ No newline at end of file
+"""
diff --git a/snippets/python-mode/ife b/snippets/python-mode/ife
index 4b8f613c37..e1b34f081a 100644
--- a/snippets/python-mode/ife
+++ b/snippets/python-mode/ife
@@ -1,6 +1,7 @@
 # -*- mode: snippet -*-
 # name: ife
 # key: ife
+# expand-env: ((yas-indent-line 'fixed))
 # group : control structure
 # --
 if $1:
diff --git a/snippets/python-mode/ifmain b/snippets/python-mode/ifmain
index 9575798d6a..cb74405c9b 100644
--- a/snippets/python-mode/ifmain
+++ b/snippets/python-mode/ifmain
@@ -3,4 +3,4 @@
 # key: ifm
 # --
 if __name__ == '__main__':
-    ${1:main()}
\ No newline at end of file
+    ${1:main()}
diff --git a/snippets/python-mode/import b/snippets/python-mode/import
index f34bc390dd..1ff1ca8d05 100644
--- a/snippets/python-mode/import
+++ b/snippets/python-mode/import
@@ -4,4 +4,4 @@
 # group : general
 # --
 import ${1:lib}${2: as ${3:alias}}
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/init_docstring 
b/snippets/python-mode/init_docstring
index 51af8db4b8..7256541a40 100644
--- a/snippets/python-mode/init_docstring
+++ b/snippets/python-mode/init_docstring
@@ -7,4 +7,4 @@ def __init__(self$1):
     \"\"\"$2
     ${1:$(python-args-to-docstring)}
     \"\"\"
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/interact b/snippets/python-mode/interact
index 4b412c8135..07bed27288 100644
--- a/snippets/python-mode/interact
+++ b/snippets/python-mode/interact
@@ -2,4 +2,4 @@
 # name: interact
 # key: int
 # --
-import code; code.interact(local=locals())
\ No newline at end of file
+import code; code.interact(local=locals())
diff --git a/snippets/python-mode/ipdb b/snippets/python-mode/ipdb
index c8c30dca40..8f5b2adc61 100644
--- a/snippets/python-mode/ipdb
+++ b/snippets/python-mode/ipdb
@@ -3,4 +3,4 @@
 # key: ipdb
 # group: debug
 # --
-import ipdb; ipdb.set_trace()
\ No newline at end of file
+import ipdb; ipdb.set_trace()
diff --git a/snippets/python-mode/iter b/snippets/python-mode/iter
index a4fed13831..181dcc985a 100644
--- a/snippets/python-mode/iter
+++ b/snippets/python-mode/iter
@@ -1,7 +1,7 @@
 # -*- mode: snippet -*-
 # name: __iter__
 # key: iter
-# group: dunder methods
+# group: Special methods
 # --
 def __iter__(self):
-    return ${1:iter($2)}
\ No newline at end of file
+    return ${1:iter($2)}
diff --git a/snippets/python-mode/lambda b/snippets/python-mode/lambda
index 08b268bd3e..c3e9879c7b 100644
--- a/snippets/python-mode/lambda
+++ b/snippets/python-mode/lambda
@@ -2,4 +2,4 @@
 # name: lambda
 # key: lam
 # --
-lambda ${1:x}: $0
\ No newline at end of file
+lambda ${1:x}: $0
diff --git a/snippets/python-mode/list b/snippets/python-mode/list
index 63cef24a8d..8da114ef91 100644
--- a/snippets/python-mode/list
+++ b/snippets/python-mode/list
@@ -4,4 +4,4 @@
 # group : definitions
 # --
 [${1:el} for $1 in ${2:list}]
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/logger_name b/snippets/python-mode/logger_name
index 9759dd92f6..1cdcc9edad 100644
--- a/snippets/python-mode/logger_name
+++ b/snippets/python-mode/logger_name
@@ -2,4 +2,4 @@
 # name: logger_name
 # key: ln
 # --
-logger = logging.getLogger(${1:__name__})
\ No newline at end of file
+logger = logging.getLogger(${1:__name__})
diff --git a/snippets/python-mode/main b/snippets/python-mode/main
index 9f3c721ed7..df753e3b1b 100644
--- a/snippets/python-mode/main
+++ b/snippets/python-mode/main
@@ -3,4 +3,4 @@
 # key: main
 # --
 def main():
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/metaclass b/snippets/python-mode/metaclass
deleted file mode 100644
index a9088f39c6..0000000000
--- a/snippets/python-mode/metaclass
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: metaclass
-# key: mt
-# group: object oriented
-# --
-__metaclass__ = ${1:type}
diff --git a/snippets/python-mode/method b/snippets/python-mode/method
index 985ef0c9d2..dd969d1de9 100644
--- a/snippets/python-mode/method
+++ b/snippets/python-mode/method
@@ -4,4 +4,4 @@
 # group: object oriented
 # --
 def ${1:method}(self${2:, $3}):
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/method_docstring 
b/snippets/python-mode/method_docstring
index 8f5e78d013..affc63d4ef 100644
--- a/snippets/python-mode/method_docstring
+++ b/snippets/python-mode/method_docstring
@@ -7,4 +7,4 @@ def ${1:name}(self$2):
     \"\"\"$3
     ${2:$(python-args-to-docstring)}
     \"\"\"
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/method_docstring_numpy 
b/snippets/python-mode/method_docstring_numpy
index 75e27d1dc5..8c2910a223 100644
--- a/snippets/python-mode/method_docstring_numpy
+++ b/snippets/python-mode/method_docstring_numpy
@@ -8,4 +8,4 @@ def ${1:name}(self$2):
     \"\"\"$3
     ${2:$(python-args-to-docstring-numpy)}
     \"\"\"
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/not_impl b/snippets/python-mode/not_impl
index 515e35344e..2d35c4581f 100644
--- a/snippets/python-mode/not_impl
+++ b/snippets/python-mode/not_impl
@@ -2,4 +2,4 @@
 # name: not_impl
 # key: not_impl
 # --
-raise NotImplementedError
\ No newline at end of file
+raise NotImplementedError
diff --git a/snippets/python-mode/np b/snippets/python-mode/np
index 9f6327c8e7..aa6bff8fc4 100644
--- a/snippets/python-mode/np
+++ b/snippets/python-mode/np
@@ -4,4 +4,4 @@
 # group : general
 # --
 import numpy as np
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/parse_args b/snippets/python-mode/parse_args
index aa6107010c..89c8b971fe 100644
--- a/snippets/python-mode/parse_args
+++ b/snippets/python-mode/parse_args
@@ -6,4 +6,4 @@
 def parse_arguments():
     parser = argparse.ArgumentParser(description='$1')
     $0
-    return parser.parse_args()
\ No newline at end of file
+    return parser.parse_args()
diff --git a/snippets/python-mode/parser b/snippets/python-mode/parser
index 29a04eaa4a..c52e1791bc 100644
--- a/snippets/python-mode/parser
+++ b/snippets/python-mode/parser
@@ -4,4 +4,4 @@
 # group: argparser
 # --
 parser = argparse.ArgumentParser(description='$1')
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/pass b/snippets/python-mode/pass
index 4734f7fb3f..9e8818953e 100644
--- a/snippets/python-mode/pass
+++ b/snippets/python-mode/pass
@@ -2,4 +2,4 @@
 # name: pass
 # key: ps
 # --
-pass
\ No newline at end of file
+pass
diff --git a/snippets/python-mode/pdb b/snippets/python-mode/pdb
index 6067e3ca7a..65d2db40e0 100644
--- a/snippets/python-mode/pdb
+++ b/snippets/python-mode/pdb
@@ -3,4 +3,4 @@
 # key: pdb
 # group: debug
 # --
-import pdb; pdb.set_trace()
\ No newline at end of file
+breakpoint()
diff --git a/snippets/python-mode/print b/snippets/python-mode/print
index cc1c797e4f..2f908990f9 100644
--- a/snippets/python-mode/print
+++ b/snippets/python-mode/print
@@ -2,4 +2,4 @@
 # name: print
 # key: p
 # --
-print($0)
\ No newline at end of file
+print($0)
diff --git a/snippets/python-mode/prop b/snippets/python-mode/prop
index aede8793f9..a2eb1bd3d8 100644
--- a/snippets/python-mode/prop
+++ b/snippets/python-mode/prop
@@ -1,6 +1,7 @@
 # -*- mode: snippet -*-
 # contributor: Mads D. Kristensen <madsdk@gmail.com>
 # name: prop
+# expand-env: ((yas-indent-line 'fixed))
 # --
 def ${1:foo}():
     doc = """${2:Doc string}"""
@@ -15,4 +16,4 @@ def ${1:foo}():
     return locals()
 $1 = property(**$1())
 
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/pudb b/snippets/python-mode/pudb
index 2e5ba0970e..fff1086857 100644
--- a/snippets/python-mode/pudb
+++ b/snippets/python-mode/pudb
@@ -3,4 +3,4 @@
 # key: pudb
 # group: debug
 # --
-import pudb; pudb.set_trace()
\ No newline at end of file
+import pudb; pudb.set_trace()
diff --git a/snippets/python-mode/reg b/snippets/python-mode/reg
index c4ebeacfa4..567cb3aca4 100644
--- a/snippets/python-mode/reg
+++ b/snippets/python-mode/reg
@@ -4,4 +4,4 @@
 # group : general
 # --
 ${1:regexp} = re.compile(r"${2:expr}")
-$0
\ No newline at end of file
+$0
diff --git a/snippets/python-mode/return b/snippets/python-mode/return
index 641a308a32..43263d2d6e 100644
--- a/snippets/python-mode/return
+++ b/snippets/python-mode/return
@@ -2,4 +2,4 @@
 # name: return
 # key: r
 # --
-return $0
\ No newline at end of file
+return $0
diff --git a/snippets/python-mode/self b/snippets/python-mode/self
index 4461022be4..9928c5a728 100644
--- a/snippets/python-mode/self
+++ b/snippets/python-mode/self
@@ -3,4 +3,4 @@
 # key: .
 # group: object oriented
 # --
-self.$0
\ No newline at end of file
+self.$0
diff --git a/snippets/python-mode/self_without_dot 
b/snippets/python-mode/self_without_dot
index a1a05261e9..81178b8fe8 100644
--- a/snippets/python-mode/self_without_dot
+++ b/snippets/python-mode/self_without_dot
@@ -3,4 +3,4 @@
 # key: s
 # group: object oriented
 # --
-self
\ No newline at end of file
+self
diff --git a/snippets/python-mode/selfassign b/snippets/python-mode/selfassign
index 95d7b2bb8d..bc37fabf99 100644
--- a/snippets/python-mode/selfassign
+++ b/snippets/python-mode/selfassign
@@ -3,4 +3,4 @@
 # key: sn
 # group: object oriented
 # --
-self.$1 = $1
\ No newline at end of file
+self.$1 = $1
diff --git a/snippets/python-mode/setdef b/snippets/python-mode/setdef
index 2398eb1064..71b56d9749 100644
--- a/snippets/python-mode/setdef
+++ b/snippets/python-mode/setdef
@@ -2,4 +2,4 @@
 # name: setdef
 # key: setdef
 # --
-${1:var}.setdefault(${2:key}, []).append(${3:value})
\ No newline at end of file
+${1:var}.setdefault(${2:key}, []).append(${3:value})
diff --git a/snippets/python-mode/size b/snippets/python-mode/size
index 47a0f384ca..a6ed6ab5ed 100644
--- a/snippets/python-mode/size
+++ b/snippets/python-mode/size
@@ -2,4 +2,4 @@
 # name: size
 # key: size
 # --
-sys.getsizeof($0)
\ No newline at end of file
+sys.getsizeof($0)
diff --git a/snippets/python-mode/super b/snippets/python-mode/super
deleted file mode 100644
index 23fba5d15a..0000000000
--- a/snippets/python-mode/super
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: super
-# key: super
-# group: object oriented
-# --
-super(`(replace-regexp-in-string "\\([.]\\)[^.]+$" ", self)." 
(python-info-current-defun) nil nil 1)`($1)
-$0
\ No newline at end of file
diff --git a/snippets/python-mode/test_file b/snippets/python-mode/test_file
index e4b531549b..3fad172fcd 100644
--- a/snippets/python-mode/test_file
+++ b/snippets/python-mode/test_file
@@ -9,4 +9,4 @@ ${1:from ${2:test_file} import *}
 $0
 
 if __name__ == '__main__':
-    unittest.main()
\ No newline at end of file
+    unittest.main()
diff --git a/snippets/python-mode/try b/snippets/python-mode/try
index 27cedde18d..7030eccef9 100644
--- a/snippets/python-mode/try
+++ b/snippets/python-mode/try
@@ -1,8 +1,9 @@
 # -*- mode: snippet -*-
 # name: try
 # key: try
+# expand-env: ((yas-indent-line 'fixed))
 # --
 try:
     $0
 except ${1:Exception}:
-    $2
\ No newline at end of file
+    $2
diff --git a/snippets/python-mode/tryelse b/snippets/python-mode/tryelse
index 999d7403d7..30537d62c6 100644
--- a/snippets/python-mode/tryelse
+++ b/snippets/python-mode/tryelse
@@ -1,10 +1,11 @@
 # -*- mode: snippet -*-
 # name: tryelse
-# key: try
+# key: tryelse
+# expand-env: ((yas-indent-line 'fixed))
 # --
 try:
     $0
 except $1:
     $2
 else:
-    $3
\ No newline at end of file
+    $3
diff --git a/snippets/python-mode/unicode b/snippets/python-mode/unicode
deleted file mode 100644
index 52d6b8d2c1..0000000000
--- a/snippets/python-mode/unicode
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: __unicode__
-# key: un
-# group: dunder methods
-# --
-def __unicode__(self):
-    $0
\ No newline at end of file
diff --git a/snippets/python-mode/unicode_literals 
b/snippets/python-mode/unicode_literals
deleted file mode 100644
index 08e2eb55a3..0000000000
--- a/snippets/python-mode/unicode_literals
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: unicode_literals
-# key: fu
-# group: future
-# --
-from __future__ import unicode_literals
diff --git a/snippets/python-mode/while b/snippets/python-mode/while
index 7b3539c691..a482fac060 100644
--- a/snippets/python-mode/while
+++ b/snippets/python-mode/while
@@ -4,4 +4,4 @@
 # group: control structure
 # --
 while ${1:True}:
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/with b/snippets/python-mode/with
index 7fcbd3820b..e17133cc69 100644
--- a/snippets/python-mode/with
+++ b/snippets/python-mode/with
@@ -4,4 +4,4 @@
 # group : control structure
 # --
 with ${1:expr}${2: as ${3:alias}}:
-    $0
\ No newline at end of file
+    $0
diff --git a/snippets/python-mode/with_statement 
b/snippets/python-mode/with_statement
deleted file mode 100644
index 1be36928d8..0000000000
--- a/snippets/python-mode/with_statement
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- mode: snippet -*-
-# name: with_statement
-# key: fw
-# group: future
-# --
-from __future__ import with_statement
\ No newline at end of file
diff --git a/yasnippet-snippets.el b/yasnippet-snippets.el
index fbb474c4db..3378be8f09 100644
--- a/yasnippet-snippets.el
+++ b/yasnippet-snippets.el
@@ -62,10 +62,6 @@ customizable variable used for a snippet expansion.
 See Info node `(elisp)Customization Types'."
   :group 'yasnippet)
 
-(defun yasnippet-snippets--fixed-indent ()
-  "Set `yas-indent-line' to `fixed'."
-  (set (make-local-variable 'yas-indent-line) 'fixed))
-
 (defun yasnippet-snippets--no-indent ()
   "Set `yas-indent-line' to nil."
   (set (make-local-variable 'yas-indent-line) nil))



reply via email to

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