vim-eof-comment 0.4.2__py3-none-any.whl → 0.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ Argument parsing completion utilities for ``vim-eof-comment``.
5
5
 
6
6
  Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
7
7
  """
8
- __all__ = ["complete_parser"]
8
+ __all__ = ["complete_parser", "complete_validator"]
9
9
 
10
10
  from argparse import ArgumentParser
11
11
  from typing import List, NoReturn
@@ -1,8 +1,24 @@
1
1
  from argparse import ArgumentParser
2
2
  from typing import NoReturn
3
3
 
4
- __all__ = ['complete_parser']
4
+ __all__ = ['complete_parser', 'complete_validator']
5
5
 
6
+ def complete_validator(completion_candidate: list[str], current_input: str) -> bool:
7
+ """
8
+ Complete non-prefix substring matches.
9
+
10
+ Parameters
11
+ ----------
12
+ completion_candidate : List[str]
13
+ All the completion candidates.
14
+ current_input : str
15
+ The current input string.
16
+
17
+ Returns
18
+ -------
19
+ bool
20
+ Whether the current input fits the completion candidates pool.
21
+ """
6
22
  def complete_parser(parser: ArgumentParser, **kwargs) -> NoReturn:
7
23
  """
8
24
  Complete the script argument parser.
@@ -5,7 +5,13 @@ Per-filetype modeline comment class.
5
5
 
6
6
  Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
7
7
  """
8
- __all__ = ["Comments", "export_json", "import_json", "list_filetypes"]
8
+ __all__ = [
9
+ "Comments",
10
+ "export_json",
11
+ "generate_list_items",
12
+ "import_json",
13
+ "list_filetypes",
14
+ ]
9
15
 
10
16
  import json
11
17
  import os
@@ -22,7 +28,6 @@ from ..util import die
22
28
  COMMENT_STR: str = "vim: set ts={ts} sts={sts} sw={sw} {et} ai si sta:"
23
29
 
24
30
  _JSON_FILE: str = realpath("./vim_eof_comment/comments/filetypes.json")
25
-
26
31
  _BLUE: int = Fore.BLUE
27
32
  _YELLOW: int = Fore.YELLOW
28
33
  _CYAN: int = Fore.CYAN
@@ -88,6 +93,7 @@ class Comments():
88
93
  __is_available(lang)
89
94
  __fill_langs(langs)
90
95
  get_defaults()
96
+ get_ft()
91
97
  """
92
98
 
93
99
  __DEFAULT: Dict[str, IndentMap] = _DEFAULT.copy()
@@ -2,7 +2,7 @@ from typing import Iterator, NoReturn
2
2
 
3
3
  from ..types import IndentMap
4
4
 
5
- __all__ = ['Comments', 'export_json', 'import_json', 'list_filetypes']
5
+ __all__ = ['Comments', 'export_json', 'generate_list_items', 'import_json', 'list_filetypes']
6
6
 
7
7
  def import_json() -> tuple[dict[str, str], dict[str, IndentMap]]:
8
8
  """
@@ -41,6 +41,7 @@ class Comments:
41
41
  __is_available(lang)
42
42
  __fill_langs(langs)
43
43
  get_defaults()
44
+ get_ft()
44
45
  """
45
46
  __DEFAULT: dict[str, IndentMap]
46
47
  __formats: dict[str, str]
@@ -113,6 +114,24 @@ class Comments:
113
114
  Either the file extension string, or if not available then ``None``.
114
115
  """
115
116
 
117
+ def generate_list_items(ft: str, level: int, expandtab: str) -> str:
118
+ '''
119
+ Generate a colored string for filetypes listing.
120
+
121
+ Parameters
122
+ ----------
123
+ ft : str
124
+ The filetype item in question.
125
+ level : int
126
+ Indent size.
127
+ expandtab : str
128
+ Either ``"Yes"`` or ``"No"``.
129
+
130
+ Returns
131
+ -------
132
+ str
133
+ The generated string.
134
+ '''
116
135
  def list_filetypes() -> NoReturn:
117
136
  """List all available filetypes."""
118
137
  def export_json() -> NoReturn:
vim_eof_comment/eof.py CHANGED
@@ -79,7 +79,7 @@ def eof_comment_search(
79
79
  result[path] = EOFCommentSearch(
80
80
  state=IOWrapperBool(file=open(path, "r"), had_nwl=had_nwl),
81
81
  lang=ext,
82
- match=matches(last_line, verbose)
82
+ match=matches(last_line)
83
83
  )
84
84
  else:
85
85
  verbose_print(f"{_BRIGHT}{_GREEN}OK", verbose=verbose)
vim_eof_comment/regex.py CHANGED
@@ -7,11 +7,11 @@ Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
7
7
  """
