Skip to content

Commit 49acdd6

Browse files
authored
Update pre-commit (#1216)
* Update pre-commit * Blacken
1 parent 562fe28 commit 49acdd6

File tree

5 files changed

+3
-13
lines changed

5 files changed

+3
-13
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 22.3.0 # Replace by any tag/version: https://github.com/psf/black/tags
3+
rev: 23.1.0 # Replace by any tag/version: https://github.com/psf/black/tags
44
hooks:
55
- id: black
66
language_version: python3 # Should be a command that runs python3.6+

jupyterlab_git/git.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import subprocess
1111
import traceback
1212
from typing import Dict, List, Optional
13-
from unittest.mock import NonCallableMock
1413
from urllib.parse import unquote
1514

1615
import nbformat
@@ -1739,7 +1738,6 @@ def ensure_git_credential_cache_daemon(
17391738
return
17401739

17411740
if self._GIT_CREDENTIAL_CACHE_DAEMON_PROCESS is None or force:
1742-
17431741
if force and self._GIT_CREDENTIAL_CACHE_DAEMON_PROCESS:
17441742
self._GIT_CREDENTIAL_CACHE_DAEMON_PROCESS.terminate()
17451743

jupyterlab_git/tests/test_branch.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ def test_is_remote_branch(branch, expected):
2727

2828
@pytest.mark.asyncio
2929
async def test_get_current_branch_success():
30-
3130
with patch("jupyterlab_git.git.execute") as mock_execute:
3231
# Given
3332
mock_execute.return_value = maybe_future((0, "feature-foo", ""))
3433

3534
# When
36-
actual_response = await (
37-
Git().get_current_branch(path=str(Path("/bin/test_curr_path")))
35+
actual_response = await Git().get_current_branch(
36+
path=str(Path("/bin/test_curr_path"))
3837
)
3938

4039
# Then
@@ -269,7 +268,6 @@ async def test_checkout_branch_remoteref_failure():
269268

270269
@pytest.mark.asyncio
271270
async def test_get_branch_reference_success():
272-
273271
with patch("jupyterlab_git.git.execute") as mock_execute:
274272
# Given
275273
actual_response = 0

jupyterlab_git/tests/test_diff.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ async def test_changed_files_invalid_input():
2222

2323
@pytest.mark.asyncio
2424
async def test_changed_files_single_commit():
25-
2625
with patch("jupyterlab_git.git.execute") as mock_execute:
2726
# Given
2827
mock_execute.return_value = maybe_future((0, "file1.ipynb\x00file2.py\x00", ""))

jupyterlab_git/tests/test_pushpull.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ async def test_git_pull_with_auth_fail():
9595

9696
@pytest.mark.asyncio
9797
async def test_git_pull_success():
98-
9998
with patch("os.environ", {"TEST": "test"}):
10099
with patch("jupyterlab_git.git.execute") as mock_execute:
101100
# Given
@@ -116,7 +115,6 @@ async def test_git_pull_success():
116115

117116
@pytest.mark.asyncio
118117
async def test_git_pull_with_auth_success():
119-
120118
with patch("os.environ", {"TEST": "test"}):
121119
with patch("jupyterlab_git.git.execute") as mock_execute_with_authentication:
122120
# Given
@@ -287,7 +285,6 @@ async def test_git_push_fail():
287285

288286
@pytest.mark.asyncio
289287
async def test_git_push_with_auth_fail():
290-
291288
with patch("os.environ", {"TEST": "test"}):
292289
with patch("jupyterlab_git.git.execute") as mock_execute_with_authentication:
293290
# Given
@@ -321,7 +318,6 @@ async def test_git_push_with_auth_fail():
321318

322319
@pytest.mark.asyncio
323320
async def test_git_push_success():
324-
325321
with patch("os.environ", {"TEST": "test"}):
326322
with patch("jupyterlab_git.git.execute") as mock_execute:
327323
# Given
@@ -344,7 +340,6 @@ async def test_git_push_success():
344340

345341
@pytest.mark.asyncio
346342
async def test_git_push_with_auth_success():
347-
348343
with patch("os.environ", {"TEST": "test"}):
349344
with patch("jupyterlab_git.git.execute") as mock_execute_with_authentication:
350345
# Given

0 commit comments

Comments
 (0)