Skip to content

Commit 41a76dd

Browse files
committed
make sure imports stay sorted
also fix ruff related stuff
1 parent 3955534 commit 41a76dd

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ jobs:
2222
- name: Install ruff
2323
run: pip install ruff
2424

25-
- name: Check code style with ruff
25+
- name: Format code with ruff
2626
run: ruff format --diff
2727

28+
- name: Check code style with ruff
29+
run: ruff check
30+
2831
- name: Check typing with mypy
2932
run: LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh mypy

pygit2/_pygit2.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ from .enums import (
5050
)
5151
from .remotes import Remote
5252
from .repository import BaseRepository
53-
from .submodules import Submodule, SubmoduleCollection
53+
from .submodules import SubmoduleCollection
5454

5555
GIT_OBJ_BLOB = Literal[3]
5656
GIT_OBJ_COMMIT = Literal[1]

pygit2/ffi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525

2626
# Import from pygit2
2727
from ._libgit2 import ffi # type: ignore # noqa: F401
28-
from ._libgit2 import lib as C
28+
from ._libgit2 import lib as C # type: ignore # noqa: F401

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/li
2828
extend-exclude = [ ".cache", ".coverage", "build", "site-packages", "venv*"]
2929
target-version = "py310" # oldest supported Python version
3030

31+
[tool.ruff.lint]
32+
select = ["E4", "E7", "E9", "F", "I"]
33+
3134
[tool.ruff.format]
3235
quote-style = "single"
3336

0 commit comments

Comments
 (0)