Skip to content

Commit

Permalink
Merge pull request xonsh#3975 from jnoortheen/fix-xonfig-wizard
Browse files Browse the repository at this point in the history
fix: xonfig wizard - make_xontrib
  • Loading branch information
scopatz authored Nov 12, 2020
2 parents 913077b + b01bf13 commit da13a95
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions news/fix-xonfig-wizard-make-xontrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* make_xontrib - typerror - https://github.com/xonsh/xonsh/issues/3971

**Security:**

* <news item>
3 changes: 2 additions & 1 deletion xonsh/xonfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ def _xontrib_path(visitor=None, node=None, val=None):
return ("xontribs", len(visitor.state.get("xontribs", ())))


def make_xontrib(name: str, xontrib: Xontrib):
def make_xontrib(xon_item: tp.Tuple[str, Xontrib]):
"""Makes a message and StoreNonEmpty node for a xontrib."""
name, xontrib = xon_item
name = name or "<unknown-xontrib-name>"
msg = "\n{BOLD_CYAN}" + name + "{RESET}\n"
if xontrib.url:
Expand Down

0 comments on commit da13a95

Please sign in to comment.