Skip to content

Commit

Permalink
fix docstring cross-references
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Doris committed Oct 31, 2023
1 parent 44ea567 commit 8495784
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/Py/_.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module _Py
const VERSION = v"0.9.15"
const ROOT_DIR = dirname(dirname(@__DIR__))

using ..PythonCall: PythonCall # needed for docstring cross-refs
using .._CPython: _CPython as C
using .._Utils: _Utils as Utils
using Base: @propagate_inbounds, @kwdef
Expand Down
4 changes: 2 additions & 2 deletions src/Py/builtins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@ The `dict` may either by a Python object or a Julia iterable. In the latter case
may either be a `name => value` pair or a Python object with a `__name__` attribute.
In order to use a Julia `Function` as an instance method, it must be wrapped into a Python
function with [`pyfunc`](@ref). Similarly, see also [`pyclassmethod`](@ref),
[`pystaticmethod`](@ref) or [`pyproperty`](@ref). In all these cases, the arguments passed
function with [`pyfunc`](@ref PythonCall.pyfunc). Similarly, see also [`pyclassmethod`](@ref PythonCall.pyclassmethod),
[`pystaticmethod`](@ref PythonCall.pystaticmethod) or [`pyproperty`](@ref PythonCall.pyproperty). In all these cases, the arguments passed
to the function always have type `Py`. See the example below.
# Example
Expand Down
1 change: 1 addition & 0 deletions src/compat/_.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Misc bits and bobs for compatibility.
"""
module _compat
using ..PythonCall: PythonCall # needed for docstring cross-refs
using .._Py
using .._Py: C, Utils, pynew, incref, getptr, pycopy!, pymodulehooks, pyisnull, pybytes_asvector, pysysmodule, pyosmodule, pystr_fromUTF8
using .._pyconvert: pyconvert, @pyconvert
Expand Down
2 changes: 1 addition & 1 deletion src/compat/gui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ end
Activate an event loop for the GUI framework `g`, so that the framework can run in the background of a Julia session.
The event loop runs every `interval` seconds. If `fix` is true and `g` is a Qt framework, then [`fix_qt_plugin_path`](@ref) is called.
The event loop runs every `interval` seconds. If `fix` is true and `g` is a Qt framework, then [`fix_qt_plugin_path`](@ref PythonCall.fix_qt_plugin_path) is called.
Supported values of `g` (and the Python module they relate to) are: `:pyqt4` (PyQt4), `:pyqt5` (PyQt5), `:pyside` (PySide), `:pyside2` (PySide2), `:gtk` (gtk), `:gtk3` (gi), `:wx` (wx), `:tkinter` (tkinter).
"""
Expand Down
6 changes: 3 additions & 3 deletions src/jlwrap/callback.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export pyfunc
Convert callable `f` to a Python class method.
If `f` is not a Python object (e.g. if `f` is a `Function`) then it is converted to one with
[`pyfunc`](@ref). In particular this means the arguments passed to `f` are always of type
[`pyfunc`](@ref PythonCall.pyfunc). In particular this means the arguments passed to `f` are always of type
`Py`. Keyword arguments are passed to `pyfunc`.
"""
pyclassmethod(f; kw...) = pybuiltins.classmethod(ispy(f) ? f : pyfunc(f; kw...))
Expand All @@ -113,7 +113,7 @@ export pyclassmethod
Convert callable `f` to a Python static method.
If `f` is not a Python object (e.g. if `f` is a `Function`) then it is converted to one with
[`pyfunc`](@ref). In particular this means the arguments passed to `f` are always of type
[`pyfunc`](@ref PythonCall.pyfunc). In particular this means the arguments passed to `f` are always of type
`Py`. Any keyword arguments are passed to `pyfunc`.
"""
pystaticmethod(f; kw...) = pybuiltins.staticmethod(ispy(f) ? f : pyfunc(f; kw...))
Expand All @@ -126,7 +126,7 @@ export pystaticmethod
Create a Python `property` with the given getter, setter and deleter.
If `get`, `set` or `del` is not a Python object (e.g. if it is a `Function`) then it is
converted to one with [`pyfunc`](@ref). In particular this means the arguments passed to it
converted to one with [`pyfunc`](@ref PythonCall.pyfunc). In particular this means the arguments passed to it
are always of type `Py`.
"""
pyproperty(; get=nothing, set=nothing, del=nothing, doc=nothing) =
Expand Down

0 comments on commit 8495784

Please sign in to comment.