Skip to content

Commit

Permalink
Merge branch 'jupyterlab:master' into fix-issue-1088
Browse files Browse the repository at this point in the history
  • Loading branch information
basokant authored Feb 13, 2023
2 parents 27724da + c7e7363 commit a6d489e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0 # Replace by any tag/version: https://github.com/psf/black/tags
rev: 23.1.0 # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
2 changes: 0 additions & 2 deletions jupyterlab_git/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import subprocess
import traceback
from typing import Dict, List, Optional
from unittest.mock import NonCallableMock
from urllib.parse import unquote

import nbformat
Expand Down Expand Up @@ -1739,7 +1738,6 @@ def ensure_git_credential_cache_daemon(
return

if self._GIT_CREDENTIAL_CACHE_DAEMON_PROCESS is None or force:

if force and self._GIT_CREDENTIAL_CACHE_DAEMON_PROCESS:
self._GIT_CREDENTIAL_CACHE_DAEMON_PROCESS.terminate()

Expand Down
6 changes: 2 additions & 4 deletions jupyterlab_git/tests/test_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ def test_is_remote_branch(branch, expected):

@pytest.mark.asyncio
async def test_get_current_branch_success():

with patch("jupyterlab_git.git.execute") as mock_execute:
# Given
mock_execute.return_value = maybe_future((0, "feature-foo", ""))

# When
actual_response = await (
Git().get_current_branch(path=str(Path("/bin/test_curr_path")))
actual_response = await Git().get_current_branch(
path=str(Path("/bin/test_curr_path"))
)

# Then
Expand Down Expand Up @@ -269,7 +268,6 @@ async def test_checkout_branch_remoteref_failure():

@pytest.mark.asyncio
async def test_get_branch_reference_success():

with patch("jupyterlab_git.git.execute") as mock_execute:
# Given
actual_response = 0
Expand Down
1 change: 0 additions & 1 deletion jupyterlab_git/tests/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ async def test_changed_files_invalid_input():

@pytest.mark.asyncio
async def test_changed_files_single_commit():

with patch("jupyterlab_git.git.execute") as mock_execute:
# Given
mock_execute.return_value = maybe_future((0, "file1.ipynb\x00file2.py\x00", ""))
Expand Down
5 changes: 0 additions & 5 deletions jupyterlab_git/tests/test_pushpull.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ async def test_git_pull_with_auth_fail():

@pytest.mark.asyncio
async def test_git_pull_success():

with patch("os.environ", {"TEST": "test"}):
with patch("jupyterlab_git.git.execute") as mock_execute:
# Given
Expand All @@ -116,7 +115,6 @@ async def test_git_pull_success():

@pytest.mark.asyncio
async def test_git_pull_with_auth_success():

with patch("os.environ", {"TEST": "test"}):
with patch("jupyterlab_git.git.execute") as mock_execute_with_authentication:
# Given
Expand Down Expand Up @@ -287,7 +285,6 @@ async def test_git_push_fail():

@pytest.mark.asyncio
async def test_git_push_with_auth_fail():

with patch("os.environ", {"TEST": "test"}):
with patch("jupyterlab_git.git.execute") as mock_execute_with_authentication:
# Given
Expand Down Expand Up @@ -321,7 +318,6 @@ async def test_git_push_with_auth_fail():

@pytest.mark.asyncio
async def test_git_push_success():

with patch("os.environ", {"TEST": "test"}):
with patch("jupyterlab_git.git.execute") as mock_execute:
# Given
Expand All @@ -344,7 +340,6 @@ async def test_git_push_success():

@pytest.mark.asyncio
async def test_git_push_with_auth_success():

with patch("os.environ", {"TEST": "test"}):
with patch("jupyterlab_git.git.execute") as mock_execute_with_authentication:
# Given
Expand Down
3 changes: 2 additions & 1 deletion src/style/FileItemStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,6 @@ export const checkboxLabelContainerStyle = style({

export const checkboxLabelLastContainerStyle = style({
display: 'flex',
marginLeft: 'auto'
marginLeft: 'auto',
overflow: 'hidden'
});

0 comments on commit a6d489e

Please sign in to comment.