Skip to content

Commit ae7e851

Browse files
committed
Improve docs formatting
1 parent 7ee9905 commit ae7e851

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

docs/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tkfilebrowser 2.2.4
2828
tkfilebrowser 2.2.3
2929
-------------------
3030

31-
* Fix FileNotFoundError if initialdir does not exist
31+
* Fix :obj:`FileNotFoundError` if initialdir does not exist
3232
* Add Desktop in shortcuts (if found)
3333
* Improve filetype filtering
3434

@@ -60,7 +60,7 @@ tkfilebrowser 2.1.1
6060
tkfilebrowser 2.1.0
6161
-------------------
6262

63-
* Add compatibility with tkinter.filedialog keywords 'master' and 'defaultextension'
63+
* Add compatibility with :mod:`tkinter.filedialog` keywords 'master' and 'defaultextension'
6464
* Change look of filetype selector
6565
* Fix bugs when navigating without displaying hidden files
6666
* Fix color alternance bug when hiding hidden files

docs/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ the look is closer to GTK and the application uses GTK bookmarks (the
1414
one displayed in nautilus or thunar for instance). This filebrowser
1515
supports new directory creation and filtype filtering.
1616

17-
This module contains a general ``FileBrowser`` class which implements the
17+
This module contains a general :class:`~tkfilebrowser.FileBrowser` class which implements the
1818
filebrowser and the following functions, similar to the one in filedialog:
1919

20-
* ``askopenfilename`` that allow the selection of a single file
20+
* :func:`~tkfilebrowser.askopenfilename` that allow the selection of a single file
2121

22-
* ``askopenfilenames`` that allow the selection of multiple files
22+
* :func:`~tkfilebrowser.askopenfilenames` that allow the selection of multiple files
2323

24-
* ``askopendirname`` that allow the selection a single folder
24+
* :func:`~tkfilebrowser.askopendirname` that allow the selection a single folder
2525

26-
* ``askopendirnames`` that allow the selection of multiple folders
26+
* :func:`~tkfilebrowser.askopendirnames` that allow the selection of multiple folders
2727

28-
* ``asksaveasfilename`` that returns a single filename and give a warning if the file already exists
28+
* :func:`~tkfilebrowser.asksaveasfilename` that returns a single filename and give a warning if the file already exists
2929

3030
Project page: https://github.com/j4321/tkFileBrowser
3131

3232
.. toctree::
33-
:maxdepth: 4
33+
:maxdepth: 1
3434
:caption: Contents:
3535

3636
installation

tkfilebrowser/filebrowser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ def __init__(self, parent, initialdir="", initialfile="", mode="openfile",
9393
defaultext : str (e.g. '.png')
9494
extension added to filename if none is given (default is none)
9595
96-
filetypes : list ``[("name", "*.ext1|*.ext2|.."), ...]``
96+
filetypes : list :obj:`[("name", "*.ext1|*.ext2|.."), ...]`
9797
only the files of given filetype will be displayed,
9898
e.g. to allow the user to switch between displaying only PNG or JPG
9999
pictures or dispalying all files:
100-
``filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]``
100+
:obj:`filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]`
101101
102102
okbuttontext : str
103103
text displayed on the validate button, default is "Open".

tkfilebrowser/functions.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def askopendirname(parent=None, title=_("Open"), **kwargs):
2929
"""
30-
Return ``''`` or the absolute path of the chosen directory.
30+
Return :obj:`''` or the absolute path of the chosen directory.
3131
3232
Arguments:
3333
@@ -43,11 +43,11 @@ def askopendirname(parent=None, title=_("Open"), **kwargs):
4343
initialfile : str
4444
initially selected item (just the name, not the full path)
4545
46-
filetypes : list ``[("name", "*.ext1|*.ext2|.."), ...]``
46+
filetypes : list :obj:`[("name", "*.ext1|*.ext2|.."), ...]`
4747
only the files of given filetype will be displayed,
4848
e.g. to allow the user to switch between displaying only PNG or JPG
4949
pictures or dispalying all files:
50-
filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]
50+
:obj:`filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]`
5151
5252
okbuttontext : str
5353
text displayed on the validate button, default is "Open".
@@ -66,7 +66,7 @@ def askopendirname(parent=None, title=_("Open"), **kwargs):
6666

6767
def askopendirnames(parent=None, title=_("Open"), **kwargs):
6868
"""
69-
Return ``()`` or the tuple of the absolute paths of the chosen directories
69+
Return :obj:`()` or the tuple of the absolute paths of the chosen directories
7070
7171
Arguments:
7272
@@ -82,11 +82,11 @@ def askopendirnames(parent=None, title=_("Open"), **kwargs):
8282
initialfile : str
8383
initially selected item (just the name, not the full path)
8484
85-
filetypes : list ``[("name", "*.ext1|*.ext2|.."), ...]``
85+
filetypes : list :obj:`[("name", "*.ext1|*.ext2|.."), ...]`
8686
only the files of given filetype will be displayed,
8787
e.g. to allow the user to switch between displaying only PNG or JPG
8888
pictures or dispalying all files:
89-
``filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]``
89+
:obj:`filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]`
9090
9191
okbuttontext : str
9292
text displayed on the validate button, default is "Open".
@@ -108,7 +108,7 @@ def askopendirnames(parent=None, title=_("Open"), **kwargs):
108108

109109
def askopenfilename(parent=None, title=_("Open"), **kwargs):
110110
"""
111-
Return ``''`` or the absolute path of the chosen file
111+
Return :obj:`''` or the absolute path of the chosen file
112112
113113
Arguments:
114114
@@ -124,11 +124,11 @@ def askopenfilename(parent=None, title=_("Open"), **kwargs):
124124
initialfile : str
125125
initially selected item (just the name, not the full path)
126126
127-
filetypes : list ``[("name", "*.ext1|*.ext2|.."), ...]``
127+
filetypes : list :obj:`[("name", "*.ext1|*.ext2|.."), ...]`
128128
only the files of given filetype will be displayed,
129129
e.g. to allow the user to switch between displaying only PNG or JPG
130130
pictures or dispalying all files:
131-
``filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]``
131+
:obj:`filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]`
132132
133133
okbuttontext : str
134134
text displayed on the validate button, default is "Open".
@@ -147,7 +147,7 @@ def askopenfilename(parent=None, title=_("Open"), **kwargs):
147147

148148
def askopenfilenames(parent=None, title=_("Open"), **kwargs):
149149
"""
150-
Return ``()`` or the tuple of the absolute paths of the chosen files
150+
Return :obj:`()` or the tuple of the absolute paths of the chosen files
151151
152152
Arguments:
153153
@@ -163,11 +163,11 @@ def askopenfilenames(parent=None, title=_("Open"), **kwargs):
163163
initialfile : str
164164
initially selected item (just the name, not the full path)
165165
166-
filetypes : list ``[("name", "*.ext1|*.ext2|.."), ...]``
166+
filetypes : list :obj:`[("name", "*.ext1|*.ext2|.."), ...]`
167167
only the files of given filetype will be displayed,
168168
e.g. to allow the user to switch between displaying only PNG or JPG
169169
pictures or dispalying all files:
170-
``filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]``
170+
:obj:`filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]`
171171
172172
okbuttontext : str
173173
text displayed on the validate button, default is "Open".
@@ -189,7 +189,7 @@ def askopenfilenames(parent=None, title=_("Open"), **kwargs):
189189

190190
def asksaveasfilename(parent=None, title=_("Save As"), **kwargs):
191191
"""
192-
Return ``''`` or the chosen absolute path (the file might not exist)
192+
Return :obj:`''` or the chosen absolute path (the file might not exist)
193193
194194
Arguments:
195195
@@ -208,11 +208,11 @@ def asksaveasfilename(parent=None, title=_("Save As"), **kwargs):
208208
defaultext : str (e.g. '.png')
209209
extension added to filename if none is given (default is none)
210210
211-
filetypes : list ``[("name", "*.ext1|*.ext2|.."), ...]``
211+
filetypes : list :obj:`[("name", "*.ext1|*.ext2|.."), ...]`
212212
only the files of given filetype will be displayed,
213213
e.g. to allow the user to switch between displaying only PNG or JPG
214214
pictures or dispalying all files:
215-
``filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]``
215+
:obj:`filtypes=[("Pictures", "\*.png|\*.PNG|\*.jpg|\*.JPG'), ("All files", "\*")]`
216216
217217
okbuttontext : str
218218
text displayed on the validate button, default is "Open".

0 commit comments

Comments
 (0)