Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-click-repl
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
python-click-repl
Commits
9d393628
Commit
9d393628
authored
3 years ago
by
Michal Arbet
Browse files
Options
Downloads
Patches
Plain Diff
New upstream version 0.2.0
parent
1a184198
Branches
Branches containing commit
Tags
upstream/0.2.0
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
PKG-INFO
+1
-1
1 addition, 1 deletion
PKG-INFO
README.rst
+10
-0
10 additions, 0 deletions
README.rst
click_repl.egg-info/PKG-INFO
+1
-1
1 addition, 1 deletion
click_repl.egg-info/PKG-INFO
click_repl/__init__.py
+15
-4
15 additions, 4 deletions
click_repl/__init__.py
with
27 additions
and
6 deletions
PKG-INFO
+
1
−
1
View file @
9d393628
Metadata-Version: 1.0
Name: click-repl
Version: 0.
1.6
Version: 0.
2.0
Summary: REPL plugin for Click
Home-page: https://github.com/untitaker/click-repl
Author: Markus Unterwaditzer
...
...
This diff is collapsed.
Click to expand it.
README.rst
+
10
−
0
View file @
9d393628
...
...
@@ -47,6 +47,16 @@ PyPI: `<https://pypi.python.org/pypi/click-repl>`_
.. _click: http://click.pocoo.org/
How to install
==============
Installation is done with pip:
$ pip install click-repl
Advanced Usage
==============
...
...
This diff is collapsed.
Click to expand it.
click_repl.egg-info/PKG-INFO
+
1
−
1
View file @
9d393628
Metadata-Version: 1.0
Name: click-repl
Version: 0.
1.6
Version: 0.
2.0
Summary: REPL plugin for Click
Home-page: https://github.com/untitaker/click-repl
Author: Markus Unterwaditzer
...
...
This diff is collapsed.
Click to expand it.
click_repl/__init__.py
+
15
−
4
View file @
9d393628
...
...
@@ -3,7 +3,6 @@ from prompt_toolkit.completion import Completer, Completion
from
prompt_toolkit.history
import
InMemoryHistory
from
prompt_toolkit.shortcuts
import
prompt
import
click
import
click._bashcomplete
import
click.parser
import
os
import
shlex
...
...
@@ -11,6 +10,14 @@ import sys
import
six
from
.exceptions
import
InternalCommandException
,
ExitReplException
# noqa
# Handle backwards compatibility between Click 7.0 and 8.0
try
:
import
click.shell_completion
HAS_C8
=
True
except
ImportError
:
import
click._bashcomplete
HAS_C8
=
False
# Handle click.exceptions.Exit introduced in Click 7.0
try
:
from
click.exceptions
import
Exit
as
ClickExit
...
...
@@ -26,7 +33,7 @@ else:
text_type
=
str
# noqa
__version__
=
"
0.
1.6
"
__version__
=
"
0.
2.0
"
_internal_commands
=
dict
()
...
...
@@ -107,8 +114,12 @@ class ClickCompleter(Completer):
# We've not entered anything, either at all or for the current
# command, so give all relevant completions for this context.
incomplete
=
""
ctx
=
click
.
_bashcomplete
.
resolve_ctx
(
self
.
cli
,
""
,
args
)
# Resolve context based on click version
if
HAS_C8
:
ctx
=
click
.
shell_completion
.
_resolve_context
(
self
.
cli
,
{},
""
,
args
)
else
:
ctx
=
click
.
_bashcomplete
.
resolve_ctx
(
self
.
cli
,
""
,
args
)
if
ctx
is
None
:
return
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment