Skip to content

Commit 7c348b9

Browse files
thomFichteFoll
authored andcommitted
Added version notes for new features.
1 parent a4dcc3f commit 7c348b9

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

st3/sublime_lib/encodings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ def from_sublime(name):
1212
1313
>>> from_sublime("Western (Windows 1252)")
1414
"cp1252"
15+
16+
.. versionchanged:: 1.3
17+
Raise :exc:`ValueError` if `name` is not a Sublime encoding.
1518
"""
1619

1720
try:
@@ -29,6 +32,9 @@ def to_sublime(name):
2932
3033
>>> to_sublime("cp1252")
3134
"Western (Windows 1252)"
35+
36+
.. versionchanged:: 1.3
37+
Raise :exc:`ValueError` if `name` is not a Python encoding.
3238
"""
3339
try:
3440
return STANDARD_TO_SUBLIME[lookup(name).name]

st3/sublime_lib/panel.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Panel():
1717
.. py:attribute:: panel_name
1818
1919
The name of the panel as it is listed in :meth:`sublime.Window.panels()`.
20+
21+
.. versionadded:: 1.3
2022
"""
2123

2224
def __init__(self, window, panel_name):
@@ -71,6 +73,9 @@ class OutputPanel(ViewStream, Panel):
7173
wrapping an output panel in the given `window` with the given `name`.
7274
7375
:raise ValueError: if `window` has no output panel called `name`.
76+
77+
.. versionchanged:: 1.3
78+
Now a subclass of :class:`Panel`.
7479
"""
7580
@classmethod
7681
def create(

st3/sublime_lib/resource_path.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class ResourcePath():
5454
Leading slashes are not matched literally.
5555
A pattern with a leading slash must match the entire path
5656
and not merely a suffix of the path.
57+
58+
.. versionadded:: 1.2
5759
"""
5860

5961
@classmethod
@@ -262,6 +264,8 @@ def relative_to(self, *other):
262264
`other` will be converted to a :class:`ResourcePath`.
263265
264266
:raise ValueError: if this path is not a descendant of `other`.
267+
268+
.. versionadded:: 1.3
265269
"""
266270
other_path = ResourcePath(*other)
267271
other_len = len(other_path.parts)
@@ -283,6 +287,8 @@ def with_name(self, name):
283287
def add_suffix(self, suffix):
284288
"""
285289
Return a new path with the suffix added.
290+
291+
.. versionadded:: 1.3
286292
"""
287293
return self.with_name(self.name + suffix)
288294

@@ -297,6 +303,8 @@ def remove_suffix(self, suffix=None, *, must_remove=True):
297303
298304
:raise ValueError: if `must_remove` is ``True`` (the default)
299305
and no suffix can be removed.
306+
307+
.. versionadded:: 1.3
300308
"""
301309
new_name = None
302310

@@ -436,6 +444,8 @@ def copy(self, target, exist_ok=True):
436444
:raise FileNotFoundError: if there is no resource at this path.
437445
:raise IsADirectoryError: if `target` is a directory.
438446
:raise FileExistsError: if `target` is a file and `exist_ok` is ``False``.
447+
448+
.. versionadded:: 1.3
439449
"""
440450
if exist_ok:
441451
mode = 'w'
@@ -458,6 +468,8 @@ def copytree(self, target, exist_ok=False):
458468
then existing files under `target` will be overwritten.
459469
460470
:raise FileExistsError: if `target` already exists and `exist_ok` is ``False``.
471+
472+
.. versionadded:: 1.3
461473
"""
462474
target = Path(target)
463475

st3/sublime_lib/show_selection_panel.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ def show_selection_panel(
6767
:raise ValueError: if `flags` cannot be converted
6868
to :class:`sublime_lib.flags.QuickPanelOption`.
6969
70-
.. versionadded:: 1.2
70+
.. versionadded:: 1.2
71+
72+
.. versionchanged:: 1.3
73+
`labels` can be a mixture of strings and string sequences of uneven length.
74+
75+
`flags` can be any value or values
76+
convertible to :class:`~sublime_lib.flags.QuickPanelOption`.
7177
"""
7278
if len(items) == 0:
7379
raise ValueError("The items parameter must contain at least one item.")

0 commit comments

Comments
 (0)