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

Commitdde3a8b

Browse files
committed
Fix various typos
Found via `codespell -q 3 -S ./git/ext/gitdb,./test/fixtures/reflog_master,./test/fixtures/diff_mode_only,./test/fixtures/reflog_HEAD`
1 parentb3166ec commitdde3a8b

23 files changed

+33
-33
lines changed

‎doc/source/changes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ https://github.com/gitpython-developers/gitpython/milestone/53?closed=1
6969

7070
- Make Protocol classes ABCs at runtime due to new behaviour/bug in 3.9.7 & 3.10.0-rc1
7171

72-
- Remove use of typing.TypeGuard until later release, to allowdependant libs time to update.
72+
- Remove use of typing.TypeGuard until later release, to allowdependent libs time to update.
7373

7474
- Tracking issue: https://github.com/gitpython-developers/GitPython/issues/1095
7575

@@ -134,7 +134,7 @@ https://github.com/gitpython-developers/gitpython/milestone/48?closed=1
134134
3.1.15 (YANKED)
135135
===============
136136

137-
* adddeprectation warning for python 3.5
137+
* adddeprecation warning for python 3.5
138138

139139
See the following for details:
140140
https://github.com/gitpython-developers/gitpython/milestone/47?closed=1
@@ -595,7 +595,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
595595
- Renamed `ignore_tree_extension_data` keyword argument in `IndexFile.write(...)` to `ignore_extension_data`
596596
* If the git command executed during `Remote.push(...)|fetch(...)` returns with an non-zero exit code and GitPython didn't
597597
obtain any head-information, the corresponding `GitCommandError` will be raised. This may break previous code which expected
598-
these operations to never raise. However, thatbehavious is undesirable as it would effectively hide the fact that there
598+
these operations to never raise. However, thatbehaviour is undesirable as it would effectively hide the fact that there
599599
was an error. See `this issue<https://github.com/gitpython-developers/GitPython/issues/271>`__ for more information.
600600

601601
* If the git executable can't be found in the PATH or at the path provided by `GIT_PYTHON_GIT_EXECUTABLE`, this is made

‎git/config.py

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

7272

7373
classMetaParserBuilder(abc.ABCMeta):
74-
"""Utlity class wrapping base-class methods into decorators that assure read-only properties"""
74+
"""Utility class wrapping base-class methods into decorators that assure read-only properties"""
7575
def__new__(cls,name:str,bases:Tuple,clsdict:Dict[str,Any])->'MetaParserBuilder':
7676
"""
7777
Equip all base-class methods with a needs_values decorator, and all non-const methods

‎git/index/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def _process_diff_args(self, # type: ignore[override]
579579
def_to_relative_path(self,path:PathLike)->PathLike:
580580
"""
581581
:return: Version of path relative to our git directory or raise ValueError
582-
if it is not within our gitdirecotory"""
582+
if it is not within our gitdirectory"""
583583
ifnotosp.isabs(path):
584584
returnpath
585585
ifself.repo.bare:
@@ -682,7 +682,7 @@ def add(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, 'Submodule']
682682
into the object database.
683683
684684
PathStrings may contain globs, such as 'lib/__init__*' or can be directories
685-
like 'lib', the latter ones will add all the files within thedirctory and
685+
like 'lib', the latter ones will add all the files within thedirectory and
686686
subdirectories.
687687
688688
This equals a straight git-add.
@@ -779,7 +779,7 @@ def add(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, 'Submodule']
779779
"At least one Entry has a null-mode - please use index.remove to remove files for clarity")
780780
# END null mode should be remove
781781

782-
#HANLDE ENTRY OBJECT CREATION
782+
#HANDLE ENTRY OBJECT CREATION
783783
# create objects if required, otherwise go with the existing shas
784784
null_entries_indices= [ifori,einenumerate(entries)ife.binsha==Object.NULL_BIN_SHA]
785785
ifnull_entries_indices:
@@ -813,7 +813,7 @@ def handle_null_entries(self: 'IndexFile') -> None:
813813
fprogress(entry.path,False,entry)
814814
fprogress(entry.path,True,entry)
815815
# END handle progress
816-
# END for eachenty
816+
# END for eachentry
817817
entries_added.extend(entries)
818818
# END if there are base entries
819819

