Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
lint: switch Black withruff-format
#1865
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
3 commits Select commitHold shift + click to select a range
File 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
2 changes: 0 additions & 2 deletions.github/workflows/lint.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -16,5 +16,3 @@ jobs: | ||
- uses: pre-commit/action@v3.0.1 | ||
with: | ||
extra_args: --all-files --hook-stage manual | ||
18 changes: 2 additions & 16 deletions.pre-commit-config.yaml
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
5 changes: 1 addition & 4 deletionsMakefile
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
3 changes: 0 additions & 3 deletionsREADME.md
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
72 changes: 29 additions & 43 deletionsgit/cmd.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -495,9 +495,8 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool: | ||
if mode in quiet: | ||
pass | ||
elif mode in warn or mode in error: | ||
err = dedent( | ||
"""\ | ||
%s | ||
All git commands will error until this is rectified. | ||
@@ -510,40 +509,35 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool: | ||
Example: | ||
export %s=%s | ||
""" | ||
) % ( | ||
err, | ||
cls._refresh_env_var, | ||
"|".join(quiet), | ||
"|".join(warn), | ||
"|".join(error), | ||
cls._refresh_env_var, | ||
quiet[0], | ||
) | ||
if mode in warn: | ||
_logger.critical(err) | ||
else: | ||
raise ImportError(err) | ||
else: | ||
err = dedent( | ||
"""\ | ||
%s environment variable has been set but it has been set with an invalid value. | ||
Use only the following values: | ||
- %s: for no message or exception | ||
- %s: for a warning message (logging level CRITICAL, displayed by default) | ||
- %s: for a raised exception | ||
""" | ||
) % ( | ||
cls._refresh_env_var, | ||
"|".join(quiet), | ||
"|".join(warn), | ||
"|".join(error), | ||
) | ||
raise ImportError(err) | ||
@@ -565,13 +559,11 @@ def is_cygwin(cls) -> bool: | ||
@overload | ||
@classmethod | ||
def polish_url(cls, url: str, is_cygwin: Literal[False] = ...) -> str: ... | ||
Borda marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
@overload | ||
@classmethod | ||
def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> str: ... | ||
@classmethod | ||
def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> PathLike: | ||
@@ -932,8 +924,7 @@ def execute( | ||
command: Union[str, Sequence[Any]], | ||
*, | ||
as_process: Literal[True], | ||
) -> "AutoInterrupt": ... | ||
@overload | ||
def execute( | ||
@@ -942,8 +933,7 @@ def execute( | ||
*, | ||
as_process: Literal[False] = False, | ||
stdout_as_string: Literal[True], | ||
) -> Union[str, Tuple[int, str, str]]: ... | ||
@overload | ||
def execute( | ||
@@ -952,8 +942,7 @@ def execute( | ||
*, | ||
as_process: Literal[False] = False, | ||
stdout_as_string: Literal[False] = False, | ||
) -> Union[bytes, Tuple[int, bytes, str]]: ... | ||
@overload | ||
def execute( | ||
@@ -963,8 +952,7 @@ def execute( | ||
with_extended_output: Literal[False], | ||
as_process: Literal[False], | ||
stdout_as_string: Literal[True], | ||
) -> str: ... | ||
@overload | ||
def execute( | ||
@@ -974,8 +962,7 @@ def execute( | ||
with_extended_output: Literal[False], | ||
as_process: Literal[False], | ||
stdout_as_string: Literal[False], | ||
) -> bytes: ... | ||
def execute( | ||
self, | ||
@@ -1387,8 +1374,9 @@ def __call__(self, **kwargs: Any) -> "Git": | ||
return self | ||
@overload | ||
def _call_process( | ||
self, method: str, *args: None, **kwargs: None | ||
) -> str: ... # If no args were given, execute the call with all defaults. | ||
@overload | ||
def _call_process( | ||
@@ -1398,14 +1386,12 @@ def _call_process( | ||
as_process: Literal[True], | ||
*args: Any, | ||
**kwargs: Any, | ||
) -> "Git.AutoInterrupt": ... | ||
@overload | ||
def _call_process( | ||
self, method: str, *args: Any, **kwargs: Any | ||
) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], "Git.AutoInterrupt"]: ... | ||
def _call_process( | ||
self, method: str, *args: Any, **kwargs: Any | ||
18 changes: 6 additions & 12 deletionsgit/compat.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
6 changes: 3 additions & 3 deletionsgit/index/fun.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
6 changes: 2 additions & 4 deletionsgit/objects/fun.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
2 changes: 1 addition & 1 deletiongit/objects/tree.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
12 changes: 4 additions & 8 deletionsgit/objects/util.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
11 changes: 4 additions & 7 deletionsgit/remote.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
9 changes: 3 additions & 6 deletionsgit/util.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.