update packages

This commit is contained in:
2025-03-11 21:14:26 +01:00
parent 45d49daef0
commit 14dcaaddde
440 changed files with 13229 additions and 8718 deletions

View File

@@ -1,23 +1,34 @@
;;; -*- lexical-binding: t -*-
(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 +44,3 @@
(list "\nParameters\n----------" formatted-params
"\nReturns\n-------" formatted-ret)
"\n"))))
(add-hook 'python-mode-hook #'yasnippet-snippets--fixed-indent)

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __abs__
# key: _abs
# group: Special methods
# --
def __abs__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __add__
# key: _add
# group: Special methods
# --
def __add__(self, other):
return $0

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: __aenter__
# key: _aenter
# group: Special methods
# --
async def __aenter__(self):
$0
return self

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __aexit__
# key: _aexit
# group: Special methods
# --
async def __aexit__(self, exc_type, exc_value, traceback):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __aiter__
# key: _aiter
# group: Special methods
# --
def __aiter__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __and__
# key: _and
# group: Special methods
# --
def __and__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __anext__
# key: _anext
# group: Special methods
# --
async def __anext__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __await__
# key: _await
# group: Special methods
# --
def __await__(self):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __bool__
# key: _bool
# group: Special methods
# --
def __bool__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __bytes__
# key: _bytes
# group: Special methods
# --
def __bytes__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __call__
# key: _call
# group: Special methods
# --
def __call__(self, ${1:*args}):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ceil__
# key: _ceil
# group: Special methods
# --
def __ceil__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __class_getitem__
# key: _class_getitem
# group: Special methods
# --
def __class_getitem__(cls, key):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __cmp__
# key: _cmp
# group: Special methods
# --
def __cmp__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __complex__
# key: _complex
# group: Special methods
# --
def __complex__(self):
return $0

View File

@@ -1,7 +1,7 @@
# -*- mode: snippet -*-
# name: __contains__
# key: cont
# group: dunder methods
# key: _contains
# group: Special methods
# --
def __contains__(self, el):
$0
def __contains__(self, item):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __del__
# key: _del
# group: Special methods
# --
def __del__(self):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __delattr__
# key: _delattr
# group: Special methods
# --
def __delattr__(self, name):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __delete__
# key: _delete
# group: Special methods
# --
def __delete__(self, instance):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __delitem__
# key: _delitem
# group: Special methods
# --
def __delitem__(self, key):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __dir__
# key: _dir
# group: Special methods
# --
def __dir__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __div__
# key: _div
# group: Special methods
# --
def __div__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __divmod__
# key: _divmod
# group: Special methods
# --
def __divmod__(self, other):
return $0

View File

@@ -1,9 +1,9 @@
# -*- mode: snippet -*-
# name: __enter__
# key: ent
# group: dunder methods
# key: _enter
# group: Special methods
# --
def __enter__(self):
$0
return self
return self

View File

@@ -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
return $0

View File

@@ -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
def __exit__(self, exc_type, exc_value, traceback):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __float__
# key: _float
# group: Special methods
# --
def __float__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __floor__
# key: _floor
# group: Special methods
# --
def __floor__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __floordiv__
# key: _floordiv
# group: Special methods
# --
def __floordiv__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __format__
# key: _format
# group: Special methods
# --
def __format__(self, format_spec):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ge__
# key: _ge
# group: Special methods
# --
def __ge__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __get__
# key: _get
# group: Special methods
# --
def __get__(self, instance, owner=None):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __getattr__
# key: _getattr
# group: Special methods
# --
def __getattr__(self, name):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __getattribute__
# key: _getattribute
# group: Special methods
# --
def __getattribute__(self, name):
return $0

View File

@@ -1,7 +1,7 @@
# -*- mode: snippet -*-
# name: __getitem__
# key: getit
# group: dunder methods
# key: _getitem
# group: Special methods
# --
def __getitem__(self, ${1:key}):
$0
def __getitem__(self, key):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __gt__
# key: _gt
# group: Special methods
# --
def __gt__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __hash__
# key: _hash
# group: Special methods
# --
def __hash__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __iadd__
# key: _iadd
# group: Special methods
# --
def __iadd__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __iand__
# key: _iand
# group: Special methods
# --
def __iand__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __idiv__
# key: _idiv
# group: Special methods
# --
def __idiv__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ifloordiv__
# key: _ifloordiv
# group: Special methods
# --
def __ifloordiv__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ilshift__
# key: _ilshift
# group: Special methods
# --
def __ilshift__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __imatmul__
# key: _imatmul
# group: Special methods
# --
def __imatmul__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __imod__
# key: _imod
# group: Special methods
# --
def __imod__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __imul__
# key: _imul
# group: Special methods
# --
def __imul__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __index__
# key: _index
# group: Special methods
# --
def __index__(self):
return $0

View File

@@ -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
}$0

View File

@@ -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

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __instancecheck__
# key: _instancecheck
# group: Special methods
# --
def __instancecheck__(self, instance):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __int__
# key: _int
# group: Special methods
# --
def __int__(self):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __invert__
# key: _invert
# group: Special methods
# --
def __invert__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ior__
# key: _ior
# group: Special methods
# --
def __ior__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ipow__
# key: _ipow
# group: Special methods
# --
def __ipow__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __irshift__
# key: _irshift
# group: Special methods
# --
def __irshift__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __isub__
# key: _isub
# group: Special methods
# --
def __isub__(self, other):
return $0

View File

@@ -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)}
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __itruediv__
# key: _itruediv
# group: Special methods
# --
def __itruediv__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ixor__
# key: _ixor
# group: Special methods
# --
def __ixor__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __le__
# key: _le
# group: Special methods
# --
def __le__(self, other):
return $0

View File

@@ -1,7 +1,7 @@
# -*- mode: snippet -*-
# name: __len__
# key: len
# group: dunder methods
# key: _len
# group: Special methods
# --
def __len__(self):
$0
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __length_hint__
# key: _length_hint
# group: Special methods
# --
def __length_hint__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __lshift__
# key: _lshift
# group: Special methods
# --
def __lshift__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __lt__
# key: _lt
# group: Special methods
# --
def __lt__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __matmul__
# key: _matmul
# group: Special methods
# --
def __matmul__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __missing__
# key: _missing
# group: Special methods
# --
def __missing__(self, key):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __mod__
# key: _mod
# group: Special methods
# --
def __mod__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __mul__
# key: _mul
# group: Special methods
# --
def __mul__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ne__
# key: _ne
# group: Special methods
# --
def __ne__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __neg__
# key: _neg
# group: Special methods
# --
def __neg__(self):
return $0

View File

@@ -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

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __next__
# key: _next
# group: Special methods
# --
def __next__(self):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __or__
# key: _or
# group: Special methods
# --
def __or__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __pos__
# key: _pos
# group: Special methods
# --
def __pos__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __pow__
# key: _pow
# group: Special methods
# --
def __pow__(self, other, modulo=None):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __prepare__
# key: _prepare
# group: Special methods
# --
def __prepare__(name, bases, **kwds):
return ${0:\{\}}

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __radd__
# key: _radd
# group: Special methods
# --
def __radd__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rand__
# key: _rand
# group: Special methods
# --
def __rand__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rdivmod__
# key: _rdivmod
# group: Special methods
# --
def __rdivmod__(self, other):
return $0

View File

@@ -1,7 +1,7 @@
# -*- mode: snippet -*-
# name: __repr__
# key: repr
# group: dunder methods
# key: _repr
# group: Special methods
# --
def __repr__(self):
$0
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __reversed__
# key: _reversed
# group: Special methods
# --
def __reversed__(self):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rfloordiv__
# key: _rfloordiv
# group: Special methods
# --
def __rfloordiv__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rlshift__
# key: _rlshift
# group: Special methods
# --
def __rlshift__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rmatmul__
# key: _rmatmul
# group: Special methods
# --
def __rmatmul__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rmod__
# key: _rmod
# group: Special methods
# --
def __rmod__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rmul__
# key: _rmul
# group: Special methods
# --
def __rmul__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __ror__
# key: _ror
# group: Special methods
# --
def __ror__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __round__
# key: _round
# group: Special methods
# --
def __round__(self, ndigits=None):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rpow__
# key: _rpow
# group: Special methods
# --
def __rpow__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rrshift__
# key: _rrshift
# group: Special methods
# --
def __rrshift__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rshift__
# key: _rshift
# group: Special methods
# --
def __rshift__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rsub__
# key: _rsub
# group: Special methods
# --
def __rsub__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rtruediv__
# key: _rtruediv
# group: Special methods
# --
def __rtruediv__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __rxor__
# key: _rxor
# group: Special methods
# --
def __rxor__(self, other):
return $0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __set__
# key: _set
# group: Special methods
# --
def __set__(self, instance, value):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __set_name__
# key: _set_name
# group: Special methods
# --
def __set_name__(self, owner, name):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __setattr__
# key: _setattr
# group: Special methods
# --
def __setattr__(self, name, value):
$0

View File

@@ -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
def __setitem__(self, key, value):
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: __slots__
# key: _slots
# group: Class attributes
# --
__slots__ = ($1)
$0

View File

@@ -1,7 +1,7 @@
# -*- mode: snippet -*-
# name: __str__
# key: str
# group: dunder methods
# key: _str
# group: Special methods
# --
def __str__(self):
$0
return $0

Some files were not shown because too many files have changed in this diff Show More