Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork965
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
82 commits Select commitHold shift + click to select a range
f83b056 Revise assert_never
EliahKagan01cc8e2 Fix unnecessarily long reference in Tree docstrings
EliahKagan6f3a20f Change how tree[subscript] is introduced
EliahKagan85889cd Refine how tree[subscript] is introduced
EliahKagan9e47083 Start adding docstrings to types in git.types
EliahKagan3bd8177 Document Tree_ish, Commit_ish, and related types
EliahKaganf3b9a69 Expand docs of classes representing Git objects
EliahKagan2af7640 Do a bit of tidying related to unused names
EliahKagan2aa053e Add docstrings to TypedDicts in git.types
EliahKagan15d50de Revise a couple new docstrings for clarity
EliahKagan7166703 Fix possible inaccuracy in Lit_config_levels docstring
EliahKagan1530fd2 Use phrases like "git object type" where applicable
EliahKagan2e02b09 Add docstrings to protocols in git.types
EliahKagan012d710 Move our PathLike below even TYPE_CHECKING imports
EliahKagana06f1fc Remove commented-out is_config_level function
EliahKaganc93e431 Expand git.compat docstring
EliahKagan29443ce Add a cationary note about Object vs. object
EliahKaganb6e3ad2 Don't bind unused _assertion_msg_format
EliahKaganb5d9198 Remove commented-out code
EliahKagan2212ac9 Fix Sphinx reference that rendered overly long
EliahKagan3c5ca52 Simplify _safer_popen_windows "if shell" logic
EliahKagan43b7f8a Annotate safer_popen broad enough for all platforms
EliahKagandc95a76 Fix mypy error with creationflags in subprocess module
EliahKagan4191f7d Refactor kill_after_timeout logic so mypy can check it
EliahKagan1ef3365 Factor communicate and watchdog logic to helper
EliahKagan4083dd8 Fix new mypy confusion about kill_after_timeout type
EliahKagan3aeef46 Fix how Diffable annotates expected repo attribute
EliahKaganf1cc1fe Fix how HEAD annotates inherited commit property
EliahKagane133018 Broaden cygpath parameter annotation
EliahKaganc34a466 Have Repo.__init__ convert epath to str first instead
EliahKagan4dfd480 Fix how Remote annotates dynamic config-backed url attribute
EliahKagane4fd2e3 Drop wrong variable annotations in BlobFilter.__call__
EliahKagan94344b4 Clarify CallableProgress vs. CallableRemoteProgress
EliahKagan8e8b87a Fix RootModule.update `ignore[override]` suppression
EliahKagan1cdec7a Fix wrong class name in git.objects.tag docstring
EliahKaganed6ead9 Correct and clarify Diffable.diff docstring
EliahKagan0e1df29 Start fixing diff and _process_diff_args type annotations
EliahKagan62c0823 Consolidate str and os.PathLike[str] (use GitPython's PathLike)
EliahKagan7204cc1 Further clarify Diffable.diff docstring
EliahKagan2f5e258 Annotate _process_diff_args without Diffable.Index
EliahKagan65863a2 Make NULL_TREE and Index precisely annotatable
EliahKaganc9952e1 Fix Sphinx references; give Diffable.Index a docstring
EliahKaganb8a25df Modify annotations to accommodate NULL_TREE
EliahKagane49327d Add refresh to top-level __all__
EliahKaganc8ad3a3 Deprecate public access to typing imports in git
EliahKagan3c8cbe9 Mention collections.abc for Sequence
EliahKagan87b314e Add INDEX and DiffConstants to git.__all__
EliahKagan9ed904c Adjust mypy options to work well with mypy 1.9.0
EliahKaganaeacb00 Colorize mypy output on CI for easier reading
EliahKagan84fc806 Remove some unneeded mypy suppressions
EliahKagan96ecc2e Drop deprecated mypy option
EliahKagan97d9b65 Apply intended suppression in Tree.traverse
EliahKaganad00c77 Spell self.Index as self.INDEX in IndexFile.diff
EliahKagan2decbe4 Test that redefined Diffable.Index should be compatible
EliahKagan88557bc Have git module use sys.platform to check for Windows
EliahKagan7204c13 Fix new mypy error in _read_win_env_flag
EliahKagan42e10c0 Fix new mypy error in is_cygwin_git
EliahKagan465ab56 Have test suite use sys.platform to check for Windows
EliahKaganad8190b Wrap docstrings and comments in _safer_popen_windows
EliahKaganb9d9e56 Further improve _safer_popen_windows doc
EliahKagan04a2753 Temporarily rename Commit_ish to Old_commit_ish
EliahKagan787f65c Define and document AnyGitObject and (new) Commit_ish
EliahKagan1fe4dc8 Define GitObjectTypeString and update Object to use it
EliahKagan7328a00 Start fixing annotations that used the old Commit_ish
EliahKagan191f4cf Fix some annotations in git.repo.fun
EliahKagand1ce940 Remove extra `parents` param in Commit.__init__ docstring
EliahKaganfe42ca7 Help tools know the type of a Commit's `parents`
EliahKagane66297a Keep the type of a Commit's `parents` from being too narrow
EliahKaganfe7f9f2 Fix remaining old Commit_ish annotations in git.repo.fun
EliahKaganab27827 Fix remaining old Commit_ish annotations in git.refs
EliahKaganb4b6e1e Fix IndexFile.commit `parent_commits` annotation
EliahKagan5b2869f Fix old Commit_ish annotations in git.remote
EliahKagan1541c62 Start on fixing Submodule parent_commit annotations
EliahKagan1f03e7f Fix other submodule.base parent_commit annotations
EliahKagane66b8f1 Fix old Commit_ish annotation in RootModule
EliahKagan93d19dc Remove the temporary Old_commit_ish type
EliahKaganebcfced Fix and deprecate Lit_commit_ish
EliahKaganb070e93 Make some broad mypy suppressions more specific
EliahKagan0b99041 Merge branch 'main' into doc-types
EliahKagan011cb0a Apply Ruff auto-fixes not included in merge
EliahKagan74f3c2e Help Ruff avoid a very long line
EliahKagan5778b7a Use LBYL for imports where EAFP is a mypy type error
EliahKaganFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
9 changes: 6 additions & 3 deletions.github/workflows/pythonpackage.yml
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
79 changes: 40 additions & 39 deletionsgit/__init__.py
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.