Skip to content

Commit 4f65aff

Browse files
committed
autodoc: string -> str
1 parent b840d43 commit 4f65aff

File tree

6 files changed

+39
-39
lines changed

6 files changed

+39
-39
lines changed

bootstrap_env.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def which(exe=None, throw=True):
3434
:type exe: string
3535
:param throw: Raise ``Exception`` if not found in paths
3636
:type throw: bool
37-
:rtype: string
37+
:rtype: str
3838
3939
"""
4040
if exe:
@@ -132,5 +132,6 @@ def main():
132132
if os.path.exists(os.path.join(env_dir, 'build')):
133133
os.removedirs(os.path.join(env_dir, 'build'))
134134

135+
135136
if __name__ == '__main__':
136137
main()

libtmux/common.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ def set_environment(self, name, value):
4242
"""Set environment ``$ tmux set-environment <name> <value>``.
4343
4444
:param name: the environment variable name. such as 'PATH'.
45-
:type option: string
45+
:type option: str
4646
:param value: environment value.
47-
:type value: string
48-
47+
:type value: str
4948
"""
5049

5150
args = ['set-environment']
@@ -65,7 +64,7 @@ def unset_environment(self, name):
6564
"""Unset environment variable ``$ tmux set-environment -u <name>``.
6665
6766
:param name: the environment variable name. such as 'PATH'.
68-
:type option: string
67+
:type option: str
6968
"""
7069

7170
args = ['set-environment']
@@ -84,7 +83,7 @@ def remove_environment(self, name):
8483
"""Remove environment variable ``$ tmux set-environment -r <name>``.
8584
8685
:param name: the environment variable name. such as 'PATH'.
87-
:type option: string
86+
:type option: str
8887
"""
8988

9089
args = ['set-environment']
@@ -106,7 +105,7 @@ def show_environment(self, name=None):
106105
specific variable if the name is specified.
107106
108107
:param name: the environment variable name. such as 'PATH'.
109-
:type option: string
108+
:type option: str
110109
"""
111110
tmux_args = ['show-environment']
112111
if self._add_option:
@@ -341,7 +340,7 @@ def get_by_id(self, id):
341340
.. _.get(): http://backbonejs.org/#Collection-get
342341
343342
:param id:
344-
:type id: string
343+
:type id: str
345344
:rtype: object
346345
347346
"""
@@ -362,12 +361,12 @@ def which(exe=None, default_paths=[
362361
from salt.util - https://www.github.com/saltstack/salt - license apache
363362
364363
:param exe: Application to search PATHs for.
365-
:type exe: string
364+
:type exe: str
366365
:param default_path: Application to search PATHs for.
367366
:type default_path: list
368367
:param append_env_path: Append PATHs in environmental variables.
369368
:type append_env_path: bool
370-
:rtype: string
369+
:rtype: str
371370
372371
"""
373372
def _is_executable_file_or_link(exe):
@@ -440,7 +439,7 @@ def has_version(version):
440439
"""Return True if tmux version installed.
441440
442441
:param version: version, '1.8'
443-
:type version: string
442+
:type version: str
444443
:returns: True if version matches
445444
:rtype: bool
446445
"""
@@ -451,7 +450,7 @@ def has_gt_version(min_version):
451450
"""Return True if tmux version greater than minimum.
452451
453452
:param min_version: version, e.g. '1.8'
454-
:type min_version: string
453+
:type min_version: str
455454
:returns: True if version above min_version
456455
:rtype: bool
457456
"""
@@ -462,7 +461,7 @@ def has_gte_version(min_version):
462461
"""Return True if tmux version greater or equal to minimum.
463462
464463
:param min_version: version, e.g. '1.8'
465-
:type min_version: string
464+
:type min_version: str
466465
:returns: True if version above or equal to min_version
467466
:rtype: bool
468467
"""
@@ -473,7 +472,7 @@ def has_lte_version(max_version):
473472
"""Return True if tmux version less or equal to minimum.
474473
475474
:param max_version: version, e.g. '1.8'
476-
:type max_version: string
475+
:type max_version: str
477476
:returns: True if version below or equal to max_version
478477
:rtype: bool
479478
"""
@@ -484,7 +483,7 @@ def has_lt_version(max_version):
484483
"""Return True if tmux version less than minimum.
485484
486485
:param max_version: version, e.g. '1.8'
487-
:type max_version: string
486+
:type max_version: str
488487
:returns: True if version below max_version
489488
:rtype: bool
490489
"""
@@ -527,7 +526,7 @@ def session_check_name(session_name):
527526
These delimiters are reserved for noting session, window and pane.
528527
529528
:param session_name: name of session
530-
:type session_name: string
529+
:type session_name: str
531530
:returns: void
532531
:raises: :exc:`exc.BadSessionName`
533532
"""

libtmux/pane.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def split_window(self, attach=False, vertical=True, start_directory=None):
113113
:rtype: :class:`Pane`.
114114
:param start_directory: specifies the working directory in which the
115115
new pane is created.
116-
:type start_directory: string
116+
:type start_directory: str
117117
118118
"""
119119
return self.window.split_window(
@@ -145,7 +145,7 @@ def resize_pane(self, *args, **kwargs):
145145
"""``$ tmux resize-pane`` of pane and return ``self``.
146146
147147
:param target_pane: ``target_pane``, or ``-U``,``-D``, ``-L``, ``-R``.
148-
:type target_pane: string
148+
:type target_pane: str
149149
:rtype: :class:`Pane`
150150
151151
"""

libtmux/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def new_session(self,
417417
418418
$ tmux new-session -s <session_name>
419419
420-
:type session_name: string
420+
:type session_name: str
421421
422422
:param attach: create session in the foreground. ``attach=False`` is
423423
equivalent to::
@@ -432,7 +432,7 @@ def new_session(self,
432432
433433
:param start_directory: specifies the working directory in which the
434434
new session is created.
435-
:type start_directory: string
435+
:type start_directory: str
436436
437437
:raises: :exc:`exc.BadSessionName`
438438
:rtype: :class:`Session`

libtmux/session.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def rename_session(self, new_name):
106106
"""Rename session and return new :class:`Session` object.
107107
108108
:param new_name: new session name
109-
:type new_name: string
109+
:type new_name: str
110110
:raises: :exc:`exc.BadSessionName`
111111
:rtype: :class:`Session`
112112
@@ -136,22 +136,22 @@ def new_window(self,
136136
to be created and not set to current, pass in ``attach=False``.
137137
138138
:param window_name: window name.
139-
:type window_name: string
139+
:type window_name: str
140140
:param start_directory: specifies the working directory in which the
141141
new window is created.
142-
:type start_directory: string
142+
:type start_directory: str
143143
:param attach: make new window the current window after creating it,
144144
default True.
145145
:param window_index: create the new window at the given index position.
146146
Default is empty string which will create the window in the next
147147
available position.
148-
:type window_index: string
148+
:type window_index: str
149149
:param window_shell: execute a command on starting the window. The
150150
window will close when the command exits.
151151
NOTE: When this command exits the window will close. This feature
152152
is useful for long-running processes where the closing of the
153153
window upon completion is desired.
154-
:type window_command: string
154+
:type window_command: str
155155
:param type: bool
156156
:rtype: :class:`Window`
157157
@@ -212,7 +212,7 @@ def kill_window(self, target_window=None):
212212
from any sessions to which it is linked.
213213
214214
:param target_window: the ``target window``.
215-
:type target_window: string
215+
:type target_window: str
216216
217217
"""
218218

@@ -322,7 +322,7 @@ def set_option(self, option, value, g=False):
322322
todo: needs tests
323323
324324
:param option: the window option. such as 'default-shell'.
325-
:type option: string
325+
:type option: str
326326
:param value: window value. True/False will turn in 'on' and 'off'. You
327327
can also enter 'on' or 'off' directly.
328328
:type value: bool
@@ -359,7 +359,7 @@ def show_options(self, option=None, g=False):
359359
a single option, forwarding to :meth:`Session.show_option`.
360360
361361
:param option: optional. show a single option.
362-
:type option: string
362+
:type option: str
363363
:param g: Pass ``-g`` flag for global variable (server-wide)
364364
:type g: bool
365365
:rtype: :py:obj:`dict`
@@ -395,10 +395,10 @@ def show_option(self, option, g=False):
395395
:todo: test and return True/False for on/off string
396396
397397
:param option: option to return.
398-
:type option: string
398+
:type option: str
399399
:param global: check for option globally across all servers (-g)
400400
:type global: bool
401-
:rtype: string, int or bool
401+
:rtype: str, int or bool
402402
:raises: :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
403403
:exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`
404404

libtmux/window.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def select_layout(self, layout=None):
115115
custom: custom dimensions (see :term:`tmux(1)` manpages).
116116
117117
:param layout: string of the layout, 'even-horizontal', 'tiled', etc.
118-
:type layout: string
118+
:type layout: str
119119
120120
"""
121121

@@ -164,7 +164,7 @@ def show_window_options(self, option=None, g=False):
164164
a single option, forwarding to :meth:`Window.show_window_option`.
165165
166166
:param option: optional. show a single option.
167-
:type option: string
167+
:type option: str
168168
:param g: Pass ``-g`` flag for global variable
169169
:type g: bool
170170
:rtype: :py:obj:`dict`
@@ -203,10 +203,10 @@ def show_window_option(self, option, g=False):
203203
todo: test and return True/False for on/off string
204204
205205
:param option: option to return.
206-
:type option: string
206+
:type option: str
207207
:param g: Pass ``-g`` flag, global.
208208
:type g: bool
209-
:rtype: string, int
209+
:rtype: str, int
210210
:raises: :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
211211
:exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`
212212
@@ -240,7 +240,7 @@ def rename_window(self, new_name):
240240
"""Return :class:`Window` object ``$ tmux rename-window <new_name>``.
241241
242242
:param new_name: name of the window
243-
:type new_name: string
243+
:type new_name: str
244244
245245
"""
246246

@@ -281,10 +281,10 @@ def move_window(self, destination="", session=None):
281281
282282
:param destination: the ``target window`` or index to move the window
283283
to, default: empty string
284-
:type destination: string
284+
:type destination: str
285285
:param session: the ``target session`` or index to move the
286286
window to, default: current session.
287-
:type session: string
287+
:type session: str
288288
289289
"""
290290
session = session or self.get('session_id')
@@ -317,7 +317,7 @@ def select_pane(self, target_pane):
317317
318318
:param target_pane: ``target_pane``, or ``-U``,``-D``, ``-L``, ``-R``
319319
or ``-l``.
320-
:type target_pane: string
320+
:type target_pane: str
321321
:rtype: :class:`Pane`
322322
323323
"""
@@ -368,7 +368,7 @@ def split_window(
368368
:type attach: bool
369369
:param start_directory: specifies the working directory in which the
370370
new window is created.
371-
:type start_directory: string
371+
:type start_directory: str
372372
:param target: ``target_pane`` to split.
373373
:type target: bool
374374
:param vertical: split vertically

0 commit comments

Comments
 (0)