‎git/index/fun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def write_tree_from_cache(entries: List[IndexEntry], odb: 'GitCmdObjectDB', sl:
314314

315315
# finally create the tree
316316
sio=BytesIO()
317-
tree_to_stream(tree_items,sio.write)# writes to stream as bytes, butdoesnt change tree_items
317+
tree_to_stream(tree_items,sio.write)# writes to stream as bytes, butdoesn't change tree_items
318318
sio.seek(0)
319319

320320
istream=odb.store(IStream(str_tree_type,len(sio.getvalue()),sio))

‎git/objects/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# --------------------------------------------------------------------------
3333

3434

35-
_assertion_msg_format="Created object %r whose python type %r disagrees with theacutual git object type %r"
35+
_assertion_msg_format="Created object %r whose python type %r disagrees with theactual git object type %r"
3636

3737
__all__= ("Object","IndexObject")
3838

‎git/objects/commit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def trailers(self) -> Dict:
322322
Git messages can contain trailer information that are similar to RFC 822
323323
e-mail headers (see: https://git-scm.com/docs/git-interpret-trailers).
324324
325-
Thisfuncions calls ``git interpret-trailers --parse`` onto the message
325+
Thisfunctions calls ``git interpret-trailers --parse`` onto the message
326326
to extract the trailer information. The key value pairs are stripped of
327327
leading and trailing whitespaces before they get saved into a dictionary.
328328
@@ -461,7 +461,7 @@ def create_from_tree(cls, repo: 'Repo', tree: Union[Tree, str], message: str,
461461
# * Environment variables override configuration values
462462
# * Sensible defaults are set according to the git documentation
463463

464-
#COMMITER AND AUTHOR INFO
464+
#COMMITTER AND AUTHOR INFO
465465
cr=repo.config_reader()
466466
env=os.environ
467467

‎git/objects/submodule/root.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def update(self, previous_commit: Union[Commit_ish, None] = None,
338338
sm.update(recursive=False,init=init,to_latest_revision=to_latest_revision,
339339
progress=progress,dry_run=dry_run,force=force_reset,keep_going=keep_going)
340340

341-
# update recursively depth first - question is whichinconsitent
341+
# update recursively depth first - question is whichinconsistent
342342
# state will be better in case it fails somewhere. Defective branch
343343
# or defective depth. The RootSubmodule type will never process itself,
344344
# which was done in the previous expression

‎git/objects/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from .submodule.baseimportSubmodule
3838
fromgit.typesimportProtocol,runtime_checkable
3939
else:
40-
# Protocol = Generic[_T] #NNeeded for typing bug #572?
40+
# Protocol = Generic[_T] #Needed for typing bug #572?
4141
Protocol=ABC
4242

4343
defruntime_checkable(f):
@@ -359,7 +359,7 @@ def _list_traverse(self, as_edge: bool = False, *args: Any, **kwargs: Any
359359
out:IterableList[Union['Commit','Submodule','Tree','Blob']]=IterableList(id)
360360
out.extend(self.traverse(as_edge=as_edge,*args,**kwargs))
361361
returnout
362-
# overloads in subclasses (mypydoes't allow typing self: subclass)
362+
# overloads in subclasses (mypydoesn't allow typing self: subclass)
363363
# Union[IterableList['Commit'], IterableList['Submodule'], IterableList[Union['Submodule', 'Tree', 'Blob']]]
364364
else:
365365
# Raise deprecationwarning, doesn't make sense to use this

‎git/refs/symbolic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def set_reference(self, ref: Union[Commit_ish, 'SymbolicReference', str],
298298
logmsg:Union[str,None]=None)->'SymbolicReference':
299299
"""Set ourselves to the given ref. It will stay a symbol if the ref is a Reference.
300300
Otherwise an Object, given as Object instance or refspec, is assumed and if valid,
301-
will be set which effectively detaches therefererence if it was a purely
301+
will be set which effectively detaches thereference if it was a purely
302302
symbolic one.
303303
304304
:param ref: SymbolicReference instance, Object instance or refspec string

‎git/refs/tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TagReference(Reference):
3636
_common_path_default=Reference._common_path_default+"/"+_common_default
3737

3838
@property
39-
defcommit(self)->'Commit':# type: ignore[override] # LazyMixin has unrelatedcomit method
39+
defcommit(self)->'Commit':# type: ignore[override] # LazyMixin has unrelatedcommit method
4040
""":return: Commit object the tag ref points to
4141
4242
:raise ValueError: if the tag points to a tree or blob"""
@@ -91,7 +91,7 @@ def create(cls: Type['TagReference'], repo: 'Repo', path: PathLike,
9191
9292
:param message:
9393
Synonym for :param logmsg:
94-
Included for backwardscompatability. :param logmsg is used in preference if both given.
94+
Included for backwardscompatibility. :param logmsg is used in preference if both given.
9595
9696
:param force:
9797
If True, to force creation of a tag even though that tag already exists.

‎git/repo/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ def is_dirty(self, index: bool = True, working_tree: bool = True, untracked_file
711711
index or the working copy have changes."""
712712
ifself._bare:
713713
# Bare repositories with no associated working directory are
714-
# alwaysconsired to be clean.
714+
# alwaysconsidered to be clean.
715715
returnFalse
716716

717717
# start from the one which is fastest to evaluate
@@ -760,7 +760,7 @@ def _get_untracked_files(self, *args: Any, **kwargs: Any) -> List[str]:
760760
untracked_files=True,
761761
as_process=True,
762762
**kwargs)
763-
# Untracked filespreffix in porcelain mode
763+
# Untracked filesprefix in porcelain mode
764764
prefix="?? "
765765
untracked_files= []
766766
forlineinproc.stdout:

‎git/repo/fun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']:
266266
# END handle tag
267267
eliftoken=='@':
268268
# try single int
269-
assertrefisnotNone,"Requre Reference to access reflog"
269+
assertrefisnotNone,"Require Reference to access reflog"
270270
revlog_index=None
271271
try:
272272
# transform reversed index into the format of our revlog

‎git/types.py

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

5555
defassert_never(inp:NoReturn,raise_error:bool=True,exc:Union[Exception,None]=None)->None:
5656
"""For use in exhaustive checking of literal or Enum in if/else chain.
57-
Should only be reached if allmemebers not handled OR attempt to pass non-members through chain.
57+
Should only be reached if allmembers not handled OR attempt to pass non-members through chain.
5858
5959
If all members handled, type is Empty. Otherwise, will cause mypy error.
6060
If non-members given, should cause mypy error at variable creation.

‎pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[tool.pytest.ini_options]
66
python_files ='test_*.py'
7-
testpaths ='test'# spaceseperated list of paths from root e.g test tests doc/testing
7+
testpaths ='test'# spaceseparated list of paths from root e.g test tests doc/testing
88
addopts ='--cov=git --cov-report=term --maxfail=10 --force-sugar --disable-warnings'
99
filterwarnings ='ignore::DeprecationWarning'
1010
# --cov coverage

‎test/fixtures/diff_p

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ index 1d5251d40fb65ac89184ec662a3e1b04d0c24861..98eeddda5ed2b0e215e21128112393bd
397397
self.git_dir = git_dir
398398
end
399399

400-
- #Converstion hash from Ruby style options to git command line
400+
- #Conversion hash from Ruby style options to git command line
401401
- # style options
402402
- TRANSFORM = {:max_count => "--max-count=",
403403
- :skip => "--skip=",

‎test/fixtures/git_config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
[branch "mainline_performance"]
2929
remote = mainline
3030
merge = refs/heads/master
31-
# section with value defined before include to beoverriden
31+
# section with value defined before include to beoverridden
3232
[sec]
3333
var0 = value0_main
3434
[include]

‎test/fixtures/rev_list_bisect_all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ committer David Aguilar <davvid@gmail.com> 1220418344 -0700
4040
commit: handle --bisect-all output in Commit.list_from_string
4141

4242
Rui Abreu Ferrerira pointed out that "git rev-list --bisect-all"
43-
returns a slightly different format which we can easilyaccomodate
43+
returns a slightly different format which we can easilyaccommodate
4444
by changing the way we parse rev-list output.
4545

4646
http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027

‎test/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def test_base(self):
175175
assertnum_sectionsandnum_options
176176
assertr_config._is_initializedisTrue
177177

178-
# get value whichdoesnt exist, with default
178+
# get value whichdoesn't exist, with default
179179
default="my default value"
180180
assertr_config.get_value("doesnt","exist",default)==default
181181

‎test/test_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def test_diff_unsafe_paths(self):
273273
self.assertEqual(res[13].b_path,'b/"with even more quotes"')
274274

275275
deftest_diff_patch_format(self):
276-
# test all of the 'old' format diffs forcompletness - it should at least
276+
# test all of the 'old' format diffs forcompleteness - it should at least
277277
# be able to deal with it
278278
fixtures= ("diff_2","diff_2f","diff_f","diff_i","diff_mode_only",
279279
"diff_new_mode","diff_numstat","diff_p","diff_rename",

‎test/test_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def update(self, op_code, cur_count, max_count=None, message=''):
135135
forfetch_infoinorigin.fetch(progress=MyProgressPrinter()):
136136
print("Updated %s to %s"% (fetch_info.ref,fetch_info.commit))
137137
# create a local branch at the latest fetched master. We specify the name statically, but you have all
138-
# information to do itprogramatically as well.
138+
# information to do itprogrammatically as well.
139139
bare_master=bare_repo.create_head('master',origin.refs.master)
140140
bare_repo.head.set_reference(bare_master)
141141
assertnotbare_repo.delete_remote(origin).exists()

‎test/test_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_cmd_override(self):
159159
prev_cmd=self.git.GIT_PYTHON_GIT_EXECUTABLE
160160
exc=GitCommandNotFound
161161
try:
162-
# set it to something thatdoens't exist, assure it raises
162+
# set it to something thatdoesn't exist, assure it raises
163163
type(self.git).GIT_PYTHON_GIT_EXECUTABLE=osp.join(
164164
"some","path","which","doesn't","exist","gitbinary")
165165
self.assertRaises(exc,self.git.version)

‎test/test_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,4 +936,4 @@ def test_commit_msg_hook_fail(self, rw_repo):
936936
self.assertEqual(err.stderr,"\n stderr: 'stderr\n'")
937937
assertstr(err)
938938
else:
939-
raiseAssertionError("Should havecought a HookExecutionError")
939+
raiseAssertionError("Should havecaught a HookExecutionError")

‎test/test_submodule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def test_root_module(self, rwrepo):
546546
assertnsm.module().head.commit.hexsha==nsm.hexsha
547547
nsm.module().index.add([nsm])
548548
nsm.module().index.commit("added new file")
549-
rm.update(recursive=False,dry_run=True,progress=prog)# would not change head, and thusdoens't fail
549+
rm.update(recursive=False,dry_run=True,progress=prog)# would not change head, and thusdoesn't fail
550550
# Everything we can do from now on will trigger the 'future' check, so no is_dirty() check will even run
551551
# This would only run if our local branch is in the past and we have uncommitted changes
552552

@@ -730,7 +730,7 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
730730
assertparent.head.commit.tree[sm.path].binsha==sm.binsha
731731
assertsm_too.binsha==sm.binsha,"cached submodule should point to the same commit as updated one"
732732

733-
added_bies=parent.index.add([sm])#addded base-index-entries
733+
added_bies=parent.index.add([sm])#added base-index-entries
734734
assertlen(added_bies)==1
735735
parent.index.commit("add same submodule entry")
736736
commit_sm=parent.head.commit.tree[sm.path]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp