vim-eof-comment 0.4.1__tar.gz → 0.4.2__tar.gz

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.
Files changed (60) hide show
  1. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/PKG-INFO +1 -3
  2. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/Pipfile +3 -5
  3. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/pyproject.toml +2 -2
  4. vim_eof_comment-0.4.2/requirements.txt +4 -0
  5. vim_eof_comment-0.4.2/version.txt +1 -0
  6. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/args/parsing.py +6 -6
  7. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/args/parsing.pyi +4 -4
  8. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/comments/generator.py +2 -2
  9. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/eof.py +1 -2
  10. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/file.py +2 -2
  11. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/types.py +2 -2
  12. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/types.pyi +2 -2
  13. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/util.py +19 -11
  14. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/version.py +1 -0
  15. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment.egg-info/PKG-INFO +1 -3
  16. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment.egg-info/requires.txt +0 -2
  17. vim_eof_comment-0.4.1/requirements.txt +0 -12
  18. vim_eof_comment-0.4.1/version.txt +0 -1
  19. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.flake8 +0 -0
  20. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.gitattributes +0 -0
  21. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.github/CODEOWNERS +0 -0
  22. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.github/workflows/flake8-lint.yml +0 -0
  23. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.github/workflows/mypy-lint.yml +0 -0
  24. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.github/workflows/release.yml +0 -0
  25. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.github/workflows/vim-eof-comment.yml +0 -0
  26. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/.pre-commit-config.yaml +0 -0
  27. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/CHANGELOG.md +0 -0
  28. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/LICENSE +0 -0
  29. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/Makefile +0 -0
  30. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/README.md +0 -0
  31. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/docs/Makefile +0 -0
  32. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/docs/make.bat +0 -0
  33. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/docs/source/conf.py +0 -0
  34. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/docs/source/functions.rst +0 -0
  35. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/docs/source/index.rst +0 -0
  36. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/docs/source/installation.rst +0 -0
  37. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/setup.cfg +0 -0
  38. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/taplo.toml +0 -0
  39. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/__init__.py +0 -0
  40. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/__init__.pyi +0 -0
  41. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/__main__.py +0 -0
  42. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/args/__init__.py +0 -0
  43. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/args/__init__.pyi +0 -0
  44. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/args/completion.py +0 -0
  45. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/args/completion.pyi +0 -0
  46. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/comments/__init__.py +0 -0
  47. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/comments/__init__.pyi +0 -0
  48. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/comments/filetypes.json +0 -0
  49. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/comments/generator.pyi +0 -0
  50. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/eof.pyi +0 -0
  51. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/file.pyi +0 -0
  52. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/py.typed +0 -0
  53. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/regex.py +0 -0
  54. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/regex.pyi +0 -0
  55. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/util.pyi +0 -0
  56. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment/version.pyi +0 -0
  57. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment.egg-info/SOURCES.txt +0 -0
  58. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment.egg-info/dependency_links.txt +0 -0
  59. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment.egg-info/entry_points.txt +0 -0
  60. {vim_eof_comment-0.4.1 → vim_eof_comment-0.4.2}/vim_eof_comment.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vim-eof-comment
3
- Version: 0.4.1
3
+ Version: 0.4.2
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>
@@ -30,8 +30,6 @@ License-File: LICENSE
30
30
  Requires-Dist: argcomplete
31
31
  Requires-Dist: argparse
32
32
  Requires-Dist: colorama
33
- Requires-Dist: setuptools
34
- Requires-Dist: wheel
35
33
  Dynamic: license-file
36
34
 
37
35
  # vim-eof-comment
@@ -4,19 +4,17 @@ verify_ssl = true
4
4
  name = "pypi"
5
5
 
6
6
  [packages]
7
- setuptools = "*"
8
- wheel = "*"
9
7
  argparse = "*"
10
- pyproject = "*"
11
8
  colorama = "*"
12
9
  argcomplete = "*"
13
- pynvim = "*"
14
10
 
15
11
  [dev-packages]
12
+ pyproject = "*"
13
+ setuptools = "*"
14
+ wheel = "*"
16
15
  pynvim = "*"
17
16
  build = "*"
18
17
  pip = "*"
