Skip to content

Commit dde3a8b

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 parent b3166ec commit dde3a8b

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 allow dependant libs time to update.
72+
- Remove use of typing.TypeGuard until later release, to allow dependent 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-
* add deprectation warning for python 3.5
137+
* add deprecation 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, that behavious is undesirable as it would effectively hide the fact that there
598+
these operations to never raise. However, that behaviour 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
class MetaParserBuilder(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 git direcotory"""
582+
if it is not within our git directory"""
583583
if not osp.isabs(path):
584584
return path
585585
if self.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 the dirctory and
685+
like 'lib', the latter ones will add all the files within the directory 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 = [i for i, e in enumerate(entries) if e.binsha == Object.NULL_BIN_SHA]
785785
if null_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 each enty
816+
# END for each entry
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, but doesnt change tree_items
317+
tree_to_stream(tree_items, sio.write) # writes to stream as bytes, but doesn'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 the acutual git object type %r"
35+
_assertion_msg_format = "Created object %r whose python type %r disagrees with the actual 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-
This funcions calls ``git interpret-trailers --parse`` onto the message
325+
This functions 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 which inconsitent
341+
# update recursively depth first - question is which inconsistent
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.base import Submodule
3838
from git.types import Protocol, 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
def runtime_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
return out
362-
# overloads in subclasses (mypy does't allow typing self: subclass)
362+
# overloads in subclasses (mypy doesn'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 the refererence if it was a purely
301+
will be set which effectively detaches the reference 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-
def commit(self) -> 'Commit': # type: ignore[override] # LazyMixin has unrelated comit method
39+
def commit(self) -> 'Commit': # type: ignore[override] # LazyMixin has unrelated commit 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 backwards compatability. :param logmsg is used in preference if both given.
94+
Included for backwards compatibility. :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.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy