-
-
Notifications
You must be signed in to change notification settings - Fork 938
Improve static typing and docstrings related to git object types #1859
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
f83b056
Revise assert_never
EliahKagan 01cc8e2
Fix unnecessarily long reference in Tree docstrings
EliahKagan 6f3a20f
Change how tree[subscript] is introduced
EliahKagan 85889cd
Refine how tree[subscript] is introduced
EliahKagan 9e47083
Start adding docstrings to types in git.types
EliahKagan 3bd8177
Document Tree_ish, Commit_ish, and related types
EliahKagan f3b9a69
Expand docs of classes representing Git objects
EliahKagan 2af7640
Do a bit of tidying related to unused names
EliahKagan 2aa053e
Add docstrings to TypedDicts in git.types
EliahKagan 15d50de
Revise a couple new docstrings for clarity
EliahKagan 7166703
Fix possible inaccuracy in Lit_config_levels docstring
EliahKagan 1530fd2
Use phrases like "git object type" where applicable
EliahKagan 2e02b09
Add docstrings to protocols in git.types
EliahKagan 012d710
Move our PathLike below even TYPE_CHECKING imports
EliahKagan a06f1fc
Remove commented-out is_config_level function
EliahKagan c93e431
Expand git.compat docstring
EliahKagan 29443ce
Add a cationary note about Object vs. object
EliahKagan b6e3ad2
Don't bind unused _assertion_msg_format
EliahKagan b5d9198
Remove commented-out code
EliahKagan 2212ac9
Fix Sphinx reference that rendered overly long
EliahKagan 3c5ca52
Simplify _safer_popen_windows "if shell" logic
EliahKagan 43b7f8a
Annotate safer_popen broad enough for all platforms
EliahKagan dc95a76
Fix mypy error with creationflags in subprocess module
EliahKagan 4191f7d
Refactor kill_after_timeout logic so mypy can check it
EliahKagan 1ef3365
Factor communicate and watchdog logic to helper
EliahKagan 4083dd8
Fix new mypy confusion about kill_after_timeout type
EliahKagan 3aeef46
Fix how Diffable annotates expected repo attribute
EliahKagan f1cc1fe
Fix how HEAD annotates inherited commit property
EliahKagan e133018
Broaden cygpath parameter annotation
EliahKagan c34a466
Have Repo.__init__ convert epath to str first instead
EliahKagan 4dfd480
Fix how Remote annotates dynamic config-backed url attribute
EliahKagan e4fd2e3
Drop wrong variable annotations in BlobFilter.__call__
EliahKagan 94344b4
Clarify CallableProgress vs. CallableRemoteProgress
EliahKagan 8e8b87a
Fix RootModule.update `ignore[override]` suppression
EliahKagan 1cdec7a
Fix wrong class name in git.objects.tag docstring
EliahKagan ed6ead9
Correct and clarify Diffable.diff docstring
EliahKagan 0e1df29
Start fixing diff and _process_diff_args type annotations
EliahKagan 62c0823
Consolidate str and os.PathLike[str] (use GitPython's PathLike)
EliahKagan 7204cc1
Further clarify Diffable.diff docstring
EliahKagan 2f5e258
Annotate _process_diff_args without Diffable.Index
EliahKagan 65863a2
Make NULL_TREE and Index precisely annotatable
EliahKagan c9952e1
Fix Sphinx references; give Diffable.Index a docstring
EliahKagan b8a25df
Modify annotations to accommodate NULL_TREE
EliahKagan e49327d
Add refresh to top-level __all__
EliahKagan c8ad3a3
Deprecate public access to typing imports in git
EliahKagan 3c8cbe9
Mention collections.abc for Sequence
EliahKagan 87b314e
Add INDEX and DiffConstants to git.__all__
EliahKagan 9ed904c
Adjust mypy options to work well with mypy 1.9.0
EliahKagan aeacb00
Colorize mypy output on CI for easier reading
EliahKagan 84fc806
Remove some unneeded mypy suppressions
EliahKagan 96ecc2e
Drop deprecated mypy option
EliahKagan 97d9b65
Apply intended suppression in Tree.traverse
EliahKagan ad00c77
Spell self.Index as self.INDEX in IndexFile.diff
EliahKagan 2decbe4
Test that redefined Diffable.Index should be compatible
EliahKagan 88557bc
Have git module use sys.platform to check for Windows
EliahKagan 7204c13
Fix new mypy error in _read_win_env_flag
EliahKagan 42e10c0
Fix new mypy error in is_cygwin_git
EliahKagan 465ab56
Have test suite use sys.platform to check for Windows
EliahKagan ad8190b
Wrap docstrings and comments in _safer_popen_windows
EliahKagan b9d9e56
Further improve _safer_popen_windows doc
EliahKagan 04a2753
Temporarily rename Commit_ish to Old_commit_ish
EliahKagan 787f65c
Define and document AnyGitObject and (new) Commit_ish
EliahKagan 1fe4dc8
Define GitObjectTypeString and update Object to use it
EliahKagan 7328a00
Start fixing annotations that used the old Commit_ish
EliahKagan 191f4cf
Fix some annotations in git.repo.fun
EliahKagan d1ce940
Remove extra `parents` param in Commit.__init__ docstring
EliahKagan fe42ca7
Help tools know the type of a Commit's `parents`
EliahKagan e66297a
Keep the type of a Commit's `parents` from being too narrow
EliahKagan fe7f9f2
Fix remaining old Commit_ish annotations in git.repo.fun
EliahKagan ab27827
Fix remaining old Commit_ish annotations in git.refs
EliahKagan b4b6e1e
Fix IndexFile.commit `parent_commits` annotation
EliahKagan 5b2869f
Fix old Commit_ish annotations in git.remote
EliahKagan 1541c62
Start on fixing Submodule parent_commit annotations
EliahKagan 1f03e7f
Fix other submodule.base parent_commit annotations
EliahKagan e66b8f1
Fix old Commit_ish annotation in RootModule
EliahKagan 93d19dc
Remove the temporary Old_commit_ish type
EliahKagan ebcfced
Fix and deprecate Lit_commit_ish
EliahKagan b070e93
Make some broad mypy suppressions more specific
EliahKagan 0b99041
Merge branch 'main' into doc-types
EliahKagan 011cb0a
Apply Ruff auto-fixes not included in merge
EliahKagan 74f3c2e
Help Ruff avoid a very long line
EliahKagan 5778b7a
Use LBYL for imports where EAFP is a mypy type error
EliahKagan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revise a couple new docstrings for clarity
- Loading branch information
commit 15d50dee206c6e834ad9bea53ab182de381d7d41
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.