8
8
  __all__ = ["matches"]
9
9
 
10
- from re import compile
11
- from typing import Tuple
10
+ from re import Pattern, compile
11
+ from typing import AnyStr, List
12
12
 
13
13
 
14
- def matches(s: str, verbose: bool = False) -> bool:
14
+ def matches(s: str) -> bool:
15
15
  """
16
16
  Check if given string matches any of the given patterns.
17
17
 
@@ -19,21 +19,18 @@ def matches(s: str, verbose: bool = False) -> bool:
19
19
  ----------
20
20
  s : str
21
21
  The string to be matched.
22
- verbose : bool, optional, default=False
23
- Enables verbose mode.
24
22
 
25
23
  Returns
26
24
  -------
27
25
  bool
28
26
  Whether the string matches the default regex.
29
27
  """
30
- pats: Tuple[str, str] = (
31
- "vim:([a-zA-Z]+(=[a-zA-Z0-9_]*)?:)+",
32
- "vim:\\sset(\\s[a-zA-Z]+(=[a-zA-Z0-9_]*)?)*\\s[a-zA-Z]+(=[a-zA-Z0-9_]*)?:"
33
- )
34
- for pattern in [compile(pat) for pat in pats]:
35
- match = pattern.search(s)
36
- if match is not None:
28
+ pats: List[Pattern[AnyStr]] = [
29
+ compile("vim:([a-zA-Z]+(=[a-zA-Z0-9_]*)?:)+"),
30
+ compile("vim:\\sset(\\s[a-zA-Z]+(=[a-zA-Z0-9_]*)?)*\\s[a-zA-Z]+(=[a-zA-Z0-9_]*)?:"),
31
+ ]
32
+ for pattern in pats:
33
+ if pattern.search(s) is not None:
37
34
  return True
38
35
 
39
36
  return False
vim_eof_comment/regex.pyi CHANGED
@@ -1,6 +1,6 @@
1
1
  __all__ = ['matches']
2
2
 
