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

Fix various typos#1438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:mainfromluzpaz:typos
May 7, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionsdoc/source/changes.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -69,7 +69,7 @@ https://github.com/gitpython-developers/gitpython/milestone/53?closed=1

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

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

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

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

* adddeprectation warning for python 3.5
* adddeprecation warning for python 3.5

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

* If the git executable can't be found in the PATH or at the path provided by `GIT_PYTHON_GIT_EXECUTABLE`, this is made
Expand Down
2 changes: 1 addition & 1 deletiongit/config.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,7 +71,7 @@


class MetaParserBuilder(abc.ABCMeta):
"""Utlity class wrapping base-class methods into decorators that assure read-only properties"""
"""Utility class wrapping base-class methods into decorators that assure read-only properties"""
def __new__(cls, name: str, bases: Tuple, clsdict: Dict[str, Any]) -> 'MetaParserBuilder':
"""
Equip all base-class methods with a needs_values decorator, and all non-const methods
Expand Down
8 changes: 4 additions & 4 deletionsgit/index/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -579,7 +579,7 @@ def _process_diff_args(self, # type: ignore[override]
def _to_relative_path(self, path: PathLike) -> PathLike:
"""
:return: Version of path relative to our git directory or raise ValueError
if it is not within our gitdirecotory"""
if it is not within our gitdirectory"""
if not osp.isabs(path):
return path
if self.repo.bare:
Expand DownExpand Up@@ -682,7 +682,7 @@ def add(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, 'Submodule']
into the object database.

PathStrings may contain globs, such as 'lib/__init__*' or can be directories
like 'lib', the latter ones will add all the files within thedirctory and
like 'lib', the latter ones will add all the files within thedirectory and
subdirectories.

This equals a straight git-add.
Expand DownExpand Up@@ -779,7 +779,7 @@ def add(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, 'Submodule']
"At least one Entry has a null-mode - please use index.remove to remove files for clarity")
# END null mode should be remove

#HANLDE ENTRY OBJECT CREATION
#HANDLE ENTRY OBJECT CREATION
# create objects if required, otherwise go with the existing shas
null_entries_indices = [i for i, e in enumerate(entries) if e.binsha == Object.NULL_BIN_SHA]
if null_entries_indices:
Expand DownExpand Up@@ -813,7 +813,7 @@ def handle_null_entries(self: 'IndexFile') -> None:
fprogress(entry.path, False, entry)
fprogress(entry.path, True, entry)
# END handle progress
# END for eachenty
# END for eachentry
entries_added.extend(entries)
# END if there are base entries

Expand Down
2 changes: 1 addition & 1 deletiongit/index/fun.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -314,7 +314,7 @@ def write_tree_from_cache(entries: List[IndexEntry], odb: 'GitCmdObjectDB', sl:

# finally create the tree
sio = BytesIO()
tree_to_stream(tree_items, sio.write) # writes to stream as bytes, butdoesnt change tree_items
tree_to_stream(tree_items, sio.write) # writes to stream as bytes, butdoesn't change tree_items
sio.seek(0)

istream = odb.store(IStream(str_tree_type, len(sio.getvalue()), sio))
Expand Down
2 changes: 1 addition & 1 deletiongit/objects/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@
# --------------------------------------------------------------------------


_assertion_msg_format = "Created object %r whose python type %r disagrees with theacutual git object type %r"
_assertion_msg_format = "Created object %r whose python type %r disagrees with theactual git object type %r"

__all__ = ("Object", "IndexObject")

Expand Down
4 changes: 2 additions & 2 deletionsgit/objects/commit.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -322,7 +322,7 @@ def trailers(self) -> Dict:
Git messages can contain trailer information that are similar to RFC 822
e-mail headers (see: https://git-scm.com/docs/git-interpret-trailers).

Thisfuncions calls ``git interpret-trailers --parse`` onto the message
Thisfunctions calls ``git interpret-trailers --parse`` onto the message
to extract the trailer information. The key value pairs are stripped of
leading and trailing whitespaces before they get saved into a dictionary.

Expand DownExpand Up@@ -461,7 +461,7 @@ def create_from_tree(cls, repo: 'Repo', tree: Union[Tree, str], message: str,
# * Environment variables override configuration values
# * Sensible defaults are set according to the git documentation

#COMMITER AND AUTHOR INFO
#COMMITTER AND AUTHOR INFO
cr = repo.config_reader()
env = os.environ

Expand Down
2 changes: 1 addition & 1 deletiongit/objects/submodule/root.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -338,7 +338,7 @@ def update(self, previous_commit: Union[Commit_ish, None] = None,
sm.update(recursive=False, init=init, to_latest_revision=to_latest_revision,
progress=progress, dry_run=dry_run, force=force_reset, keep_going=keep_going)

# update recursively depth first - question is whichinconsitent
# update recursively depth first - question is whichinconsistent
# state will be better in case it fails somewhere. Defective branch
# or defective depth. The RootSubmodule type will never process itself,
# which was done in the previous expression
Expand Down
4 changes: 2 additions & 2 deletionsgit/objects/util.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,7 @@
from .submodule.base import Submodule
from git.types import Protocol, runtime_checkable
else:
# Protocol = Generic[_T] #NNeeded for typing bug #572?
# Protocol = Generic[_T] #Needed for typing bug #572?
Protocol = ABC

def runtime_checkable(f):
Expand DownExpand Up@@ -359,7 +359,7 @@ def _list_traverse(self, as_edge: bool = False, *args: Any, **kwargs: Any
out: IterableList[Union['Commit', 'Submodule', 'Tree', 'Blob']] = IterableList(id)
out.extend(self.traverse(as_edge=as_edge, *args, **kwargs))
return out
# overloads in subclasses (mypydoes't allow typing self: subclass)
# overloads in subclasses (mypydoesn't allow typing self: subclass)
# Union[IterableList['Commit'], IterableList['Submodule'], IterableList[Union['Submodule', 'Tree', 'Blob']]]
else:
# Raise deprecationwarning, doesn't make sense to use this
Expand Down
2 changes: 1 addition & 1 deletiongit/refs/symbolic.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -298,7 +298,7 @@ def set_reference(self, ref: Union[Commit_ish, 'SymbolicReference', str],
logmsg: Union[str, None] = None) -> 'SymbolicReference':
"""Set ourselves to the given ref. It will stay a symbol if the ref is a Reference.
Otherwise an Object, given as Object instance or refspec, is assumed and if valid,
will be set which effectively detaches therefererence if it was a purely
will be set which effectively detaches thereference if it was a purely
symbolic one.

:param ref: SymbolicReference instance, Object instance or refspec string
Expand Down
4 changes: 2 additions & 2 deletionsgit/refs/tag.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@ class TagReference(Reference):
_common_path_default = Reference._common_path_default + "/" + _common_default

@property
def commit(self) -> 'Commit': # type: ignore[override] # LazyMixin has unrelatedcomit method
def commit(self) -> 'Commit': # type: ignore[override] # LazyMixin has unrelatedcommit method
""":return: Commit object the tag ref points to

:raise ValueError: if the tag points to a tree or blob"""
Expand DownExpand Up@@ -91,7 +91,7 @@ def create(cls: Type['TagReference'], repo: 'Repo', path: PathLike,

:param message:
Synonym for :param logmsg:
Included for backwardscompatability. :param logmsg is used in preference if both given.
Included for backwardscompatibility. :param logmsg is used in preference if both given.

:param force:
If True, to force creation of a tag even though that tag already exists.
Expand Down
4 changes: 2 additions & 2 deletionsgit/repo/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -711,7 +711,7 @@ def is_dirty(self, index: bool = True, working_tree: bool = True, untracked_file
index or the working copy have changes."""
if self._bare:
# Bare repositories with no associated working directory are
# alwaysconsired to be clean.
# alwaysconsidered to be clean.
return False

# start from the one which is fastest to evaluate
Expand DownExpand Up@@ -760,7 +760,7 @@ def _get_untracked_files(self, *args: Any, **kwargs: Any) -> List[str]:
untracked_files=True,
as_process=True,
**kwargs)
# Untracked filespreffix in porcelain mode
# Untracked filesprefix in porcelain mode
prefix = "?? "
untracked_files = []
for line in proc.stdout:
Expand Down
2 changes: 1 addition & 1 deletiongit/repo/fun.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -266,7 +266,7 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']:
# END handle tag
elif token == '@':
# try single int
assert ref is not None, "Requre Reference to access reflog"
assert ref is not None, "Require Reference to access reflog"
revlog_index = None
try:
# transform reversed index into the format of our revlog
Expand Down
2 changes: 1 addition & 1 deletiongit/types.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@

def assert_never(inp: NoReturn, raise_error: bool = True, exc: Union[Exception, None] = None) -> None:
"""For use in exhaustive checking of literal or Enum in if/else chain.
Should only be reached if allmemebers not handled OR attempt to pass non-members through chain.
Should only be reached if allmembers not handled OR attempt to pass non-members through chain.

If all members handled, type is Empty. Otherwise, will cause mypy error.
If non-members given, should cause mypy error at variable creation.
Expand Down
2 changes: 1 addition & 1 deletionpyproject.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
python_files = 'test_*.py'
testpaths = 'test' # spaceseperated list of paths from root e.g test tests doc/testing
testpaths = 'test' # spaceseparated list of paths from root e.g test tests doc/testing
addopts = '--cov=git --cov-report=term --maxfail=10 --force-sugar --disable-warnings'
filterwarnings = 'ignore::DeprecationWarning'
# --cov coverage
Expand Down
2 changes: 1 addition & 1 deletiontest/fixtures/diff_p
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -397,7 +397,7 @@ index 1d5251d40fb65ac89184ec662a3e1b04d0c24861..98eeddda5ed2b0e215e21128112393bd
self.git_dir = git_dir
end

- #Converstion hash from Ruby style options to git command line
- #Conversion hash from Ruby style options to git command line
- # style options
- TRANSFORM = {:max_count => "--max-count=",
- :skip => "--skip=",
Expand Down
2 changes: 1 addition & 1 deletiontest/fixtures/git_config
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@
[branch "mainline_performance"]
remote = mainline
merge = refs/heads/master
# section with value defined before include to beoverriden
# section with value defined before include to beoverridden
[sec]
var0 = value0_main
[include]
Expand Down
2 changes: 1 addition & 1 deletiontest/fixtures/rev_list_bisect_all
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,7 @@ committer David Aguilar <davvid@gmail.com> 1220418344 -0700
commit: handle --bisect-all output in Commit.list_from_string

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

http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027
Expand Down
2 changes: 1 addition & 1 deletiontest/test_config.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,7 +175,7 @@ def test_base(self):
assert num_sections and num_options
assert r_config._is_initialized is True

# get value whichdoesnt exist, with default
# get value whichdoesn't exist, with default
default = "my default value"
assert r_config.get_value("doesnt", "exist", default) == default

Expand Down
2 changes: 1 addition & 1 deletiontest/test_diff.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -273,7 +273,7 @@ def test_diff_unsafe_paths(self):
self.assertEqual(res[13].b_path, 'b/"with even more quotes"')

def test_diff_patch_format(self):
# test all of the 'old' format diffs forcompletness - it should at least
# test all of the 'old' format diffs forcompleteness - it should at least
# be able to deal with it
fixtures = ("diff_2", "diff_2f", "diff_f", "diff_i", "diff_mode_only",
"diff_new_mode", "diff_numstat", "diff_p", "diff_rename",
Expand Down
2 changes: 1 addition & 1 deletiontest/test_docs.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -135,7 +135,7 @@ def update(self, op_code, cur_count, max_count=None, message=''):
for fetch_info in origin.fetch(progress=MyProgressPrinter()):
print("Updated %s to %s" % (fetch_info.ref, fetch_info.commit))
# create a local branch at the latest fetched master. We specify the name statically, but you have all
# information to do itprogramatically as well.
# information to do itprogrammatically as well.
bare_master = bare_repo.create_head('master', origin.refs.master)
bare_repo.head.set_reference(bare_master)
assert not bare_repo.delete_remote(origin).exists()
Expand Down
2 changes: 1 addition & 1 deletiontest/test_git.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -159,7 +159,7 @@ def test_cmd_override(self):
prev_cmd = self.git.GIT_PYTHON_GIT_EXECUTABLE
exc = GitCommandNotFound
try:
# set it to something thatdoens't exist, assure it raises
# set it to something thatdoesn't exist, assure it raises
type(self.git).GIT_PYTHON_GIT_EXECUTABLE = osp.join(
"some", "path", "which", "doesn't", "exist", "gitbinary")
self.assertRaises(exc, self.git.version)
Expand Down
2 changes: 1 addition & 1 deletiontest/test_index.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -936,4 +936,4 @@ def test_commit_msg_hook_fail(self, rw_repo):
self.assertEqual(err.stderr, "\n stderr: 'stderr\n'")
assert str(err)
else:
raise AssertionError("Should havecought a HookExecutionError")
raise AssertionError("Should havecaught a HookExecutionError")
4 changes: 2 additions & 2 deletionstest/test_submodule.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -546,7 +546,7 @@ def test_root_module(self, rwrepo):
assert nsm.module().head.commit.hexsha == nsm.hexsha
nsm.module().index.add([nsm])
nsm.module().index.commit("added new file")
rm.update(recursive=False, dry_run=True, progress=prog) # would not change head, and thusdoens't fail
rm.update(recursive=False, dry_run=True, progress=prog) # would not change head, and thusdoesn't fail
# Everything we can do from now on will trigger the 'future' check, so no is_dirty() check will even run
# This would only run if our local branch is in the past and we have uncommitted changes

Expand DownExpand Up@@ -730,7 +730,7 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
assert parent.head.commit.tree[sm.path].binsha == sm.binsha
assert sm_too.binsha == sm.binsha, "cached submodule should point to the same commit as updated one"

added_bies = parent.index.add([sm]) #addded base-index-entries
added_bies = parent.index.add([sm]) #added base-index-entries
assert len(added_bies) == 1
parent.index.commit("add same submodule entry")
commit_sm = parent.head.commit.tree[sm.path]
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp