Skip to content

Conversation

SourceryAI
Copy link

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the main branch, then run:

git fetch https://github.com/sourcery-ai-bot/jupyterlab_autoversion main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment on lines -34 to 36
print(
"Installing jupyterlab_autoversion handler on path %s"
% url_path_join(base_url, "autoversion")
f'Installing jupyterlab_autoversion handler on path {url_path_join(base_url, "autoversion")}'
)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function load_jupyter_server_extension refactored with the following changes:

for line in fp:
if ".autoversion" in line:
add = False
add = all(".autoversion" not in line for line in fp)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function initialize refactored with the following changes:

return

if not id and path:
if not id:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function GitGetHandler.get refactored with the following changes:

return

if not id and path:
if not id:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function GitRestoreHandler.get refactored with the following changes:


m.web_app.settings = {}
m.web_app.settings["base_url"] = "/test"
m.web_app.settings = {"base_url": "/test"}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestExtension.test_load_jupyter_server_extension refactored with the following changes:

return ""
else:
return 0
return "" if name == "path" else 0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestExtension.test_git_restore refactored with the following changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant