Skip to content

Commit

Permalink
Beta 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Mar 13, 2021
1 parent 709dd04 commit b22c450
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__title__ = "mu-editor"
__description__ = "A simple Python editor for beginner programmers."

__version__ = "1.1.0.beta.1"
__version__ = "1.1.0.beta.2"

__license__ = "GPL3"
__url__ = "https://github.com/mu-editor/mu"
Expand Down
9 changes: 6 additions & 3 deletions mu/interface/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,9 @@ def replace_flag(self):


class PackageDialog(QDialog):
"""Display the output of the pip commands needed to remove or install packages
"""
Display the output of the pip commands needed to remove or install
packages.
Because the QProcess mechanism we're using is asynchronous, we have to
manage the pip requests via `pip_queue`. When one request is signalled
Expand Down Expand Up @@ -616,7 +618,9 @@ def setup(self, to_remove, to_add):
QTimer.singleShot(2, self.next_pip_command)

def next_pip_command(self):
"""Run the next pip command, finishing if there is none"""
"""
Run the next pip command, finishing if there is none.
"""
if self.pip_queue:
command, packages = self.pip_queue.pop()
self.run_pip(command, packages)
Expand All @@ -643,7 +647,6 @@ def run_pip(self, command, packages):
raise RuntimeError(
"Invalid pip command: %s %s" % (command, packages)
)

pip_fn(
packages,
slots=venv.Slots(
Expand Down
5 changes: 3 additions & 2 deletions mu/virtual_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ def __init__(self, pip_executable):
def run(
self, command, *args, wait_for_s=30.0, slots=Process.Slots(), **kwargs
):
"""Run a command with args, treating kwargs as Posix switches
"""
Run a command with args, treating kwargs as Posix switches.
eg run("python", version=True)
run("python", "-c", "import sys; print(sys.executable)")
Expand Down Expand Up @@ -217,7 +218,7 @@ def run(

def install(self, packages, slots=Process.Slots(), **kwargs):
"""
Use pip to install a package or packages
Use pip to install a package or packages.
If the first parameter is a string one package is installed; otherwise
it is assumed to be an iterable of package names.
Expand Down

0 comments on commit b22c450

Please sign in to comment.