vim-eof-comment 0.6.1__py3-none-any.whl → 0.7.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.
- docs/source/conf.py +17 -17
- vim_eof_comment/__init__.py +5 -3
- vim_eof_comment/__init__.pyi +17 -6
- vim_eof_comment/__main__.py +2 -1
- vim_eof_comment/args/__init__.py +1 -0
- vim_eof_comment/args/__init__.pyi +1 -1
- vim_eof_comment/args/completion.py +2 -0
- vim_eof_comment/args/completion.pyi +2 -1
- vim_eof_comment/args/parsing.py +4 -2
- vim_eof_comment/args/parsing.pyi +7 -4
- vim_eof_comment/comments/__init__.py +1 -0
- vim_eof_comment/comments/__init__.pyi +1 -1
- vim_eof_comment/comments/filetypes.json +1 -1
- vim_eof_comment/comments/generator.py +11 -18
- vim_eof_comment/comments/generator.pyi +5 -21
- vim_eof_comment/file.py +2 -0
- vim_eof_comment/file.pyi +12 -1
- vim_eof_comment/{eof.py → main.py} +6 -9
- vim_eof_comment/{eof.pyi → main.pyi} +9 -3
- vim_eof_comment/regex.py +4 -2
- vim_eof_comment/regex.pyi +1 -1
- vim_eof_comment/types.py +4 -5
- vim_eof_comment/types.pyi +25 -2
- vim_eof_comment/util.py +3 -2
- vim_eof_comment/util.pyi +6 -3
- vim_eof_comment/version.py +82 -75
- vim_eof_comment/version.pyi +2 -1
- {vim_eof_comment-0.6.1.dist-info → vim_eof_comment-0.7.1.dist-info}/METADATA +1 -1
- vim_eof_comment-0.7.1.dist-info/RECORD +39 -0
- vim_eof_comment-0.7.1.dist-info/entry_points.txt +2 -0
- vim_eof_comment-0.6.1.dist-info/RECORD +0 -39
- vim_eof_comment-0.6.1.dist-info/entry_points.txt +0 -2
- {vim_eof_comment-0.6.1.dist-info → vim_eof_comment-0.7.1.dist-info}/WHEEL +0 -0
- {vim_eof_comment-0.6.1.dist-info → vim_eof_comment-0.7.1.dist-info}/licenses/LICENSE +0 -0
- {vim_eof_comment-0.6.1.dist-info → vim_eof_comment-0.7.1.dist-info}/top_level.txt +0 -0
docs/source/conf.py
CHANGED
|
@@ -8,35 +8,35 @@ import sys
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from typing import List
|
|
10
10
|
|
|
11
|
-
sys.path.insert(0, str(Path(
|
|
11
|
+
sys.path.insert(0, str(Path("..", "src").resolve()))
|
|
12
12
|
|
|
13
13
|
# -- Project information -----------------------------------------------------
|
|
14
14
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
15
15
|
|
|
16
|
-
project: str =
|
|
17
|
-
copyright: str =
|
|
18
|
-
author: str =
|
|
19
|
-
release: str =
|
|
16
|
+
project: str = "vim-eof-comment"
|
|
17
|
+
copyright: str = "2025, Guennadi Maximov C"
|
|
18
|
+
author: str = "Guennadi Maximov C"
|
|
19
|
+
release: str = "0.1.33"
|
|
20
20
|
|
|
21
21
|
# -- General configuration ---------------------------------------------------
|
|
22
22
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
23
23
|
|
|
24
24
|
extensions: List[str] = [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
"numpydoc",
|
|
26
|
+
"sphinx.ext.autodoc",
|
|
27
|
+
"sphinx.ext.autosectionlabel",
|
|
28
|
+
"sphinx.ext.autosummary",
|
|
29
|
+
"sphinx.ext.duration",
|
|
30
30
|
]
|
|
31
31
|
|
|
32
|
-
templates_path: List[str] = [
|
|
32
|
+
templates_path: List[str] = ["_templates"]
|
|
33
33
|
exclude_patterns: List[str] = []
|
|
34
34
|
|
|
35
35
|
# -- Options for HTML output -------------------------------------------------
|
|
36
36
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
37
37
|
|
|
38
|
-
html_theme: str =
|
|
39
|
-
html_static_path: List[str] = [
|
|
38
|
+
html_theme: str = "sphinx_rtd_theme"
|
|
39
|
+
html_static_path: List[str] = ["_static"]
|
|
40
40
|
|
|
41
41
|
# -- Options for numpydoc ----------------------------------------------------
|
|
42
42
|
numpydoc_xref_param_type = True
|
|
@@ -47,10 +47,10 @@ numpydoc_validation_checks = {
|
|
|
47
47
|
"SA01",
|
|
48
48
|
}
|
|
49
49
|
numpydoc_xref_aliases = {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
"TextIO": "typing.TextIO",
|
|
51
|
+
"List": "list",
|
|
52
|
+
"Dict": "dict",
|
|
53
|
+
"Tuple": "tuple",
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/__init__.py
CHANGED
|
@@ -5,11 +5,13 @@ Ensure EOF Vim comments.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = [
|
|
9
10
|
"__version__",
|
|
11
|
+
"append_eof_comment",
|
|
10
12
|
"args",
|
|
11
13
|
"comments",
|
|
12
|
-
"
|
|
14
|
+
"eof_comment_search",
|
|
13
15
|
"file",
|
|
14
16
|
"main",
|
|
15
17
|
"regex",
|
|
@@ -18,8 +20,8 @@ __all__ = [
|
|
|
18
20
|
"version",
|
|
19
21
|
]
|
|
20
22
|
|
|
21
|
-
from . import args, comments,
|
|
22
|
-
from .
|
|
23
|
+
from . import args, comments, file, regex, types, util, version
|
|
24
|
+
from .main import append_eof_comment, eof_comment_search, main
|
|
23
25
|
from .version import __version__
|
|
24
26
|
|
|
25
27
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/__init__.pyi
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
from . import args as args
|
|
2
2
|
from . import comments as comments
|
|
3
|
-
from . import eof as eof
|
|
4
3
|
from . import file as file
|
|
5
4
|
from . import regex as regex
|
|
6
5
|
from . import types as types
|
|
7
6
|
from . import util as util
|
|
8
|
-
from .
|
|
7
|
+
from . import version as version
|
|
8
|
+
from .main import append_eof_comment as append_eof_comment
|
|
9
|
+
from .main import eof_comment_search as eof_comment_search
|
|
10
|
+
from .main import main as main
|
|
9
11
|
from .version import __version__ as __version__
|
|
10
12
|
|
|
11
|
-
__all__ = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
__all__ = [
|
|
14
|
+
"__version__",
|
|
15
|
+
"append_eof_comment",
|
|
16
|
+
"args",
|
|
17
|
+
"comments",
|
|
18
|
+
"eof_comment_search",
|
|
19
|
+
"file",
|
|
20
|
+
"main",
|
|
21
|
+
"regex",
|
|
22
|
+
"types",
|
|
23
|
+
"util",
|
|
24
|
+
"version",
|
|
25
|
+
]
|
|
15
26
|
|
|
16
27
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/__main__.py
CHANGED
vim_eof_comment/args/__init__.py
CHANGED
|
@@ -5,6 +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
|
+
|
|
8
9
|
__all__ = ["complete_parser", "complete_validator"]
|
|
9
10
|
|
|
10
11
|
from argparse import ArgumentParser
|
|
@@ -45,4 +46,5 @@ def complete_parser(parser: ArgumentParser, **kwargs) -> None:
|
|
|
45
46
|
"""
|
|
46
47
|
autocomplete(parser, validator=complete_validator, **kwargs)
|
|
47
48
|
|
|
49
|
+
|
|
48
50
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from argparse import ArgumentParser
|
|
2
2
|
|
|
3
|
-
__all__ = [
|
|
3
|
+
__all__ = ["complete_parser", "complete_validator"]
|
|
4
4
|
|
|
5
5
|
def complete_validator(completion_candidate: list[str], current_input: str) -> bool:
|
|
6
6
|
"""
|
|
@@ -18,6 +18,7 @@ def complete_validator(completion_candidate: list[str], current_input: str) -> b
|
|
|
18
18
|
bool
|
|
19
19
|
Whether the current input fits the completion candidates pool.
|
|
20
20
|
"""
|
|
21
|
+
|
|
21
22
|
def complete_parser(parser: ArgumentParser, **kwargs) -> None:
|
|
22
23
|
"""
|
|
23
24
|
Complete the script argument parser.
|
vim_eof_comment/args/parsing.py
CHANGED
|
@@ -5,6 +5,7 @@ Argument parsing utilities for ``vim-eof-comment``.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = ["gen_parser_specs", "bootstrap_args", "arg_parser_init", "indent_handler"]
|
|
9
10
|
|
|
10
11
|
from argparse import ArgumentDefaultsHelpFormatter, ArgumentError, ArgumentParser, Namespace
|
|
@@ -90,7 +91,7 @@ def arg_parser_init(prog: str = "vim-eof-comment") -> Tuple[ArgumentParser, Name
|
|
|
90
91
|
exit_on_error=False,
|
|
91
92
|
formatter_class=ArgumentDefaultsHelpFormatter,
|
|
92
93
|
add_help=True,
|
|
93
|
-
allow_abbrev=True
|
|
94
|
+
allow_abbrev=True,
|
|
94
95
|
)
|
|
95
96
|
spec: List[ParserSpec] = gen_parser_specs(
|
|
96
97
|
{
|
|
@@ -168,7 +169,7 @@ def arg_parser_init(prog: str = "vim-eof-comment") -> Tuple[ArgumentParser, Name
|
|
|
168
169
|
"kwargs": {
|
|
169
170
|
"required": False,
|
|
170
171
|
"metavar": "EXT1[,EXT2[,EXT3[,...]]]",
|
|
171
|
-
"help":
|
|
172
|
+
"help": 'A comma-separated list of file extensions (e.g. "lua,c,cpp,cc,c++")',
|
|
172
173
|
"dest": "exts",
|
|
173
174
|
},
|
|
174
175
|
},
|
|
@@ -224,4 +225,5 @@ def indent_handler(indent: str) -> List[IndentHandler]:
|
|
|
224
225
|
|
|
225
226
|
return maps
|
|
226
227
|
|
|
228
|
+
|
|
227
229
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/args/parsing.pyi
CHANGED
|
@@ -2,7 +2,7 @@ from argparse import ArgumentParser, Namespace
|
|
|
2
2
|
|
|
3
3
|
from ..types import IndentHandler, ParserSpec
|
|
4
4
|
|
|
5
|
-
__all__ = [
|
|
5
|
+
__all__ = ["gen_parser_specs", "bootstrap_args", "arg_parser_init", "indent_handler"]
|
|
6
6
|
|
|
7
7
|
def gen_parser_specs(*specs) -> list[ParserSpec]:
|
|
8
8
|
"""
|
|
@@ -18,6 +18,7 @@ def gen_parser_specs(*specs) -> list[ParserSpec]:
|
|
|
18
18
|
List[ParserSpec]
|
|
19
19
|
The converted dictionaries inside a list.
|
|
20
20
|
"""
|
|
21
|
+
|
|
21
22
|
def bootstrap_args(parser: ArgumentParser, specs: list[ParserSpec]) -> Namespace:
|
|
22
23
|
"""
|
|
23
24
|
Bootstrap the program arguments.
|
|
@@ -34,8 +35,9 @@ def bootstrap_args(parser: ArgumentParser, specs: list[ParserSpec]) -> Namespace
|
|
|
34
35
|
argparse.Namespace
|
|
35
36
|
The generated ``argparse.Namespace`` object.
|
|
36
37
|
"""
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
def arg_parser_init(prog: str = "vim-eof-comment") -> tuple[ArgumentParser, Namespace]:
|
|
40
|
+
"""
|
|
39
41
|
Generate the argparse namespace.
|
|
40
42
|
|
|
41
43
|
Parameters
|
|
@@ -49,7 +51,8 @@ def arg_parser_init(prog: str = 'vim-eof-comment') -> tuple[ArgumentParser, Name
|
|
|
49
51
|
The generated ``argparse.ArgumentParser`` object.
|
|
50
52
|
namespace : argparse.Namespace
|
|
51
53
|
The generated ``argparse.Namespace`` object.
|
|
52
|
-
|
|
54
|
+
"""
|
|
55
|
+
|
|
53
56
|
def indent_handler(indent: str) -> list[IndentHandler]:
|
|
54
57
|
"""
|
|
55
58
|
Parse indent levels defined by the user.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{ "C": "/* {comment} */", "H": "/* {comment} */", "Makefile": "# {comment}", "bash": "# {comment}", "c": "/* {comment} */", "cc": "/* {comment} */", "cpp": "/* {comment} */", "css": "/* {comment} */", "fish": "# {comment}", "h": "/* {comment} */", "hh": "/* {comment} */", "hpp": "/* {comment} */", "htm": "<!-- {comment} -->", "html": "<!-- {comment} -->", "javascript": "/* {comment} */", "javascriptreact": "/* {comment} */", "js": "/* {comment} */", "jsx": "/* {comment} */", "latex": "% {comment}", "lua": "-- {comment}", "make": "# {comment}", "markdown": "<!-- {comment} -->", "md": "<!-- {comment} -->", "mk": "# {comment}", "py": "# {comment}", "pyi": "# {comment}", "python": "# {comment}", "rb": "# {comment}", "rs": "/* {comment} */", "ruby": "# {comment}", "rust": "/* {comment} */", "sh": "# {comment}", "tex": "% {comment}", "toml": "# {comment}", "ts": "/* {comment} */", "tsx": "/* {comment} */", "typescript": "/* {comment} */", "typescriptreact": "/* {comment} */", "xhtml": "<!-- {comment} -->", "xml": "<!-- {comment} -->", "yaml": "# {comment}", "yml": "# {comment}", "zsh": "# {comment}" }, { "C": {
|
|
1
|
+
[{ "C": "/* {comment} */", "H": "/* {comment} */", "Makefile": "# {comment}", "bash": "# {comment}", "c": "/* {comment} */", "c++": "/* {comment} */", "cc": "/* {comment} */", "coffee": "# {comment}", "cpp": "/* {comment} */", "cson": "# {comment}", "css": "/* {comment} */", "fish": "# {comment}", "h": "/* {comment} */", "hh": "/* {comment} */", "hpp": "/* {comment} */", "htm": "<!-- {comment} -->", "html": "<!-- {comment} -->", "javascript": "/* {comment} */", "javascriptreact": "/* {comment} */", "jl": "# {comment}", "js": "/* {comment} */", "jsonc": "/* {comment} */", "jsx": "/* {comment} */", "julia": "# {comment}", "latex": "% {comment}", "litcoffee": "# {comment}", "lua": "-- {comment}", "make": "# {comment}", "markdown": "<!-- {comment} -->", "md": "<!-- {comment} -->", "mk": "# {comment}", "py": "# {comment}", "pyi": "# {comment}", "python": "# {comment}", "rb": "# {comment}", "rs": "/* {comment} */", "ruby": "# {comment}", "rust": "/* {comment} */", "sh": "# {comment}", "tex": "% {comment}", "toml": "# {comment}", "ts": "/* {comment} */", "tsx": "/* {comment} */", "typescript": "/* {comment} */", "typescriptreact": "/* {comment} */", "xhtml": "<!-- {comment} -->", "xml": "<!-- {comment} -->", "yaml": "# {comment}", "yml": "# {comment}", "zsh": "# {comment}" }, { "C": {"level": 2, "expandtab": true}, "H": {"level": 2, "expandtab": true}, "Makefile": {"level": 4, "expandtab": false}, "bash": {"level": 4, "expandtab": true}, "c": {"level": 2, "expandtab": true}, "c++": {"level": 2, "expandtab": true}, "cc": {"level": 2, "expandtab": true}, "coffee": {"level": 4, "expandtab": true}, "cpp": {"level": 2, "expandtab": true}, "cson": {"level": 4, "expandtab": true}, "css": {"level": 4, "expandtab": true}, "fish": {"level": 4, "expandtab": true}, "h": {"level": 2, "expandtab": true}, "hh": {"level": 2, "expandtab": true}, "hpp": {"level": 2, "expandtab": true}, "htm": {"level": 2, "expandtab": true}, "html": {"level": 2, "expandtab": true}, "javascript": {"level": 4, "expandtab": true}, "javascriptreact": {"level": 4, "expandtab": true}, "jl": {"level": 4, "expandtab": true}, "js": {"level": 4, "expandtab": true}, "jsonc": {"level": 4, "expandtab": true}, "jsx": {"level": 4, "expandtab": true}, "julia": {"level": 4, "expandtab": true}, "latex": {"level": 2, "expandtab": true}, "litcoffee": {"level": 4, "expandtab": true}, "lua": {"level": 4, "expandtab": true}, "make": {"level": 4, "expandtab": false}, "markdown": {"level": 2, "expandtab": true}, "md": {"level": 2, "expandtab": true}, "mk": {"level": 4, "expandtab": false}, "py": {"level": 4, "expandtab": true}, "pyi": {"level": 4, "expandtab": true}, "python": {"level": 4, "expandtab": true}, "rb": {"level": 2, "expandtab": true}, "rs": {"level": 4, "expandtab": true}, "ruby": {"level": 2, "expandtab": true}, "rust": {"level": 4, "expandtab": true}, "sh": {"level": 4, "expandtab": true}, "tex": {"level": 2, "expandtab": true}, "toml": {"level": 4, "expandtab": true}, "ts": {"level": 4, "expandtab": true}, "tsx": {"level": 4, "expandtab": true}, "typescript": {"level": 4, "expandtab": true}, "typescriptreact": {"level": 4, "expandtab": true}, "xhtml": {"level": 2, "expandtab": true}, "xml": {"level": 2, "expandtab": true}, "yaml": {"level": 2, "expandtab": true}, "yml": {"level": 2, "expandtab": true}, "zsh": {"level": 4, "expandtab": true} }]
|
|
@@ -5,11 +5,10 @@ Per-filetype modeline comment class.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = [
|
|
9
10
|
"Comments",
|
|
10
|
-
"export_json",
|
|
11
11
|
"generate_list_items",
|
|
12
|
-
"import_json",
|
|
13
12
|
"list_filetypes",
|
|
14
13
|
]
|
|
15
14
|
|
|
@@ -17,7 +16,7 @@ import json
|
|
|
17
16
|
import os
|
|
18
17
|
from io import TextIOWrapper
|
|
19
18
|
from os.path import exists, isdir, realpath
|
|
20
|
-
from typing import Dict,
|
|
19
|
+
from typing import Dict, List, Tuple
|
|
21
20
|
|
|
22
21
|
from colorama import Fore, Style
|
|
23
22
|
from colorama import init as color_init
|
|
@@ -25,8 +24,7 @@ from colorama import init as color_init
|
|
|
25
24
|
from ..types import IndentMap
|
|
26
25
|
from ..util import die
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
_COMMENT_STR: str = "vim: set ts={ts} sts={sts} sw={sw} {et} ai si sta:"
|
|
30
28
|
_JSON_FILE: str = realpath("./vim_eof_comment/comments/filetypes.json")
|
|
31
29
|
_BLUE: int = Fore.BLUE
|
|
32
30
|
_YELLOW: int = Fore.YELLOW
|
|
@@ -60,15 +58,12 @@ def import_json() -> Tuple[Dict[str, str], Dict[str, IndentMap]]:
|
|
|
60
58
|
maps = result[1]
|
|
61
59
|
|
|
62
60
|
for k, v in comments.items():
|
|
63
|
-
comments[k] = v.format(comment=
|
|
61
|
+
comments[k] = v.format(comment=_COMMENT_STR)
|
|
64
62
|
|
|
65
63
|
return comments, maps
|
|
66
64
|
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class Comments():
|
|
66
|
+
class Comments:
|
|
72
67
|
"""
|
|
73
68
|
Vim EOF comments class.
|
|
74
69
|
|
|
@@ -96,8 +91,8 @@ class Comments():
|
|
|
96
91
|
get_ft()
|
|
97
92
|
"""
|
|
98
93
|
|
|
99
|
-
__DEFAULT: Dict[str, IndentMap]
|
|
100
|
-
__formats: Dict[str, str]
|
|
94
|
+
__DEFAULT: Dict[str, IndentMap]
|
|
95
|
+
__formats: Dict[str, str]
|
|
101
96
|
comments: Dict[str, str]
|
|
102
97
|
langs: Dict[str, IndentMap]
|
|
103
98
|
|
|
@@ -110,6 +105,8 @@ class Comments():
|
|
|
110
105
|
mappings : Dict[str, IndentMap], optional, default=None
|
|
111
106
|
The ``str`` to ``IndentMap`` dictionary.
|
|
112
107
|
"""
|
|
108
|
+
self.__formats, self.__DEFAULT = import_json()
|
|
109
|
+
|
|
113
110
|
if mappings is None or len(mappings) == 0:
|
|
114
111
|
self.langs = self.__DEFAULT.copy()
|
|
115
112
|
return
|
|
@@ -127,11 +124,6 @@ class Comments():
|
|
|
127
124
|
|
|
128
125
|
self.__fill_langs(langs)
|
|
129
126
|
|
|
130
|
-
def __iter__(self) -> Iterator[str]:
|
|
131
|
-
"""Iterate through comment langs."""
|
|
132
|
-
for k, v in self.langs.items():
|
|
133
|
-
yield (k, v)
|
|
134
|
-
|
|
135
127
|
def __is_available(self, lang: str) -> bool:
|
|
136
128
|
"""
|
|
137
129
|
Check if a given lang is available within the class.
|
|
@@ -268,7 +260,7 @@ def export_json() -> None:
|
|
|
268
260
|
return
|
|
269
261
|
|
|
270
262
|
try:
|
|
271
|
-
data: str = json.dumps((
|
|
263
|
+
data: str = json.dumps(import_json(), ensure_ascii=False)
|
|
272
264
|
except KeyboardInterrupt:
|
|
273
265
|
die(code=1)
|
|
274
266
|
except Exception:
|
|
@@ -285,4 +277,5 @@ def export_json() -> None:
|
|
|
285
277
|
|
|
286
278
|
file.close()
|
|
287
279
|
|
|
280
|
+
|
|
288
281
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
from typing import Iterator
|
|
2
|
-
|
|
3
1
|
from ..types import IndentMap
|
|
4
2
|
|
|
5
|
-
__all__ = [
|
|
6
|
-
|
|
7
|
-
def import_json() -> tuple[dict[str, str], dict[str, IndentMap]]:
|
|
8
|
-
"""
|
|
9
|
-
Import default vars from JSON file.
|
|
10
|
-
|
|
11
|
-
Returns
|
|
12
|
-
-------
|
|
13
|
-
comments : Dict[str, str]
|
|
14
|
-
The default ``Dict[str, str]``.
|
|
15
|
-
map_dict : Dict[str, IndentMap]
|
|
16
|
-
The default indent mappings dict.
|
|
17
|
-
"""
|
|
3
|
+
__all__ = ["Comments", "generate_list_items", "list_filetypes"]
|
|
18
4
|
|
|
19
5
|
class Comments:
|
|
20
6
|
"""
|
|
@@ -43,6 +29,7 @@ class Comments:
|
|
|
43
29
|
get_defaults()
|
|
44
30
|
get_ft()
|
|
45
31
|
"""
|
|
32
|
+
|
|
46
33
|
__DEFAULT: dict[str, IndentMap]
|
|
47
34
|
__formats: dict[str, str]
|
|
48
35
|
comments: dict[str, str]
|
|
@@ -56,8 +43,6 @@ class Comments:
|
|
|
56
43
|
mappings : Dict[str, IndentMap], optional, default=None
|
|
57
44
|
The ``str`` to ``IndentMap`` dictionary.
|
|
58
45
|
"""
|
|
59
|
-
def __iter__(self) -> Iterator[str]:
|
|
60
|
-
"""Iterate through comment langs."""
|
|
61
46
|
def __is_available(self, lang: str) -> bool:
|
|
62
47
|
"""
|
|
63
48
|
Check if a given lang is available within the class.
|
|
@@ -115,7 +100,7 @@ class Comments:
|
|
|
115
100
|
"""
|
|
116
101
|
|
|
117
102
|
def generate_list_items(ft: str, level: int, expandtab: str) -> str:
|
|
118
|
-
|
|
103
|
+
"""
|
|
119
104
|
Generate a colored string for filetypes listing.
|
|
120
105
|
|
|
121
106
|
Parameters
|
|
@@ -131,10 +116,9 @@ def generate_list_items(ft: str, level: int, expandtab: str) -> str:
|
|
|
131
116
|
-------
|
|
132
117
|
str
|
|
133
118
|
The generated string.
|
|
134
|
-
|
|
119
|
+
"""
|
|
120
|
+
|
|
135
121
|
def list_filetypes() -> None:
|
|
136
122
|
"""List all available filetypes."""
|
|
137
|
-
def export_json() -> None:
|
|
138
|
-
"""Export default vars to JSON."""
|
|
139
123
|
|
|
140
124
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/file.py
CHANGED
|
@@ -5,6 +5,7 @@ File management utilities.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = [
|
|
9
10
|
"EXCLUDED_DIRS",
|
|
10
11
|
"bootstrap_paths",
|
|
@@ -219,4 +220,5 @@ def get_last_line(file: TextIOWrapper) -> LineBool:
|
|
|
219
220
|
|
|
220
221
|
return LineBool(line=line, had_nwl=had_nwl, crlf=crlf)
|
|
221
222
|
|
|
223
|
+
|
|
222
224
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/file.pyi
CHANGED
|
@@ -2,7 +2,14 @@ from io import TextIOWrapper
|
|
|
2
2
|
|
|
3
3
|
from .types import BatchPairDict, BatchPathDict, LineBool
|
|
4
4
|
|
|
5
|
-
__all__ = [
|
|
5
|
+
__all__ = [
|
|
6
|
+
"EXCLUDED_DIRS",
|
|
7
|
+
"bootstrap_paths",
|
|
8
|
+
"get_last_line",
|
|
9
|
+
"modify_file",
|
|
10
|
+
"open_batch_paths",
|
|
11
|
+
"try_open",
|
|
12
|
+
]
|
|
6
13
|
|
|
7
14
|
EXCLUDED_DIRS: list[str]
|
|
8
15
|
|
|
@@ -20,6 +27,7 @@ def try_open(fpath: str) -> bool:
|
|
|
20
27
|
bool
|
|
21
28
|
Whether the file triggers a ``UnicodeDecodeError`` or not.
|
|
22
29
|
"""
|
|
30
|
+
|
|
23
31
|
def bootstrap_paths(paths: list[str], exts: list[str]) -> list[BatchPairDict]:
|
|
24
32
|
"""
|
|
25
33
|
Bootstrap all the matching paths in current dir and below.
|
|
@@ -36,6 +44,7 @@ def bootstrap_paths(paths: list[str], exts: list[str]) -> list[BatchPairDict]:
|
|
|
36
44
|
List[BatchPairDict]
|
|
37
45
|
A list of ``BatchPairDict`` type objects.
|
|
38
46
|
"""
|
|
47
|
+
|
|
39
48
|
def open_batch_paths(paths: list[BatchPairDict]) -> dict[str, BatchPathDict]:
|
|
40
49
|
"""
|
|
41
50
|
Return a list of TextIO objects given file path strings.
|
|
@@ -50,6 +59,7 @@ def open_batch_paths(paths: list[BatchPairDict]) -> dict[str, BatchPathDict]:
|
|
|
50
59
|
Dict[str, BatchPathDict]
|
|
51
60
|
A ``str`` to ``BatchPathDict``` dictionary.
|
|
52
61
|
"""
|
|
62
|
+
|
|
53
63
|
def modify_file(file: TextIOWrapper, comments: dict[str, str], ext: str, **kwargs) -> str:
|
|
54
64
|
"""
|
|
55
65
|
Modify a file containing a bad EOF comment.
|
|
@@ -70,6 +80,7 @@ def modify_file(file: TextIOWrapper, comments: dict[str, str], ext: str, **kwarg
|
|
|
70
80
|
str
|
|
71
81
|
The modified contents of the given file.
|
|
72
82
|
"""
|
|
83
|
+
|
|
73
84
|
def get_last_line(file: TextIOWrapper) -> LineBool:
|
|
74
85
|
"""
|
|
75
86
|
Return the last line of a file and indicates whether it already has a newline.
|
|
@@ -6,6 +6,7 @@ Ensure EOF Vim comment in specific filetypes.
|
|
|
6
6
|
|
|
7
7
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
__all__ = ["append_eof_comment", "eof_comment_search", "main"]
|
|
10
11
|
|
|
11
12
|
from io import TextIOWrapper
|
|
@@ -29,9 +30,7 @@ _RESET: int = Style.RESET_ALL
|
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
def eof_comment_search(
|
|
32
|
-
files: Dict[str, BatchPathDict],
|
|
33
|
-
comments: Comments,
|
|
34
|
-
**kwargs
|
|
33
|
+
files: Dict[str, BatchPathDict], comments: Comments, **kwargs
|
|
35
34
|
) -> Tuple[Dict[str, EOFCommentSearch], bool]:
|
|
36
35
|
"""
|
|
37
36
|
Search through opened files.
|
|
@@ -79,7 +78,7 @@ def eof_comment_search(
|
|
|
79
78
|
result[path] = EOFCommentSearch(
|
|
80
79
|
state=IOWrapperBool(file=open(path, "r"), had_nwl=had_nwl, crlf=crlf),
|
|
81
80
|
lang=ext,
|
|
82
|
-
match=matches(last_line)
|
|
81
|
+
match=matches(last_line),
|
|
83
82
|
)
|
|
84
83
|
else:
|
|
85
84
|
verbose_print(f"{_BRIGHT}{_GREEN}OK", verbose=verbose)
|
|
@@ -88,10 +87,7 @@ def eof_comment_search(
|
|
|
88
87
|
|
|
89
88
|
|
|
90
89
|
def append_eof_comment(
|
|
91
|
-
files: Dict[str, EOFCommentSearch],
|
|
92
|
-
comments: Comments,
|
|
93
|
-
newline: bool,
|
|
94
|
-
crlf: bool
|
|
90
|
+
files: Dict[str, EOFCommentSearch], comments: Comments, newline: bool, crlf: bool
|
|
95
91
|
) -> None:
|
|
96
92
|
"""
|
|
97
93
|
Append a Vim EOF comment to files missing it.
|
|
@@ -121,7 +117,7 @@ def append_eof_comment(
|
|
|
121
117
|
newline=newline,
|
|
122
118
|
had_nwl=had_nwl,
|
|
123
119
|
matching=matching,
|
|
124
|
-
crlf=crlf
|
|
120
|
+
crlf=crlf,
|
|
125
121
|
)
|
|
126
122
|
with open(path, "w") as file_obj:
|
|
127
123
|
file_obj.write(txt)
|
|
@@ -174,4 +170,5 @@ def main() -> int:
|
|
|
174
170
|
|
|
175
171
|
return 0
|
|
176
172
|
|
|
173
|
+
|
|
177
174
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from .comments.generator import Comments
|
|
2
2
|
from .types import BatchPathDict, EOFCommentSearch
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = ["append_eof_comment", "eof_comment_search", "main"]
|
|
5
5
|
|
|
6
|
-
def eof_comment_search(
|
|
6
|
+
def eof_comment_search(
|
|
7
|
+
files: dict[str, BatchPathDict], comments: Comments, **kwargs
|
|
8
|
+
) -> tuple[dict[str, EOFCommentSearch], bool]:
|
|
7
9
|
"""
|
|
8
10
|
Search through opened files.
|
|
9
11
|
|
|
@@ -28,7 +30,10 @@ def eof_comment_search(files: dict[str, BatchPathDict], comments: Comments, **kw
|
|
|
28
30
|
vim_eof_comment.types.EOFCommentSearch
|
|
29
31
|
The object type for the returning dictionary values.
|
|
30
32
|
"""
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
def append_eof_comment(
|
|
35
|
+
files: dict[str, EOFCommentSearch], comments: Comments, newline: bool, crlf: bool
|
|
36
|
+
) -> None:
|
|
32
37
|
"""
|
|
33
38
|
Append a Vim EOF comment to files missing it.
|
|
34
39
|
|
|
@@ -43,6 +48,7 @@ def append_eof_comment(files: dict[str, EOFCommentSearch], comments: Comments, n
|
|
|
43
48
|
crlf : bool
|
|
44
49
|
Whether the file is CRLF-terminated.
|
|
45
50
|
"""
|
|
51
|
+
|
|
46
52
|
def main() -> int:
|
|
47
53
|
"""
|
|
48
54
|
Execute the main workflow.
|
vim_eof_comment/regex.py
CHANGED
|
@@ -5,10 +5,11 @@ EOF comments checker regex matching utilities.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = ["matches"]
|
|
9
10
|
|
|
10
11
|
from re import Pattern, compile
|
|
11
|
-
from typing import
|
|
12
|
+
from typing import List
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
def matches(s: str) -> bool:
|
|
@@ -25,7 +26,7 @@ def matches(s: str) -> bool:
|
|
|
25
26
|
bool
|
|
26
27
|
Whether the string matches the default regex.
|
|
27
28
|
"""
|
|
28
|
-
pats: List[Pattern[
|
|
29
|
+
pats: List[Pattern[str]] = [
|
|
29
30
|
compile("vim:([a-zA-Z]+(=[a-zA-Z0-9_]*)?:)+"),
|
|
30
31
|
compile("vim:\\sset(\\s[a-zA-Z]+(=[a-zA-Z0-9_]*)?)*\\s[a-zA-Z]+(=[a-zA-Z0-9_]*)?:"),
|
|
31
32
|
]
|
|
@@ -35,4 +36,5 @@ def matches(s: str) -> bool:
|
|
|
35
36
|
|
|
36
37
|
return False
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/regex.pyi
CHANGED
vim_eof_comment/types.py
CHANGED
|
@@ -5,6 +5,7 @@ Custom vim-eof-comment ``TypedDict`` objects.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = [
|
|
9
10
|
"BatchPairDict",
|
|
10
11
|
"BatchPathDict",
|
|
@@ -157,7 +158,7 @@ class VersionInfo:
|
|
|
157
158
|
patch : int
|
|
158
159
|
Patch component.
|
|
159
160
|
"""
|
|
160
|
-
return (self.major, self.
|
|
161
|
+
return (self.major, self.minor, self.patch)
|
|
161
162
|
|
|
162
163
|
def get_all_versions(self) -> str:
|
|
163
164
|
"""
|
|
@@ -216,10 +217,7 @@ class ParserSpec:
|
|
|
216
217
|
completer: argcomplete.DirectoriesCompleter
|
|
217
218
|
|
|
218
219
|
def __init__(
|
|
219
|
-
self,
|
|
220
|
-
opts: List[str],
|
|
221
|
-
kwargs: Dict[str, Any],
|
|
222
|
-
completer: argcomplete.DirectoriesCompleter
|
|
220
|
+
self, opts: List[str], kwargs: Dict[str, Any], completer: argcomplete.DirectoriesCompleter
|
|
223
221
|
):
|
|
224
222
|
self.opts = opts
|
|
225
223
|
self.kwargs = kwargs
|
|
@@ -541,4 +539,5 @@ class EOFCommentSearch:
|
|
|
541
539
|
"""Iterate over objects."""
|
|
542
540
|
yield from self.__iterables()
|
|
543
541
|
|
|
542
|
+
|
|
544
543
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/types.pyi
CHANGED
|
@@ -2,7 +2,18 @@ from typing import Any, TextIO, TypedDict
|
|
|
2
2
|
|
|
3
3
|
import argcomplete
|
|
4
4
|
|
|
5
|
-
__all__ = [
|
|
5
|
+
__all__ = [
|
|
6
|
+
"BatchPairDict",
|
|
7
|
+
"BatchPathDict",
|
|
8
|
+
"CommentMap",
|
|
9
|
+
"EOFCommentSearch",
|
|
10
|
+
"IOWrapperBool",
|
|
11
|
+
"IndentHandler",
|
|
12
|
+
"IndentMap",
|
|
13
|
+
"LineBool",
|
|
14
|
+
"ParserSpec",
|
|
15
|
+
"VersionInfo",
|
|
16
|
+
]
|
|
6
17
|
|
|
7
18
|
class VersionInfo:
|
|
8
19
|
"""
|
|
@@ -29,6 +40,7 @@ class VersionInfo:
|
|
|
29
40
|
-------
|
|
30
41
|
get_all_versions()
|
|
31
42
|
"""
|
|
43
|
+
|
|
32
44
|
major: int
|
|
33
45
|
minor: int
|
|
34
46
|
patch: int
|
|
@@ -161,10 +173,13 @@ class ParserSpec:
|
|
|
161
173
|
completer : argcomplete.DirectoriesCompleter
|
|
162
174
|
An ``argcomplete`` completer object.
|
|
163
175
|
"""
|
|
176
|
+
|
|
164
177
|
opts: list[str]
|
|
165
178
|
kwargs: dict[str, Any]
|
|
166
179
|
completer: argcomplete.DirectoriesCompleter
|
|
167
|
-
def __init__(
|
|
180
|
+
def __init__(
|
|
181
|
+
self, opts: list[str], kwargs: dict[str, Any], completer: argcomplete.DirectoriesCompleter
|
|
182
|
+
) -> None: ...
|
|
168
183
|
def __iterables(self) -> tuple[list[str], dict[str, Any], argcomplete.DirectoriesCompleter]:
|
|
169
184
|
"""
|
|
170
185
|
Generate iterables.
|
|
@@ -191,6 +206,7 @@ class CommentMap:
|
|
|
191
206
|
level : int
|
|
192
207
|
The indentation level.
|
|
193
208
|
"""
|
|
209
|
+
|
|
194
210
|
level: int
|
|
195
211
|
def __init__(self, level: int) -> None: ...
|
|
196
212
|
def __iterables(self) -> tuple[int]:
|
|
@@ -216,6 +232,7 @@ class IndentMap(TypedDict):
|
|
|
216
232
|
expandtab : bool
|
|
217
233
|
Whether to expand tabs or not.
|
|
218
234
|
"""
|
|
235
|
+
|
|
219
236
|
level: int
|
|
220
237
|
expandtab: bool
|
|
221
238
|
|
|
@@ -232,6 +249,7 @@ class IndentHandler(TypedDict):
|
|
|
232
249
|
expandtab : bool
|
|
233
250
|
Whether to expand tabs or not.
|
|
234
251
|
"""
|
|
252
|
+
|
|
235
253
|
ft_ext: str
|
|
236
254
|
level: str
|
|
237
255
|
expandtab: bool
|
|
@@ -258,6 +276,7 @@ class IOWrapperBool:
|
|
|
258
276
|
crlf : bool
|
|
259
277
|
Whether the file is CRLF-terminated.
|
|
260
278
|
"""
|
|
279
|
+
|
|
261
280
|
file: TextIO
|
|
262
281
|
had_nwl: bool
|
|
263
282
|
crlf: bool
|
|
@@ -296,6 +315,7 @@ class LineBool:
|
|
|
296
315
|
crlf : bool
|
|
297
316
|
Whether the file is CRLF-terminated.
|
|
298
317
|
"""
|
|
318
|
+
|
|
299
319
|
line: str
|
|
300
320
|
had_nwl: bool
|
|
301
321
|
crlf: bool
|
|
@@ -330,6 +350,7 @@ class BatchPathDict:
|
|
|
330
350
|
ft_ext : str
|
|
331
351
|
The file-type/file-extension.
|
|
332
352
|
"""
|
|
353
|
+
|
|
333
354
|
file: TextIO
|
|
334
355
|
ft_ext: str
|
|
335
356
|
def __init__(self, file: TextIO, ft_ext: str) -> None: ...
|
|
@@ -363,6 +384,7 @@ class BatchPairDict:
|
|
|
363
384
|
ft_ext : str
|
|
364
385
|
The file-type/file-extension.
|
|
365
386
|
"""
|
|
387
|
+
|
|
366
388
|
fpath: str
|
|
367
389
|
ft_ext: str
|
|
368
390
|
def __init__(self, fpath: str, ft_ext: str) -> None: ...
|
|
@@ -402,6 +424,7 @@ class EOFCommentSearch:
|
|
|
402
424
|
match : bool
|
|
403
425
|
Whether it has a variation of an EOF comment at the end.
|
|
404
426
|
"""
|
|
427
|
+
|
|
405
428
|
state: IOWrapperBool
|
|
406
429
|
lang: str
|
|
407
430
|
match: bool
|
vim_eof_comment/util.py
CHANGED
|
@@ -5,6 +5,7 @@ EOF comments checker utilities.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = [
|
|
9
10
|
"die",
|
|
10
11
|
"error",
|
|
@@ -159,10 +160,10 @@ def gen_indent_maps(maps: List[IndentHandler]) -> Dict[str, IndentMap] | None:
|
|
|
159
160
|
|
|
160
161
|
mapping_len = mapping_len if mapping_len <= 3 else 3
|
|
161
162
|
map_d[ext] = IndentMap(
|
|
162
|
-
level=level,
|
|
163
|
-
expandtab=True if mapping_len == 2 else mapping["expandtab"]
|
|
163
|
+
level=level, expandtab=True if mapping_len == 2 else mapping["expandtab"]
|
|
164
164
|
)
|
|
165
165
|
|
|
166
166
|
return map_d
|
|
167
167
|
|
|
168
|
+
|
|
168
169
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/util.pyi
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Callable, TextIO
|
|
|
2
2
|
|
|
3
3
|
from .types import IndentHandler, IndentMap
|
|
4
4
|
|
|
5
|
-
__all__ = [
|
|
5
|
+
__all__ = ["die", "error", "gen_indent_maps", "verbose_print"]
|
|
6
6
|
|
|
7
7
|
def error(*msg, **kwargs) -> None:
|
|
8
8
|
"""
|
|
@@ -19,8 +19,9 @@ def error(*msg, **kwargs) -> None:
|
|
|
19
19
|
--------
|
|
20
20
|
print : This function is essentially being wrapped around here.
|
|
21
21
|
"""
|
|
22
|
+
|
|
22
23
|
def die(*msg, code: int = 0, func: Callable[[TextIO], None] | None = None, **kwargs) -> None:
|
|
23
|
-
|
|
24
|
+
"""
|
|
24
25
|
Kill the program execution.
|
|
25
26
|
|
|
26
27
|
Summons ``sys.exit()`` with a provided code and optionally prints code to stderr or stdout
|
|
@@ -59,7 +60,8 @@ def die(*msg, code: int = 0, func: Callable[[TextIO], None] | None = None, **kwa
|
|
|
59
60
|
>>> from vim_eof_comment.util import die
|
|
60
61
|
>>> die("foo", "bar")
|
|
61
62
|
foo bar
|
|
62
|
-
|
|
63
|
+
"""
|
|
64
|
+
|
|
63
65
|
def verbose_print(*msg, verbose: bool | None = None, **kwargs) -> None:
|
|
64
66
|
"""
|
|
65
67
|
Only prints the given data if verbose mode is activated.
|
|
@@ -77,6 +79,7 @@ def verbose_print(*msg, verbose: bool | None = None, **kwargs) -> None:
|
|
|
77
79
|
--------
|
|
78
80
|
print : This function is essentially being wrapped around here.
|
|
79
81
|
"""
|
|
82
|
+
|
|
80
83
|
def gen_indent_maps(maps: list[IndentHandler]) -> dict[str, IndentMap] | None:
|
|
81
84
|
"""
|
|
82
85
|
Generate a dictionary from the custom indent maps.
|
vim_eof_comment/version.py
CHANGED
|
@@ -5,86 +5,92 @@ Custom vim-eof-comment versioning objects.
|
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
__all__ = ["VersionInfo", "list_versions", "version_info", "version_print", "__version__"]
|
|
9
10
|
|
|
10
11
|
from .types import VersionInfo
|
|
11
12
|
from .util import die
|
|
12
13
|
|
|
13
|
-
version_info = VersionInfo(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
14
|
+
version_info = VersionInfo(
|
|
15
|
+
[
|
|
16
|
+
(0, 1, 1),
|
|
17
|
+
(0, 1, 2),
|
|
18
|
+
(0, 1, 3),
|
|
19
|
+
(0, 1, 4),
|
|
20
|
+
(0, 1, 5),
|
|
21
|
+
(0, 1, 6),
|
|
22
|
+
(0, 1, 7),
|
|
23
|
+
(0, 1, 8),
|
|
24
|
+
(0, 1, 9),
|
|
25
|
+
(0, 1, 10),
|
|
26
|
+
(0, 1, 11),
|
|
27
|
+
(0, 1, 12),
|
|
28
|
+
(0, 1, 13),
|
|
29
|
+
(0, 1, 14),
|
|
30
|
+
(0, 1, 15),
|
|
31
|
+
(0, 1, 16),
|
|
32
|
+
(0, 1, 17),
|
|
33
|
+
(0, 1, 18),
|
|
34
|
+
(0, 1, 19),
|
|
35
|
+
(0, 1, 20),
|
|
36
|
+
(0, 1, 21),
|
|
37
|
+
(0, 1, 22),
|
|
38
|
+
(0, 1, 23),
|
|
39
|
+
(0, 1, 24),
|
|
40
|
+
(0, 1, 25),
|
|
41
|
+
(0, 1, 26),
|
|
42
|
+
(0, 1, 27),
|
|
43
|
+
(0, 1, 28),
|
|
44
|
+
(0, 1, 29),
|
|
45
|
+
(0, 1, 30),
|
|
46
|
+
(0, 1, 31),
|
|
47
|
+
(0, 1, 32),
|
|
48
|
+
(0, 1, 33),
|
|
49
|
+
(0, 1, 34),
|
|
50
|
+
(0, 1, 35),
|
|
51
|
+
(0, 1, 36),
|
|
52
|
+
(0, 1, 37),
|
|
53
|
+
(0, 1, 38),
|
|
54
|
+
(0, 2, 0),
|
|
55
|
+
(0, 2, 1),
|
|
56
|
+
(0, 2, 2),
|
|
57
|
+
(0, 2, 3),
|
|
58
|
+
(0, 3, 0),
|
|
59
|
+
(0, 3, 1),
|
|
60
|
+
(0, 3, 2),
|
|
61
|
+
(0, 3, 3),
|
|
62
|
+
(0, 3, 4),
|
|
63
|
+
(0, 3, 5),
|
|
64
|
+
(0, 3, 6),
|
|
65
|
+
(0, 3, 7),
|
|
66
|
+
(0, 3, 8),
|
|
67
|
+
(0, 3, 9),
|
|
68
|
+
(0, 3, 10),
|
|
69
|
+
(0, 3, 11),
|
|
70
|
+
(0, 3, 12),
|
|
71
|
+
(0, 3, 13),
|
|
72
|
+
(0, 3, 14),
|
|
73
|
+
(0, 3, 15),
|
|
74
|
+
(0, 3, 16),
|
|
75
|
+
(0, 3, 17),
|
|
76
|
+
(0, 3, 18),
|
|
77
|
+
(0, 3, 19),
|
|
78
|
+
(0, 3, 20),
|
|
79
|
+
(0, 3, 21),
|
|
80
|
+
(0, 4, 0),
|
|
81
|
+
(0, 4, 1),
|
|
82
|
+
(0, 4, 2),
|
|
83
|
+
(0, 5, 0),
|
|
84
|
+
(0, 5, 1),
|
|
85
|
+
(0, 5, 2),
|
|
86
|
+
(0, 5, 3),
|
|
87
|
+
(0, 6, 0),
|
|
88
|
+
(0, 6, 1),
|
|
89
|
+
(0, 6, 2),
|
|
90
|
+
(0, 7, 0),
|
|
91
|
+
(0, 7, 1),
|
|
92
|
+
]
|
|
93
|
+
)
|
|
88
94
|
|
|
89
95
|
__version__: str = str(version_info)
|
|
90
96
|
|
|
@@ -105,4 +111,5 @@ def version_print(version: str) -> None:
|
|
|
105
111
|
"""
|
|
106
112
|
die(f"vim-eof-comment-{version}", code=0)
|
|
107
113
|
|
|
114
|
+
|
|
108
115
|
# vim: set ts=4 sts=4 sw=4 et ai si sta:
|
vim_eof_comment/version.pyi
CHANGED
|
@@ -2,13 +2,14 @@ from _typeshed import Incomplete
|
|
|
2
2
|
|
|
3
3
|
from .types import VersionInfo as VersionInfo
|
|
4
4
|
|
|
5
|
-
__all__ = [
|
|
5
|
+
__all__ = ["VersionInfo", "list_versions", "version_info", "version_print", "__version__"]
|
|
6
6
|
|
|
7
7
|
version_info: Incomplete
|
|
8
8
|
__version__: str
|
|
9
9
|
|
|
10
10
|
def list_versions() -> None:
|
|
11
11
|
"""List all versions."""
|
|
12
|
+
|
|
12
13
|
def version_print(version: str) -> None:
|
|
13
14
|
"""
|
|
14
15
|
Print project version, then exit.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vim-eof-comment
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.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>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
docs/Makefile,sha256=1rYkueTz6GC8AAF0rtOIJIv7sX-hMxVQBumHEqvbFEI,684
|
|
2
|
+
docs/make.bat,sha256=0qjrzODegavKd7LLwmr9ADhaYftiTnBgqOVAL9kApyo,769
|
|
3
|
+
docs/source/conf.py,sha256=4YPBOdMbrXgud_H8PA1w_PZQuT1lzAxlMhww8l-BCM8,1729
|
|
4
|
+
docs/source/functions.rst,sha256=erouYhzblZATxkA5yB6aUvF8baSvBcPQ9HwySWATTdI,20
|
|
5
|
+
docs/source/index.rst,sha256=q7DKNrR1ztwLflzGbZDnIhFwkUTcjInqZV8uRqSq2N0,457
|
|
6
|
+
docs/source/installation.rst,sha256=PkiS3E_ujNTWeKXicZ7aBPch2l1R0TsRRL6pFj_oMJI,276
|
|
7
|
+
vim_eof_comment/__init__.py,sha256=74STfL2jWHKPlHfaRu_EEZqdTYd7QvG9dYba8vFP_EY,574
|
|
8
|
+
vim_eof_comment/__init__.pyi,sha256=XzqgnR7E6vkzA4V8CuZodTyLrxM3coKidlHiwLXJG7U,637
|
|
9
|
+
vim_eof_comment/__main__.py,sha256=ya3P-VPG9FeRmdZQUbmv16ik0Ce_yCjZRORzus3rZ6k,345
|
|
10
|
+
vim_eof_comment/file.py,sha256=pWtwcYpo_4_yluZpeC8Vui6yTfqiY1wq28-8rC6hgE8,5412
|
|
11
|
+
vim_eof_comment/file.pyi,sha256=wrB8wAj6Z_FwAbYSIyMt1RtuNPH4paNU0UW9zixDtUs,2348
|
|
12
|
+
vim_eof_comment/main.py,sha256=4y3PcgUCt8JJbIothQ0tSJNodrcDxE7nt1zKm6VKkSA,5243
|
|
13
|
+
vim_eof_comment/main.pyi,sha256=C1ICzpsVzBBZ_EK4Os8F0jrQ2kFusYiyQKcgQMU65S8,1853
|
|
14
|
+
vim_eof_comment/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
vim_eof_comment/regex.py,sha256=Ie7D2Hx5Q4pqTiHuKT4UJp-oZpgktPjhQJ8ojuACLPM,894
|
|
16
|
+
vim_eof_comment/regex.pyi,sha256=01v1DT717CjMI-7Eb6lsK6eOewXDtSz_FRUYFnwfhWA,336
|
|
17
|
+
vim_eof_comment/types.py,sha256=wfGtiKGTLHviqU_2hbo9atwJAHPJi93id6wKseE-0lw,12842
|
|
18
|
+
vim_eof_comment/types.pyi,sha256=yqDZs8wDIwLjWNkt9g8SbBKR2bRfGwsryyX6BcmlaH8,10820
|
|
19
|
+
vim_eof_comment/util.py,sha256=O_p-LhCvFoKcLkr6V9nG7M3Z3zpU-usY1PsBt_p6JS4,4255
|
|
20
|
+
vim_eof_comment/util.pyi,sha256=tygEjREeGGxmHcAawJ81MrQ04IK2BGQZMB3nKkg4iY4,2656
|
|
21
|
+
vim_eof_comment/version.py,sha256=sQQFOckbOLfsoEjTk4jxcI3v2jvbZRTAif2aW6uQRkY,2282
|
|
22
|
+
vim_eof_comment/version.pyi,sha256=kgxUAJdJEw8uaQumqxMLw8s2Kb0SwMzV1Mm6F96HySI,489
|
|
23
|
+
vim_eof_comment/args/__init__.py,sha256=L7fx-9wDY7qsTw-RLd3qns14GNNzipxhCePps_D0vbg,319
|
|
24
|
+
vim_eof_comment/args/__init__.pyi,sha256=T_JchjNUqJKKv2LZmL2S3lYoFjrb0WO2_I7d75zAulM,151
|
|
25
|
+
vim_eof_comment/args/completion.py,sha256=nsN65zTgJfa5WKNBsKkkhziNC32i_wkbrx5yNzPvj2o,1258
|
|
26
|
+
vim_eof_comment/args/completion.pyi,sha256=tIrYg_dapQslljrI85y1mwScWj6cAtD4L1UJy4ZUaBI,860
|
|
27
|
+
vim_eof_comment/args/parsing.py,sha256=Pi7ltUG5Q-HXtf1YWybPIpSuZZefJdWClvqzWZibQLI,6594
|
|
28
|
+
vim_eof_comment/args/parsing.pyi,sha256=pzELI6yHxp6Ee4M74aSwykS99k_LYYL9Xe2OdwlN9ao,1744
|
|
29
|
+
vim_eof_comment/comments/__init__.py,sha256=Bu7RS0hNi47_NG02IzHnRSg4_pfNG1AJg_dzI1uoZ2A,293
|
|
30
|
+
vim_eof_comment/comments/__init__.pyi,sha256=6vgHa_E-IslsAVzyh8LnpdYsFiNdjjxCWro59zxL_Ck,104
|
|
31
|
+
vim_eof_comment/comments/filetypes.json,sha256=45GwdplLqldAX3mqvpHq8GMZ3X7FY0rPBnknibFuuKw,3355
|
|
32
|
+
vim_eof_comment/comments/generator.py,sha256=PaT8IgZpJDfWrA0otWag74I32ObOUCpuvel-5abTIRQ,7569
|
|
33
|
+
vim_eof_comment/comments/generator.pyi,sha256=sT0J08pa_CnNMQjChOV7hndSL783R-HJGm3hGeg2d-8,3160
|
|
34
|
+
vim_eof_comment-0.7.1.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
35
|
+
vim_eof_comment-0.7.1.dist-info/METADATA,sha256=yTyDXO6gt7B9igm-VguOfmu7Kcl7GP3FjXduj9-MQqg,2826
|
|
36
|
+
vim_eof_comment-0.7.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
37
|
+
vim_eof_comment-0.7.1.dist-info/entry_points.txt,sha256=OS1YkEOUCiiQ7ta871QfCgNqzQfgsbSmaMr4OUkR4rg,62
|
|
38
|
+
vim_eof_comment-0.7.1.dist-info/top_level.txt,sha256=TkaQ5vuhVzXaJnfUdcLJCQ81ILK2V6OtvX5-hIMZAc0,21
|
|
39
|
+
vim_eof_comment-0.7.1.dist-info/RECORD,,
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
docs/Makefile,sha256=1rYkueTz6GC8AAF0rtOIJIv7sX-hMxVQBumHEqvbFEI,684
|
|
2
|
-
docs/make.bat,sha256=0qjrzODegavKd7LLwmr9ADhaYftiTnBgqOVAL9kApyo,769
|
|
3
|
-
docs/source/conf.py,sha256=nqU9B3qBpI-hZ8-L2oJuh2xY4Ob-GCD3nN00JiZbRHg,1729
|
|
4
|
-
docs/source/functions.rst,sha256=erouYhzblZATxkA5yB6aUvF8baSvBcPQ9HwySWATTdI,20
|
|
5
|
-
docs/source/index.rst,sha256=q7DKNrR1ztwLflzGbZDnIhFwkUTcjInqZV8uRqSq2N0,457
|
|
6
|
-
docs/source/installation.rst,sha256=PkiS3E_ujNTWeKXicZ7aBPch2l1R0TsRRL6pFj_oMJI,276
|
|
7
|
-
vim_eof_comment/__init__.py,sha256=ESbmhca9mTst3TYMer8zFw73IRsJvn5EESci_RpfLbQ,487
|
|
8
|
-
vim_eof_comment/__init__.pyi,sha256=Eh8FQwE_F9TrQEiT7CR1mdGHBT6fHUzfV6VP8uSN33g,478
|
|
9
|
-
vim_eof_comment/__main__.py,sha256=0AFVSkz8RuxSuPbJJWycyxs6u5Yypl8FKUMR3ZVLJbk,343
|
|
10
|
-
vim_eof_comment/eof.py,sha256=rGKPqO6JbDzdJcsp20Ma9LLdyNHuUjC9ddU9F5nZqDE,5259
|
|
11
|
-
vim_eof_comment/eof.pyi,sha256=xmAMsxOyiKQs4BqZP8h8rqP4a-ONifnb491sAzbu2Y8,1839
|
|
12
|
-
vim_eof_comment/file.py,sha256=k1pX1RMZYtUkTXqTrAPsamn86Owl_OZ86XKHvV-q1Qo,5410
|
|
13
|
-
vim_eof_comment/file.pyi,sha256=yqZh8ipC4X0GpMLVTUsw1UyiQ0JO6dY-_-0qGzJ3HF4,2317
|
|
14
|
-
vim_eof_comment/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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=nMW7hGgWSDk1VvrRPUi6AzMccd3xnrZyA3u77i5DmZ4,12865
|
|
18
|
-
vim_eof_comment/types.pyi,sha256=AresdpyvrIsdIiuqFD2TX8XzZmHjv0E66Cd7mnGX9cg,10753
|
|
19
|
-
vim_eof_comment/util.py,sha256=syo6rX6e_b7rhE3BLWS9tMZBkXwFa4PVsbHF7n6BHsw,4265
|
|
20
|
-
vim_eof_comment/util.pyi,sha256=twD4qk_fIL4ftQGbaGYmTSbKqE-RycAs5WTYBZ-HZsc,2653
|
|
21
|
-
vim_eof_comment/version.py,sha256=BsTwvHBToNlkyeTWPwt0u36P4IzWeki09M-PIjBt_5Q,1921
|
|
22
|
-
vim_eof_comment/version.pyi,sha256=aiA3TyTJOk5eZFt7glPNzRBvVgCwSJDlOFSUqoMPFG4,488
|
|
23
|
-
vim_eof_comment/args/__init__.py,sha256=Hyqun15456NVFLAJ3cpdtuNEz5XaFH93vfVlbC-aeuc,318
|
|
24
|
-
vim_eof_comment/args/__init__.pyi,sha256=cXK7nEpYBveD4kxtVTe2x8oUxT9mhENS5r3wK3AAX2U,151
|
|
25
|
-
vim_eof_comment/args/completion.py,sha256=X2O-02QHeKBNF6alJHM9qka0l3-aY5TUTAqnHLY0bSY,1256
|
|
26
|
-
vim_eof_comment/args/completion.pyi,sha256=nrKI8BYBe3cEXGOwkBDkeWgofjQpdGYL8mJR6ts1c9U,859
|
|
27
|
-
vim_eof_comment/args/parsing.py,sha256=Clp23emNb1X0KVbnwIY1egA4G1BJjMHiOPkoaNMdq2E,6593
|
|
28
|
-
vim_eof_comment/args/parsing.pyi,sha256=wJMDnW_dtIlv8NfTvf_JyTB7qwk_ZwLvCizp3GkFWhw,1741
|
|
29
|
-
vim_eof_comment/comments/__init__.py,sha256=KIFAbugEKa8arCASaf7pKNHdzUC99N_T18D1CfaCOQs,292
|
|
30
|
-
vim_eof_comment/comments/__init__.pyi,sha256=cecbbrShh0If8btwJ8zKYpBt9dIsMwrDXbdaBQqwUus,104
|
|
31
|
-
vim_eof_comment/comments/filetypes.json,sha256=JpSrnBNO2AivLYi-C5--8yVocyBwye3IkMesNIz1uHA,2973
|
|
32
|
-
vim_eof_comment/comments/generator.py,sha256=k4C7w-C4wNJtEu9clf2f4vp-WzJlzzTfGtynV0FIwSE,7792
|
|
33
|
-
vim_eof_comment/comments/generator.pyi,sha256=MAT7N0bPQE2IswSWOyiELnldbsBcjVsnIwSj4ltkI4g,3665
|
|
34
|
-
vim_eof_comment-0.6.1.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
35
|
-
vim_eof_comment-0.6.1.dist-info/METADATA,sha256=4pksGMdkeG7sh13AuYq3e-JQwrRdNWf99rlaNqsJMHU,2826
|
|
36
|
-
vim_eof_comment-0.6.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
37
|
-
vim_eof_comment-0.6.1.dist-info/entry_points.txt,sha256=vm47g4hoUbow4elcHr9yylYfj6IvAs10wSFKqwqTu6E,61
|
|
38
|
-
vim_eof_comment-0.6.1.dist-info/top_level.txt,sha256=TkaQ5vuhVzXaJnfUdcLJCQ81ILK2V6OtvX5-hIMZAc0,21
|
|
39
|
-
vim_eof_comment-0.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|