File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -481,7 +481,7 @@ function Base.Docs.getdoc(x::Py, @nospecialize(sig))
481481 # docstring
482482 doc = pyimport (" inspect" ). getdoc (x)
483483 if ! pyisnone (doc)
484- push! (parts, Text ( pystr_asstring (doc)))
484+ push! (parts, Markdown . Code ( " text " , pystr_asstring (doc)))
485485 end
486486 return Markdown. MD (parts)
487487end
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ Equivalent to `hasattr(x, k)` in Python.
3333
3434Tests if `getattr(x, k)` raises an `AttributeError`.
3535"""
36- # pyhasattr(x, k) = errcheck(@autopy x k C.PyObject_HasAttr(getptr(x_), getptr(k_))) == 1
3736function pyhasattr (x, k)
3837 ptr = @autopy x k C. PyObject_GetAttr (getptr (x_), getptr (k_))
3938 if iserrset (ptr)
@@ -48,6 +47,7 @@ function pyhasattr(x, k)
4847 return true
4948 end
5049end
50+ # pyhasattr(x, k) = errcheck(@autopy x k C.PyObject_HasAttr(getptr(x_), getptr(k_))) == 1
5151export pyhasattr
5252
5353"""
You can’t perform that action at this time.
0 commit comments