Skip to content

Instantly share code, notes, and snippets.

View lig's full-sized avatar
🛴
kicking it

Serge Matveenko lig

🛴
kicking it
View GitHub Profile
@lig
lig / commit.py
Created March 30, 2020 09:15
pygit2 create commit simple
import pygit2
repo = pygit2.Repository(path='.')
repo.index.add_all()
repo.index.write()
tree = repo.index.write_tree()
parent, ref = repo.resolve_refish(refish=repo.head.name)
repo.create_commit(
@lig
lig / super.py
Last active May 14, 2020 12:13
super() outside of a class
>>> class A:
... def foo(self):
... return 5
>>> class B(A):
... def foo(self):
... return 3
>>> b = B()