Skip to content

Commit 5895fe1

Browse files
🚀🚀
1 parent cf5f577 commit 5895fe1

File tree

4 files changed

+42
-13
lines changed

4 files changed

+42
-13
lines changed

src/quo/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ def print(
139139
from quo.i_o.termui import confirm, echo
140140
from quo.shortcuts.utils import container
141141

142-
__version__ = "2022.5.3"
142+
__version__ = "2022.6"

src/quo/clipboard/pyperclip.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44

55
from .core import Clipboard, Data
66

7-
try:
8-
import pyperclip
7+
#try:
8+
# import pyperclip
99

10-
except ModuleNotFoundError:
11-
import os
12-
os.system("pip install -U pyperclip")
10+
#except ModuleNotFoundError:
11+
# import os
12+
# os.system("pip install -U pyperclip")
1313

14-
__all__ = [
14+
#__all__ = [
1515
"PyperclipClipboard",
16-
]
16+
#]
1717

18+
# We will be deprecating this in the later versions..
1819

1920
class PyperClipboard(Clipboard):
2021
"""
@@ -27,10 +28,10 @@ def __init__(self) -> None:
2728

2829
def set_data(self, data: Data) -> None:
2930
self._data = data
30-
pyperclip.copy(data.text)
31+
# pyperclip.copy(data.text)
3132

3233
def get_data(self) -> Data:
33-
text = pyperclip.paste()
34+
# text = pyperclip.paste()
3435

3536
# When the clipboard data is equal to what we copied last time, reuse
3637
# the `Data` instance. That way we're sure to keep the same

src/quo/console/console.py

+29-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,35 @@ async def _run_async2() -> _AppResult:
819819

820820
return await _run_async2()
821821

822+
def command(name:str=None, cls=None, **attrs):
823+
from quo.decorators.core import command as _command
824+
825+
return _command(name=name, cls=cls, **attrs)
826+
822827
@property
828+
def app(self, *param_decls, **attrs)->"Console":
829+
import inspect
830+
831+
from quo.core import App
832+
833+
def decorator(f):
834+
# Issue 926, copy attrs, so pre-defined options can re-use the same cls=
835+
836+
app_attrs = attrs.copy()
837+
838+
if "help" in app_attrs:
839+
app_attrs["help"] = inspect.cleandoc(app_attrs["help"])
840+
AppClass = app_attrs.pop("cls", App)
841+
_param_memo(f, AppClass(param_decls, **app_attrs))
842+
return f
843+
844+
return decorator
845+
# from quo.decorators.core import app as _app
846+
847+
# return _app(*param_decls, **attrs)
848+
849+
@property
850+
823851
def edit(
824852
text=None,
825853
editor=None,
@@ -837,7 +865,7 @@ def encoding(self) -> "Console":
837865
encode = sys.getdefaultencoding()
838866
print(encode)
839867

840-
def bell(self) -> _AppResult:
868+
def bell(instance:int=3) -> _AppResult:
841869
print("\a" * 3)
842870

843871
def launch(self, url, wait=False, locate=False) -> "Console":

src/quo/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1017,8 +1017,8 @@ def get_autohelp(self, clime):
10171017

10181018
def show_help(clime, param, value):
10191019
if value and not clime.parse:
1020+
from quo.layout.layout import Layout
10201021
from quo.layout import (
1021-
Layout,
10221022
Window,
10231023
FormattedTextControl,
10241024
HSplit,
@@ -1037,7 +1037,7 @@ def show_help(clime, param, value):
10371037
height=1,
10381038
),
10391039
Label(Text(f"<b>{clime.get_help()}</b>")),
1040-
Window(char="_", height=1),
1040+
Window(char="\u2501", height=1),
10411041
]
10421042
)
10431043
layout = Layout(root)

0 commit comments

Comments
 (0)