19
- pyproject = "*"
20
18
  twine = "*"
21
19
  pypi-attestations = "*"
22
20
  pre-commit = "*"
@@ -21,7 +21,7 @@ classifiers = [
21
21
  "Topic :: Utilities",
22
22
  "Typing :: Typed",
23
23
  ]
24
- dependencies = ["argcomplete", "argparse", "colorama", "setuptools", "wheel"]
24
+ dependencies = ["argcomplete", "argparse", "colorama"]
25
25
  description = "Adds Vim EOF modeline comments for given filetypes in given directories"
26
26
  keywords = [
27
27
  "eof comments",
@@ -39,7 +39,7 @@ maintainers = [{ name = "Guennadi Maximov C", email = "g.maxc.fox@protonmail.com
39
39
  name = "vim-eof-comment"
40
40
  readme = "README.md"
41
41
  requires-python = ">=3.10"
42
- version = "0.4.1"
42
+ version = "0.4.2"
43
43
 
44
44
  [project.scripts]
45
45
  vim-eof-comment = "vim_eof_comment.eof:main"
@@ -0,0 +1,4 @@
1
+ -i https://pypi.org/simple
2
+ argcomplete==3.6.3; python_version >= '3.8'
3
+ argparse==1.4.0
4
+ colorama==0.4.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
@@ -0,0 +1 @@
1
+ 0.4.2
@@ -17,7 +17,7 @@ from ..util import die
17
17
  from .completion import complete_parser
18
18
 
19
19
 
20
- def gen_parser_specs(*specs) -> Tuple[ParserSpec]:
20
+ def gen_parser_specs(*specs) -> List[ParserSpec]:
21
21
  """
22
22
  Generate a ``ParserSpec`` object.
23
23
 
@@ -28,13 +28,13 @@ def gen_parser_specs(*specs) -> Tuple[ParserSpec]:
28
28
 
29
29
  Returns
30
30
  -------
31
- Tuple[ParserSpec]
32
- The converted dictionaries inside a tuple.
31
+ List[ParserSpec]
32
+ The converted dictionaries inside a list.
33
33
  """
34
- return tuple([ParserSpec(**d) for d in [*specs]])
34
+ return [ParserSpec(**d) for d in [*specs]]
35
35
 
36
36
 
37
- def bootstrap_args(parser: ArgumentParser, specs: Tuple[ParserSpec]) -> Namespace:
37
+ def bootstrap_args(parser: ArgumentParser, specs: List[ParserSpec]) -> Namespace:
38
38
  """
39
39
  Bootstrap the program arguments.
40
40
 
@@ -92,7 +92,7 @@ def arg_parser_init(prog: str = "vim-eof-comment") -> Tuple[ArgumentParser, Name
92
92
  add_help=True,
93
93
  allow_abbrev=True
94
94
  )
95
- spec: Tuple[ParserSpec] = gen_parser_specs(
95
+ spec: List[ParserSpec] = gen_parser_specs(
96
96
  {
97
97
  "opts": ["directories"],
98
98
  "kwargs": {
@@ -4,7 +4,7 @@ from ..types import IndentHandler, ParserSpec
4
4
 
5
5
  __all__ = ['gen_parser_specs', 'bootstrap_args', 'arg_parser_init', 'indent_handler']
6
6
 
7
- def gen_parser_specs(*specs) -> tuple[ParserSpec]:
7
+ def gen_parser_specs(*specs) -> list[ParserSpec]:
8
8
  """
9
9
  Generate a ``ParserSpec`` object.
10
10
 
@@ -15,10 +15,10 @@ def gen_parser_specs(*specs) -> tuple[ParserSpec]:
15
15
 
16
16
  Returns
17
17
  -------
18
- Tuple[ParserSpec]
19
- The converted dictionaries inside a tuple.
18
+ List[ParserSpec]
19
+ The converted dictionaries inside a list.
20
20
  """
21
- def bootstrap_args(parser: ArgumentParser, specs: tuple[ParserSpec]) -> Namespace:
21
+ def bootstrap_args(parser: ArgumentParser, specs: list[ParserSpec]) -> Namespace:
22
22
  """
23
23
  Bootstrap the program arguments.
24
24
 
@@ -108,7 +108,7 @@ class Comments():
108
108
  self.langs = self.__DEFAULT.copy()
109
109
  return
110
110
 
111
- langs = dict()
111
+ langs: Dict[str, IndentMap] = dict()
112
112
  for lang, mapping in mappings.items():
113
113
  if not (self.__is_available(lang)) or len(mapping) == 0:
114
114
  continue
@@ -117,7 +117,7 @@ class Comments():
117
117
  if len(mapping) > 1:
118
118
  expandtab = mapping["expandtab"]
119
119
 
120
- langs[lang] = {"level": indent, "expandtab": expandtab}
120
+ langs[lang] = IndentMap(level=indent, expandtab=expandtab)
121
121
 
122
122
  self.__fill_langs(langs)
123
123
 
@@ -153,10 +153,9 @@ def main() -> int:
153
153
  dirs: List[str] = ns.directories
154
154
  exts: List[str] = ns.exts.split(",")
155
155
  newline: bool = ns.newline
156
- indent: List[IndentHandler] = indent_handler(ns.indent)
157
156
  verbose: bool = ns.verbose
158
-
159
157
  dry_run: bool = ns.dry_run
158
+ indent: List[IndentHandler] = indent_handler(ns.indent)
160
159
 
161
160
  if dry_run:
162
161
  verbose = True
@@ -106,14 +106,14 @@ def open_batch_paths(paths: List[BatchPairDict]) -> Dict[str, BatchPathDict]:
106
106
  Dict[str, BatchPathDict]
107
107
  A ``str`` to ``BatchPathDict``` dictionary.
108
108
  """
109
- result = dict()
109
+ result: Dict[str, BatchPathDict] = dict()
110
110
  for path in paths:
111
111
  fpath, ext = path["fpath"], path["ft_ext"]
112
112
  if not try_open(fpath):
113
113
  continue
114
114
 
115
115
  try:
116
- result[fpath] = {"file": open(fpath, "r"), "ft_ext": ext}
116
+ result[fpath] = BatchPathDict(file=open(fpath, "r"), ft_ext=ext)
117
117
  except KeyboardInterrupt:
118
118
  die("\nProgram interrupted!", code=1) # Kills the program
119
119
  except FileNotFoundError:
@@ -19,7 +19,7 @@ __all__ = [
19
19
 
20
20
  from typing import Any, Dict, List, TextIO, TypedDict
21
21
 
22
- from argcomplete.completers import DirectoriesCompleter
22
+ import argcomplete
23
23
 
24
24
 
25
25
  class ParserSpec(TypedDict):
@@ -40,7 +40,7 @@ class ParserSpec(TypedDict):
40
40
 
41
41
  opts: List[str]
42
42
  kwargs: Dict[str, Any]
43
- completer: DirectoriesCompleter
43
+ completer: argcomplete.DirectoriesCompleter
44
44
 
45
45
 
46
46
  class CommentMap(TypedDict):
@@ -1,6 +1,6 @@
1
1
  from typing import Any, TextIO, TypedDict
2
2
 
3
- from argcomplete.completers import DirectoriesCompleter
3
+ import argcomplete
4
4
 
5
5
  __all__ = ['BatchPairDict', 'BatchPathDict', 'CommentMap', 'EOFCommentSearch', 'IOWrapperBool', 'IndentHandler', 'IndentMap', 'LineBool', 'ParserSpec']
6
6
 
@@ -21,7 +21,7 @@ class ParserSpec(TypedDict):
21
21
  """
22
22
  opts: list[str]
23
23
  kwargs: dict[str, Any]
24
- completer: DirectoriesCompleter
24
+ completer: argcomplete.DirectoriesCompleter
25
25
 
26
26
  class CommentMap(TypedDict):
27
27
  """
@@ -5,7 +5,12 @@ EOF comments checker utilities.
5
5
 
6
6
  Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
7
7
  """
8
- __all__ = ["die", "error", "gen_indent_maps", "verbose_print"]
8
+ __all__ = [
9
+ "die",
10
+ "error",
11
+ "gen_indent_maps",
12
+ "verbose_print",
13
+ ]
9
14
 
10
15
  from sys import exit as Exit
11
16
  from sys import stderr, stdout
@@ -15,7 +20,7 @@ from .types import IndentHandler, IndentMap
15
20
 
16
21
 
17
22
  def error(*msg, **kwargs) -> NoReturn:
18
- r"""
23
+ """
19
24
  Print to stderr.
20
25
 
21
26
  Parameters
@@ -29,11 +34,14 @@ def error(*msg, **kwargs) -> NoReturn:
29
34
  --------
30
35
  print : This function is essentially being wrapped around here.
31
36
  """
32
- print(*msg, file=stderr, **kwargs)
37
+ end: str = kwargs.get("end", "\n")
38
+ sep: str = kwargs.get("sep", " ")
39
+ flush: bool = kwargs.get("flush", False)
40
+ print(*msg, file=stderr, end=end, sep=sep, flush=flush)
33
41
 
34
42
 
35
43
  def die(*msg, code: int = 0, func: Callable[[TextIO], None] | None = None, **kwargs) -> NoReturn:
36
- r"""
44
+ """
37
45
  Kill the program execution.
38
46
 
39
47
  Summons ``sys.exit()`` with a provided code and optionally prints code to stderr or stdout
@@ -107,13 +115,13 @@ def verbose_print(*msg, verbose: bool | None = None, **kwargs) -> NoReturn:
107
115
  --------
108
116
  print : This function is essentially being wrapped around here.
109
117
  """
118
+ if verbose is None or not verbose:
119
+ return
120
+
110
121
  end: str = kwargs.get("end", "\n")
111
122
  sep: str = kwargs.get("sep", " ")
112
123
  flush: bool = kwargs.get("flush", False)
113
124
 
114
- if verbose is None or not verbose:
115
- return
116
-
117
125
  print(*msg, end=end, sep=sep, flush=flush)
118
126
 
119
127
 
@@ -150,10 +158,10 @@ def gen_indent_maps(maps: List[IndentHandler]) -> Dict[str, IndentMap] | None:
150
158
  continue
151
159
 
152
160
  mapping_len = mapping_len if mapping_len <= 3 else 3
153
- map_d[ext] = {
154
- "level": level,
155
- "expandtab": True if mapping_len == 2 else mapping["expandtab"],
156
- }
161
+ map_d[ext] = IndentMap(
162
+ level=level,
163
+ expandtab=True if mapping_len == 2 else mapping["expandtab"]
164
+ )
157
165
 
158
166
  return map_d
159
167
 
@@ -230,6 +230,7 @@ version_info = VersionInfo([
230
230
  (0, 3, 21),
231
231
  (0, 4, 0),
232
232
  (0, 4, 1),
233
+ (0, 4, 2),
233
234
  ])
234
235
 
235
236
  __version__: str = str(version_info)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vim-eof-comment
3
- Version: 0.4.1
3
+ Version: 0.4.2
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>
@@ -30,8 +30,6 @@ License-File: LICENSE
30
30
  Requires-Dist: argcomplete
31
31
  Requires-Dist: argparse
32
32
  Requires-Dist: colorama
33
- Requires-Dist: setuptools
34
- Requires-Dist: wheel
35
33
  Dynamic: license-file
36
34
 
37
35
  # vim-eof-comment
@@ -1,5 +1,3 @@
1
1
  argcomplete
2
2
  argparse
3
3
  colorama
4
- setuptools
5
- wheel
@@ -1,12 +0,0 @@
1
- -i https://pypi.org/simple
2
- argcomplete==3.6.3; python_version >= '3.8'
3
- argparse==1.4.0
4
- colorama==0.4.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
5
- greenlet==3.3.0; python_version >= '3.10'
6
- msgpack==1.1.2; python_version >= '3.9'
7
- pynvim==0.6.0; python_version >= '3.7'
8
- pyproject==1!0.1.2; python_version >= '3.12'
9
- setuptools==80.9.0; python_version >= '3.9'
10
- typing==3.7.4.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
11
- typing-extensions==4.15.0; python_version >= '3.9'
12
- wheel==0.45.1; python_version >= '3.8'
@@ -1 +0,0 @@
1
- 0.4.1
File without changes
File without changes