3
- def matches(s: str, verbose: bool = False) -> bool:
3
+ def matches(s: str) -> bool:
4
4
  """
5
5
  Check if given string matches any of the given patterns.
6
6
 
@@ -8,8 +8,6 @@ def matches(s: str, verbose: bool = False) -> bool:
8
8
  ----------
9
9
  s : str
10
10
  The string to be matched.
11
- verbose : bool, optional, default=False
12
- Enables verbose mode.
13
11
 
14
12
  Returns
15
13
  -------
vim_eof_comment/types.py CHANGED
@@ -15,13 +15,180 @@ __all__ = [
15
15
  "IndentMap",
16
16
  "LineBool",
17
17
  "ParserSpec",
18
+ "VersionInfo",
18
19
  ]
19
20
 
20
- from typing import Any, Dict, List, TextIO, TypedDict
21
+ from typing import Any, Dict, List, TextIO, Tuple, TypedDict
21
22
 
22
23
  import argcomplete
23
24
 
24
25
 
26
+ class VersionInfo():
27
+ """
28
+ A ``sys.version_info``-like object type.
29
+
30
+ Parameters
31
+ ----------
32
+ all_versions : List[Tuple[int, int, int]]
33
+ A list of three number tuples, containing (in order) the major, minor and patch
34
+ components.
35
+
36
+ Attributes
37
+ ----------
38
+ major : int
39
+ The major component of the version.
40
+ minor : int
41
+ The minor component of the version.
42
+ patch : int
43
+ The patch component of the version.
44
+ all_versions : List[Tuple[int, int, int]]
45
+ A list of tuples containing all the versions in the object instance.
46
+
47
+ Methods
48
+ -------
49
+ get_all_versions()
50
+ """
51
+
52
+ major: int
53
+ minor: int
54
+ patch: int
55
+ all_versions: List[Tuple[int, int, int]]
56
+
57
+ def __init__(self, all_versions: List[Tuple[int, int, int]]):
58
+ """
59
+ Initialize VersionInfo object.
60
+
61
+ Parameters
62
+ ----------
63
+ all_versions : List[Tuple[int, int, int]]
64
+ A list of tuples of three-integers, containing (in order) the major, minor and patch
65
+ components.
66
+ """
67
+ self.all_versions = all_versions.copy()
68
+
69
+ all_versions = all_versions.copy()[::-1]
70
+ self.major = all_versions[0][0]
71
+ self.minor = all_versions[0][1]
72
+ self.patch = all_versions[0][2]
73
+
74
+ def __str__(self) -> str:
75
+ """
76
+ Representate this object as a string.
77
+
78
+ This is what is returned when using ``str(VersionInfo(...))``.
79
+
80
+ Returns
81
+ -------
82
+ str
83
+ The string representation of the instance.
84
+
85
+ Examples
86
+ --------
87
+ Only one definition in constructor.
88
+
89
+ >>> from vim_eof_comment.version import VersionInfo
90
+ >>> print(str(VersionInfo([(0, 0, 1)])))
91
+ 0.0.1
92
+
93
+ Multiple definitions in constructor.
94
+
95
+ >>> from vim_eof_comment.version import VersionInfo
96
+ >>> print(str(VersionInfo([(0, 0, 1), (0, 0, 2)])))
97
+ 0.0.2
98
+ """
99
+ return f"{self.major}.{self.minor}.{self.patch}"
100
+
101
+ def __repr__(self) -> str:
102
+ """
103
+ Representate this object as a string.
104
+
105
+ This is what is returned when using ``print(VersionInfo(...))``.
106
+
107
+ Returns
108
+ -------
109
+ str
110
+ The string representation of the instance.
111
+
112
+ Examples
113
+ --------
114
+ Only one definition in constructor.
115
+
116
+ >>> from vim_eof_comment.version import VersionInfo
117
+ >>> print(repr(VersionInfo([(0, 0, 1)])))
118
+ 0.0.1
119
+
120
+ Multiple definitions in constructor.
121
+
122
+ >>> from vim_eof_comment.version import VersionInfo
123
+ >>> print(repr(VersionInfo([(0, 0, 1), (0, 0, 2)])))
124
+ 0.0.2
125
+ """
126
+ return self.__str__()
127
+
128
+ def __eq__(self, b) -> bool:
129
+ """
130
+ Check the equality between two ``VersionInfo`` instances.
131
+
132
+ Parameters
133
+ ----------
134
+ b : VersionInfo
135
+ The other instance to compare.
136
+
137
+ Returns
138
+ -------
139
+ bool
140
+ Whether they are equal or not.
141
+ """
142
+ if not isinstance(b, VersionInfo):
143
+ return False
144
+
145
+ b: VersionInfo = b
146
+ return self.major == b.major and self.minor == b.minor and self.patch == b.patch
147
+
148
+ def get_current_version(self) -> Tuple[int, int, int]:
149
+ """
150
+ Get a tuple representing the current version.
151
+
152
+ Returns
153
+ -------
154
+ major : int
155
+ Major component.
156
+ minor : int
157
+ Minor component.
158
+ patch : int
159
+ Patch component.
160
+ """
161
+ return (self.major, self. minor, self.patch)
162
+
163
+ def get_all_versions(self) -> str:
164
+ """
165
+ Retrieve all versions as a string.
166
+
167
+ Returns
168
+ -------
169
+ str
170
+ A string, containing the program versions, in ascending order.
171
+
172
+ Examples
173
+ --------
174
+ To generate a single string.
175
+ >>> from vim_eof_comment.version import VersionInfo
176
+ >>> print(VersionInfo([(0, 0, 1), (0, 0, 2), (0, 1, 0)]).get_all_versions())
177
+ 0.0.1
178
+ 0.0.2
179
+ 0.0.3 (latest)
180
+ """
181
+ result = ""
182
+ for i, info in enumerate(self.all_versions):
183
+ result += f"{info[0]}.{info[1]}.{info[2]}"
184
+ if i == len(self.all_versions) - 1:
185
+ result += " (latest)"
186
+ else:
187
+ result += "\n"
188
+
189
+ return result
190
+
191
+
25
192
  class ParserSpec(TypedDict):
26
193
  """
27
194
  Stores the spec for ``argparse`` operations in a constant value.
vim_eof_comment/types.pyi CHANGED
@@ -2,7 +2,142 @@ from typing import Any, TextIO, TypedDict
2
2
 
3
3
  import argcomplete
4
4
 
5
- __all__ = ['BatchPairDict', 'BatchPathDict', 'CommentMap', 'EOFCommentSearch', 'IOWrapperBool', 'IndentHandler', 'IndentMap', 'LineBool', 'ParserSpec']
5
+ __all__ = ['BatchPairDict', 'BatchPathDict', 'CommentMap', 'EOFCommentSearch', 'IOWrapperBool', 'IndentHandler', 'IndentMap', 'LineBool', 'ParserSpec', 'VersionInfo']
6
+
7
+ class VersionInfo:
8
+ """
9
+ A ``sys.version_info``-like object type.
10
+
11
+ Parameters
12
+ ----------
13
+ all_versions : List[Tuple[int, int, int]]
14
+ A list of three number tuples, containing (in order) the major, minor and patch
15
+ components.
16
+
17
+ Attributes
18
+ ----------
19
+ major : int
20
+ The major component of the version.
21
+ minor : int
22
+ The minor component of the version.
23
+ patch : int
24
+ The patch component of the version.
25
+ all_versions : List[Tuple[int, int, int]]
26
+ A list of tuples containing all the versions in the object instance.
27
+
28
+ Methods
29
+ -------
30
+ get_all_versions()
31
+ """
32
+ major: int
33
+ minor: int
34
+ patch: int
35
+ all_versions: list[tuple[int, int, int]]
36
+ def __init__(self, all_versions: list[tuple[int, int, int]]) -> None:
37
+ """
38
+ Initialize VersionInfo object.
39
+
40
+ Parameters
41
+ ----------
42
+ all_versions : List[Tuple[int, int, int]]
43
+ A list of tuples of three-integers, containing (in order) the major, minor and patch
44
+ components.
45
+ """
46
+ def __str__(self) -> str:
47
+ """
48
+ Representate this object as a string.
49
+
50
+ This is what is returned when using ``str(VersionInfo(...))``.
51
+
52
+ Returns
53
+ -------
54
+ str
55
+ The string representation of the instance.
56
+
57
+ Examples
58
+ --------
59
+ Only one definition in constructor.
60
+
61
+ >>> from vim_eof_comment.version import VersionInfo
62
+ >>> print(str(VersionInfo([(0, 0, 1)])))
63
+ 0.0.1
64
+
65
+ Multiple definitions in constructor.
66
+
67
+ >>> from vim_eof_comment.version import VersionInfo
68
+ >>> print(str(VersionInfo([(0, 0, 1), (0, 0, 2)])))
69
+ 0.0.2
70
+ """
71
+ def __repr__(self) -> str:
72
+ """
73
+ Representate this object as a string.
74
+
75
+ This is what is returned when using ``print(VersionInfo(...))``.
76
+
77
+ Returns
78
+ -------
79
+ str
80
+ The string representation of the instance.
81
+
82
+ Examples
83
+ --------
84
+ Only one definition in constructor.
85
+
86
+ >>> from vim_eof_comment.version import VersionInfo
87
+ >>> print(repr(VersionInfo([(0, 0, 1)])))
88
+ 0.0.1
89
+
90
+ Multiple definitions in constructor.
91
+
92
+ >>> from vim_eof_comment.version import VersionInfo
93
+ >>> print(repr(VersionInfo([(0, 0, 1), (0, 0, 2)])))
94
+ 0.0.2
95
+ """
96
+ def __eq__(self, b) -> bool:
97
+ """
98
+ Check the equality between two ``VersionInfo`` instances.
99
+
100
+ Parameters
101
+ ----------
102
+ b : VersionInfo
103
+ The other instance to compare.
104
+
105
+ Returns
106
+ -------
107
+ bool
108
+ Whether they are equal or not.
109
+ """
110
+ def get_current_version(self) -> tuple[int, int, int]:
111
+ """
112
+ Get a tuple representing the current version.
113
+
114
+ Returns
115
+ -------
116
+ major : int
117
+ Major component.
118
+ minor : int
119
+ Minor component.
120
+ patch : int
121
+ Patch component.
122
+ """
123
+ def get_all_versions(self) -> str:
124
+ """
125
+ Retrieve all versions as a string.
126
+
127
+ Returns
128
+ -------
129
+ str
130
+ A string, containing the program versions, in ascending order.
131
+
132
+ Examples
133
+ --------
134
+ To generate a single string.
135
+ >>> from vim_eof_comment.version import VersionInfo
136
+ >>> print(VersionInfo([(0, 0, 1), (0, 0, 2), (0, 1, 0)]).get_all_versions())
137
+ 0.0.1
138
+ 0.0.2
139
+ 0.0.3 (latest)
140
+ """
6
141
 
7
142
  class ParserSpec(TypedDict):
8
143
  """
@@ -7,162 +7,11 @@ Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
7
7
  """
8
8
  __all__ = ["VersionInfo", "list_versions", "version_info", "version_print", "__version__"]
9
9
 
10
- from typing import List, NoReturn, Tuple
10
+ from typing import NoReturn
11
11
 
12
+ from .types import VersionInfo
12
13
  from .util import die
13
14
 
14
-
15
- class VersionInfo():
16
- """
17
- A ``sys.version_info``-like object type.
18
-
19
- Parameters
20
- ----------
21
- all_versions : List[Tuple[int, int, int]]
22
- A list of three number tuples, containing (in order) the major, minor and patch
23
- components.
24
-
25
- Attributes
26
- ----------
27
- major : int
28
- The major component of the version.
29
- minor : int
30
- The minor component of the version.
31
- patch : int
32
- The patch component of the version.
33
- all_versions : List[Tuple[int, int, int]]
34
- A list of tuples containing all the versions in the object instance.
35
-
36
- Methods
37
- -------
38
- get_all_versions()
39
- """
40
-
41
- major: int
42
- minor: int
43
- patch: int
44
- all_versions: List[Tuple[int, int, int]]
45
-
46
- def __init__(self, all_versions: List[Tuple[int, int, int]]):
47
- """
48
- Initialize VersionInfo object.
49
-
50
- Parameters
51
- ----------
52
- all_versions : List[Tuple[int, int, int]]
53
- A list of tuples of three-integers, containing (in order) the major, minor and patch
54
- components.
55
- """
56
- self.all_versions = all_versions.copy()
57
-
58
- all_versions = all_versions.copy()[::-1]
59
- self.major = all_versions[0][0]
60
- self.minor = all_versions[0][1]
61
- self.patch = all_versions[0][2]
62
-
63
- def __str__(self) -> str:
64
- """
65
- Representate this object as a string.
66
-
67
- This is what is returned when using ``str(VersionInfo(...))``.
68
-
69
- Returns
70
- -------
71
- str
72
- The string representation of the instance.
73
-
74
- Examples
75
- --------
76
- Only one definition in constructor.
77
-
78
- >>> from vim_eof_comment.version import VersionInfo
79
- >>> print(str(VersionInfo([(0, 0, 1)])))
80
- 0.0.1
81
-
82
- Multiple definitions in constructor.
83
-
84
- >>> from vim_eof_comment.version import VersionInfo
85
- >>> print(str(VersionInfo([(0, 0, 1), (0, 0, 2)])))
86
- 0.0.2
87
- """
88
- return f"{self.major}.{self.minor}.{self.patch}"
89
-
90
- def __repr__(self) -> str:
91
- """
92
- Representate this object as a string.
93
-
94
- This is what is returned when using ``print(VersionInfo(...))``.
95
-
96
- Returns
97
- -------
98
- str
99
- The string representation of the instance.
100
-
101
- Examples
102
- --------
103
- Only one definition in constructor.
104
-
105
- >>> from vim_eof_comment.version import VersionInfo
106
- >>> print(repr(VersionInfo([(0, 0, 1)])))
107
- 0.0.1
108
-
109
- Multiple definitions in constructor.
110
-
111
- >>> from vim_eof_comment.version import VersionInfo
112
- >>> print(repr(VersionInfo([(0, 0, 1), (0, 0, 2)])))
113
- 0.0.2
114
- """
115
- return self.__str__()
116
-
117
- def __eq__(self, b) -> bool:
118
- """
119
- Check the equality between two ``VersionInfo`` instances.
120
-
121
- Parameters
122
- ----------
123
- b : VersionInfo
124
- The other instance to compare.
125
-
126
- Returns
127
- -------
128
- bool
129
- Whether they are equal or not.
130
- """
131
- if not isinstance(b, VersionInfo):
132
- return False
133
-
134
- b: VersionInfo = b
135
- return self.major == b.major and self.minor == b.minor and self.patch == b.patch
136
-
137
- def get_all_versions(self) -> str:
138
- r"""
139
- Retrieve all versions as a string.
140
-
141
- Returns
142
- -------
143
- str
144
- A string, containing the program versions, in ascending order.
145
-
146
- Examples
147
- --------
148
- To generate a single string.
149
- >>> from vim_eof_comment.version import VersionInfo
150
- >>> print(VersionInfo([(0, 0, 1), (0, 0, 2), (0, 1, 0)]).get_all_versions())
151
- 0.0.1
152
- 0.0.2
153
- 0.0.3 (latest)
154
- """
155
- result = ""
156
- for i, info in enumerate(self.all_versions):
157
- result += f"{info[0]}.{info[1]}.{info[2]}"
158
- if i == len(self.all_versions) - 1:
159
- result += " (latest)"
160
- else:
161
- result += "\n"
162
-
163
- return result
164
-
165
-
166
15
  version_info = VersionInfo([
167
16
  (0, 1, 1),
168
17
  (0, 1, 2),
@@ -231,6 +80,8 @@ version_info = VersionInfo([
231
80
  (0, 4, 0),
232
81
  (0, 4, 1),
233
82
  (0, 4, 2),
83
+ (0, 5, 0),
84
+ (0, 5, 1),
234
85
  ])
235
86
 
236
87
  __version__: str = str(version_info)
@@ -2,129 +2,9 @@ from typing import NoReturn
2
2
 
3
3
  from _typeshed import Incomplete
4
4
 
5
- __all__ = ['VersionInfo', 'list_versions', 'version_info', 'version_print', '__version__']
6
-
7
- class VersionInfo:
8
- """
9
- A ``sys.version_info``-like object type.
10
-
11
- Parameters
12
- ----------
13
- all_versions : List[Tuple[int, int, int]]
14
- A list of three number tuples, containing (in order) the major, minor and patch
15
- components.
16
-
17
- Attributes
18
- ----------
19
- major : int
20
- The major component of the version.
21
- minor : int
22
- The minor component of the version.
23
- patch : int
24
- The patch component of the version.
25
- all_versions : List[Tuple[int, int, int]]
26
- A list of tuples containing all the versions in the object instance.
27
-
28
- Methods
29
- -------
30
- get_all_versions()
31
- """
32
- major: int
33
- minor: int
34
- patch: int
35
- all_versions: list[tuple[int, int, int]]
36
- def __init__(self, all_versions: list[tuple[int, int, int]]) -> None:
37
- """
38
- Initialize VersionInfo object.
39
-
40
- Parameters
41
- ----------
42
- all_versions : List[Tuple[int, int, int]]
43
- A list of tuples of three-integers, containing (in order) the major, minor and patch
44
- components.
45
- """
46
- def __str__(self) -> str:
47
- """
48
- Representate this object as a string.
49
-
50
- This is what is returned when using ``str(VersionInfo(...))``.
51
-
52
- Returns
53
- -------
54
- str
55
- The string representation of the instance.
56
-
57
- Examples
58
- --------
59
- Only one definition in constructor.
5
+ from .types import VersionInfo as VersionInfo
60
6
 
61
- >>> from vim_eof_comment.version import VersionInfo
62
- >>> print(str(VersionInfo([(0, 0, 1)])))
63
- 0.0.1
64
-
65
- Multiple definitions in constructor.
66
-
67
- >>> from vim_eof_comment.version import VersionInfo
68
- >>> print(str(VersionInfo([(0, 0, 1), (0, 0, 2)])))
69
- 0.0.2
70
- """
71
- def __repr__(self) -> str:
72
- """
73
- Representate this object as a string.
74
-
75
- This is what is returned when using ``print(VersionInfo(...))``.
76
-
77
- Returns
78
- -------
79
- str
80
- The string representation of the instance.
81
-
82
- Examples
83
- --------
84
- Only one definition in constructor.
85
-
86
- >>> from vim_eof_comment.version import VersionInfo
87
- >>> print(repr(VersionInfo([(0, 0, 1)])))
88
- 0.0.1
89
-
90
- Multiple definitions in constructor.
91
-
92
- >>> from vim_eof_comment.version import VersionInfo
93
- >>> print(repr(VersionInfo([(0, 0, 1), (0, 0, 2)])))
94
- 0.0.2
95
- """
96
- def __eq__(self, b) -> bool:
97
- """
98
- Check the equality between two ``VersionInfo`` instances.
99
-
100
- Parameters
101
- ----------
102
- b : VersionInfo
103
- The other instance to compare.
104
-
105
- Returns
106
- -------
107
- bool
108
- Whether they are equal or not.
109
- """
110
- def get_all_versions(self) -> str:
111
- """
112
- Retrieve all versions as a string.
113
-
114
- Returns
115
- -------
116
- str
117
- A string, containing the program versions, in ascending order.
118
-
119
- Examples
120
- --------
121
- To generate a single string.
122
- >>> from vim_eof_comment.version import VersionInfo
123
- >>> print(VersionInfo([(0, 0, 1), (0, 0, 2), (0, 1, 0)]).get_all_versions())
124
- 0.0.1
125
- 0.0.2
126
- 0.0.3 (latest)
127
- """
7
+ __all__ = ['VersionInfo', 'list_versions', 'version_info', 'version_print', '__version__']
128
8
 
129
9
  version_info: Incomplete
130
10
  __version__: str
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vim-eof-comment
3
- Version: 0.4.2
3
+ Version: 0.5.1
4
4
  Summary: Adds Vim EOF modeline comments for given filetypes in given directories
5
5
  Author-email: Guennadi Maximov C <g.maxc.fox@protonmail.com>
6
6
  Maintainer-email: Guennadi Maximov C <g.maxc.fox@protonmail.com>
7
7
  License-Expression: GPL-2.0-only
8
8
  Project-URL: Download, https://github.com/DrKJeff16/vim-eof-comment/releases/latest
9
+ Project-URL: Funding, https://github.com/sponsors/DrKJeff16
9
10
  Project-URL: Issues, https://github.com/DrKJeff16/vim-eof-comment/issues
10
11
  Project-URL: Repository, https://github.com/DrKJeff16/vim-eof-comment
11
12
  Keywords: eof comments,eof,files,preprocessing,text,vim modeline,vim,vim-eof
@@ -20,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.10
20
21
  Classifier: Programming Language :: Python :: 3.11
21
22
  Classifier: Programming Language :: Python :: 3.12
22
23
  Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
23
25
  Classifier: Programming Language :: Python
24
26
  Classifier: Topic :: Text Processing :: Filters
25
27
  Classifier: Topic :: Utilities
@@ -7,33 +7,33 @@ docs/source/installation.rst,sha256=PkiS3E_ujNTWeKXicZ7aBPch2l1R0TsRRL6pFj_oMJI,
7
7
  vim_eof_comment/__init__.py,sha256=ESbmhca9mTst3TYMer8zFw73IRsJvn5EESci_RpfLbQ,487
8
8
  vim_eof_comment/__init__.pyi,sha256=Eh8FQwE_F9TrQEiT7CR1mdGHBT6fHUzfV6VP8uSN33g,478
9
9
  vim_eof_comment/__main__.py,sha256=0AFVSkz8RuxSuPbJJWycyxs6u5Yypl8FKUMR3ZVLJbk,343
10
- vim_eof_comment/eof.py,sha256=3iCP_fL3aUrPndKve3DoSpikZSvyIR0kwaE46EAlJqA,5158
10
+ vim_eof_comment/eof.py,sha256=572bhiE8fjKFMNCKRMDimsYw_UReUzlCl-8fJy2ETZw,5149
11
11
  vim_eof_comment/eof.pyi,sha256=BTw9brhrHBTX12fYuwfO8_D-Gyrf0387ErmgrcTdvh0,1786
12
12
  vim_eof_comment/file.py,sha256=HNtwUMteUeKldBcVJEjdxlHLWNDXPbgjswJ-9PKRlQA,5100
13
13
  vim_eof_comment/file.pyi,sha256=S02kb4Ta5kDXpC3fYAVboC89jSUzHv6AHoll5HMICUg,2265
14
14
  vim_eof_comment/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- vim_eof_comment/regex.py,sha256=rGfFIBMbfWlIxAScXqvgBlB-tMJBUxQwTVjEkoxDZ3o,1007
16
- vim_eof_comment/regex.pyi,sha256=LJt6HN9s0Vo1B5plpaYURVZ3okmtl5jnV6kKdn1KyqA,433
17
- vim_eof_comment/types.py,sha256=YTFbh0YWYKc8IVDmn45RrD0fP2jmUKA5v9GK1TSk6Jk,3807
18
- vim_eof_comment/types.pyi,sha256=hBRWM3D6t-v8z5u2XQyDXUZImDQT_3oPcA1fsLwmLho,3537
15
+ vim_eof_comment/regex.py,sha256=48oxUO3YDdM30U0qAsqyH_AycYCrcnaQ6cghy3NXHrw,903
16
+ vim_eof_comment/regex.pyi,sha256=W0ZX_J9mLRckCdBNE-Bl09hsQ61VFqjuLwDlevEeeUM,336
17
+ vim_eof_comment/types.py,sha256=YumpVIUl1wxbn_QIEkWeUbxsa9b9RJYdVEBzx-Kt4xo,8195
18
+ vim_eof_comment/types.pyi,sha256=r6QziOKE9nKaZ02TR1NZDWCtEcLtMCnsOqnDNXvXJfw,7083
19
19
  vim_eof_comment/util.py,sha256=MHLt-FJz4uhsa56J2sug74uqk6W3S0mVLugvz7KNRUU,4287
20
20
  vim_eof_comment/util.pyi,sha256=5RQukLgpVZTwbALhBOtd1NqFkiqC-V6JEWeT1_B9-2k,2675
21
- vim_eof_comment/version.py,sha256=aFNpBVEBQbzfxw3Jq_zUJYJKT54gA9D-JVvjRJ8qYDY,5843
22
- vim_eof_comment/version.pyi,sha256=suF5VwVtpA0rVOuKpa6cvJ8TNocXgtJiI51DRrpzOTs,3692
21
+ vim_eof_comment/version.py,sha256=6mVWL-zWSneVLKmOEP1oeDzCZLnDPkRJzEAv_l5N6MQ,1898
22
+ vim_eof_comment/version.pyi,sha256=P90IRWMKlsG_YU8G8a1e1eyTd8rC-6fUGvQrD3zjwbE,525
23
23
  vim_eof_comment/args/__init__.py,sha256=Hyqun15456NVFLAJ3cpdtuNEz5XaFH93vfVlbC-aeuc,318
24
24
  vim_eof_comment/args/__init__.pyi,sha256=cXK7nEpYBveD4kxtVTe2x8oUxT9mhENS5r3wK3AAX2U,151
25
- vim_eof_comment/args/completion.py,sha256=ddK6xcpR6SpcGXH7m6m6h9DhB5QMoai324WVvtwwplw,1248
26
- vim_eof_comment/args/completion.pyi,sha256=svMFBL6vfiqctncHkOMwxzuufzV3y5VfGic3o71UU4o,455
25
+ vim_eof_comment/args/completion.py,sha256=xpfMKeo1-LBMeU-5icO1Jh5ixml55sK5ExHbi5sSXKg,1270
26
+ vim_eof_comment/args/completion.pyi,sha256=bEMpcLKYUZEGj3V9yiYifpLxfuNC69etdIf-gdsdtJc,891
27
27
  vim_eof_comment/args/parsing.py,sha256=Zp1u4--4t4lfQF8RZLhCFfE6Khlc5rcG7gHcPXaPthw,6605
28
28
  vim_eof_comment/args/parsing.pyi,sha256=wJMDnW_dtIlv8NfTvf_JyTB7qwk_ZwLvCizp3GkFWhw,1741
29
29
  vim_eof_comment/comments/__init__.py,sha256=KIFAbugEKa8arCASaf7pKNHdzUC99N_T18D1CfaCOQs,292
30
30
  vim_eof_comment/comments/__init__.pyi,sha256=cecbbrShh0If8btwJ8zKYpBt9dIsMwrDXbdaBQqwUus,104
31
31
  vim_eof_comment/comments/filetypes.json,sha256=JpSrnBNO2AivLYi-C5--8yVocyBwye3IkMesNIz1uHA,2973
32
- vim_eof_comment/comments/generator.py,sha256=tnFDM4X8KdH1zHSeceYiyskAGqfsR8yFJzOakesMa-E,7756
33
- vim_eof_comment/comments/generator.pyi,sha256=Nj33jwria5FWUuydUD_uZSH__PxSZ3yPxOPYF1_TIpM,3272
34
- vim_eof_comment-0.4.2.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
35
- vim_eof_comment-0.4.2.dist-info/METADATA,sha256=YJfEqi88QwH8ulUWHnVI8s0jXDwKZb0qWljE0B9E-xQ,2715
36
- vim_eof_comment-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- vim_eof_comment-0.4.2.dist-info/entry_points.txt,sha256=vm47g4hoUbow4elcHr9yylYfj6IvAs10wSFKqwqTu6E,61
38
- vim_eof_comment-0.4.2.dist-info/top_level.txt,sha256=TkaQ5vuhVzXaJnfUdcLJCQ81ILK2V6OtvX5-hIMZAc0,21
39
- vim_eof_comment-0.4.2.dist-info/RECORD,,
32
+ vim_eof_comment/comments/generator.py,sha256=yuRvTuVd6qQ1ei496w8NQ0c1MR1e3qJHf1pOTalXlv8,7814
33
+ vim_eof_comment/comments/generator.pyi,sha256=ue8oMa7yEoKfgQDJbeTzx0Qm5Wck2gHrDb_wF00xIyo,3687
34
+ vim_eof_comment-0.5.1.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
35
+ vim_eof_comment-0.5.1.dist-info/METADATA,sha256=0HnHqwxsYZeUHEalASKi4KJAE__t8SS13odWiMkPV9M,2826
36
+ vim_eof_comment-0.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ vim_eof_comment-0.5.1.dist-info/entry_points.txt,sha256=vm47g4hoUbow4elcHr9yylYfj6IvAs10wSFKqwqTu6E,61
38
+ vim_eof_comment-0.5.1.dist-info/top_level.txt,sha256=TkaQ5vuhVzXaJnfUdcLJCQ81ILK2V6OtvX5-hIMZAc0,21
39
+ vim_eof_comment-0.5.1.dist-info/RECORD,,