Skip to content

Commit 8818b9a

Browse files
committed
Migrate to pygit2 to fix linting issues
1 parent 4d3fec0 commit 8818b9a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bot/cogs/utilities.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from discord.ext import commands
1010
from discord.utils import format_dt
1111
from libs.utils import Embed, RoboContext, human_timedelta, is_docker
12+
from pygit2.enums import SortMode
13+
1214
from rodhaj import Rodhaj
1315

1416

@@ -46,9 +48,7 @@ def format_commit(self, commit: pygit2.Commit) -> str:
4648
def get_last_commits(self, count: int = 5):
4749
repo = pygit2.Repository(".git")
4850
commits = list(
49-
itertools.islice(
50-
repo.walk(repo.head.target, pygit2.GIT_SORT_TOPOLOGICAL), count
51-
)
51+
itertools.islice(repo.walk(repo.head.target, SortMode.TOPOLOGICAL), count)
5252
)
5353
return "\n".join(self.format_commit(c) for c in commits)
5454

poetry.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ winloop = {markers = "sys_platform == \"win32\"", version = "^0.1.1"}
1414
asyncpg = "^0.29.0"
1515
discord-ext-menus = {git = "https://github.com/Rapptz/discord-ext-menus", rev = "8686b5d1bbc1d3c862292eb436ab630d6e9c9b53"}
1616
psutil = "^5.9.8"
17-
pygit2 = "^1.13.3"
17+
pygit2 = "^1.14.0"
1818
python-dateutil = "^2.8.2"
1919
click = "^8.1.7"
2020
typing-extensions = {version = "^4.9.0"}

0 commit comments

Comments
 (0)