Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89822f8

Browse files
authored
Merge pull request#1888 from Borda/precommit/typos
lint: add typos check
2 parents3d3c86c +813520c commit89822f8

File tree

9 files changed

+24
-11
lines changed

9 files changed

+24
-11
lines changed

‎.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
repos:
2+
-repo:https://github.com/codespell-project/codespell
3+
rev:v2.2.4
4+
hooks:
5+
-id:codespell
6+
additional_dependencies:[tomli]
7+
# args: ["--write-changes"] # consider enabling for auto-fif
8+
exclude:"test/fixtures/"
9+
210
-repo:https://github.com/astral-sh/ruff-pre-commit
311
rev:v0.4.3
412
hooks:

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In the less common case that you do not want to install test dependencies, `pip
101101

102102
####With editable*dependencies* (not preferred, and rarely needed)
103103

104-
In rare cases, you may want to work on GitPython and one or both of its[gitdb](https://github.com/gitpython-developers/gitdb) and[smmap](https://github.com/gitpython-developers/smmap) dependencies at the same time, with changes in your local working copy of gitdb or smmapimmediatley reflected in the behavior of your local working copy of GitPython. This can be done by making editable installations of those dependencies in the same virtual environment where you install GitPython.
104+
In rare cases, you may want to work on GitPython and one or both of its[gitdb](https://github.com/gitpython-developers/gitdb) and[smmap](https://github.com/gitpython-developers/smmap) dependencies at the same time, with changes in your local working copy of gitdb or smmapimmediately reflected in the behavior of your local working copy of GitPython. This can be done by making editable installations of those dependencies in the same virtual environment where you install GitPython.
105105

106106
If you want to do that*and* you want the versions in GitPython's git submodules to be used, then pass`-e git/ext/gitdb` and/or`-e git/ext/gitdb/gitdb/ext/smmap` to`pip install`. This can be done in any order, and in separate`pip install` commands or the same one, so long as`-e` appears before*each* path. For example, you can install GitPython, gitdb, and smmap editably in the currently active virtual environment this way:
107107

‎doc/source/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ https://github.com/gitpython-developers/GitPython/releases/tag/3.1.42
2020
3.1.41
2121
======
2222

23-
This release is relevant for security as it fixes a possiblearbitary
23+
This release is relevant for security as it fixes a possiblearbitrary
2424
code execution on Windows.
2525

2626
See this PR for details: https://github.com/gitpython-developers/GitPython/pull/1792

‎git/index/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ def reset(
14431443
key=entry_key(path,0)
14441444
self.entries[key]=nie[key]
14451445
exceptKeyError:
1446-
# If key is not in theirs, itmusn't be in ours.
1446+
# If key is not in theirs, itmustn't be in ours.
14471447
try:
14481448
delself.entries[key]
14491449
exceptKeyError:

‎git/objects/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,11 @@ def addToStack(
568568
yieldrval
569569

570570
# Only continue to next level if this is appropriate!
571-
nd=d+1
572-
ifdepth>-1andnd>depth:
571+
next_d=d+1
572+
ifdepth>-1andnext_d>depth:
573573
continue
574574

575-
addToStack(stack,item,branch_first,nd)
575+
addToStack(stack,item,branch_first,next_d)
576576
# END for each item on work stack
577577

578578

‎git/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def _from_line(cls, remote: "Remote", line: str) -> "PushInfo":
250250
flags|=cls.NEW_TAG
251251
elif"[new branch]"insummary:
252252
flags|=cls.NEW_HEAD
253-
# uptodate encoded in control character
253+
#`uptodate` encoded in control character
254254
else:
255255
# Fast-forward or forced update - was encoded in control character,
256256
# but we parse the old and new commit.

‎pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,8 @@ lint.unfixable = [
7878
"test/**" = [
7979
"B018",# useless-expression
8080
]
81+
82+
[tool.codespell]
83+
ignore-words-list="gud,doesnt"
84+
#count = true
85+
quiet-level =3

‎test/test_exc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
_streams_n_substrings= (
5454
None,
55-
"steram",
55+
"stream",
5656
"ομορφο stream",
5757
)
5858

‎test/test_index.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ class Mocked:
10181018
@pytest.mark.xfail(
10191019
type(_win_bash_status)isWinBashStatus.Absent,
10201020
reason="Can't run a hook on Windows without bash.exe.",
1021-
rasies=HookExecutionError,
1021+
raises=HookExecutionError,
10221022
)
10231023
@pytest.mark.xfail(
10241024
type(_win_bash_status)isWinBashStatus.WslNoDistro,
@@ -1077,7 +1077,7 @@ def test_hook_uses_shell_not_from_cwd(self, rw_dir, case):
10771077
@pytest.mark.xfail(
10781078
type(_win_bash_status)isWinBashStatus.Absent,
10791079
reason="Can't run a hook on Windows without bash.exe.",
1080-
rasies=HookExecutionError,
1080+
raises=HookExecutionError,
10811081
)
10821082
@pytest.mark.xfail(
10831083
type(_win_bash_status)isWinBashStatus.WslNoDistro,
@@ -1120,7 +1120,7 @@ def test_pre_commit_hook_fail(self, rw_repo):
11201120
@pytest.mark.xfail(
11211121
type(_win_bash_status)isWinBashStatus.Absent,
11221122
reason="Can't run a hook on Windows without bash.exe.",
1123-
rasies=HookExecutionError,
1123+
raises=HookExecutionError,
11241124
)
11251125
@pytest.mark.xfail(
11261126
type(_win_bash_status)isWinBashStatus.Wsl,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp