vim-eof-comment 0.3.8__tar.gz → 0.3.10__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 (59) hide show
  1. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.pre-commit-config.yaml +9 -1
  2. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/Makefile +4 -2
  3. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/PKG-INFO +1 -1
  4. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/pyproject.toml +25 -1
  5. vim_eof_comment-0.3.10/version.txt +1 -0
  6. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/args/parsing.py +1 -2
  7. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/generator.py +1 -1
  8. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/generator.pyi +1 -1
  9. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/eof.py +3 -3
  10. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/file.py +5 -4
  11. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/version.py +2 -0
  12. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment.egg-info/PKG-INFO +1 -1
  13. vim_eof_comment-0.3.8/version.txt +0 -1
  14. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.flake8 +0 -0
  15. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.github/CODEOWNERS +0 -0
  16. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.github/workflows/flake8-lint.yml +0 -0
  17. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.github/workflows/mypy-lint.yml +0 -0
  18. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.github/workflows/release.yml +0 -0
  19. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.gitignore +0 -0
  20. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/.taplo.toml +0 -0
  21. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/LICENSE +0 -0
  22. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/Pipfile +0 -0
  23. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/README.md +0 -0
  24. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/docs/Makefile +0 -0
  25. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/docs/make.bat +0 -0
  26. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/docs/source/conf.py +0 -0
  27. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/docs/source/functions.rst +0 -0
  28. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/docs/source/index.rst +0 -0
  29. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/docs/source/usage.rst +0 -0
  30. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/requirements.txt +0 -0
  31. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/setup.cfg +0 -0
  32. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/__init__.py +0 -0
  33. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/__init__.pyi +0 -0
  34. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/__main__.py +0 -0
  35. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/args/__init__.py +0 -0
  36. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/args/__init__.pyi +0 -0
  37. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/args/completion.py +0 -0
  38. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/args/completion.pyi +0 -0
  39. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/args/parsing.pyi +0 -0
  40. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/__init__.py +0 -0
  41. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/__init__.pyi +0 -0
  42. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/filetypes.json +0 -0
  43. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/types.py +0 -0
  44. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/comments/types.pyi +0 -0
  45. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/eof.pyi +0 -0
  46. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/file.pyi +0 -0
  47. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/py.typed +0 -0
  48. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/regex.py +0 -0
  49. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/regex.pyi +0 -0
  50. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/types.py +0 -0
  51. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/types.pyi +0 -0
  52. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/util.py +0 -0
  53. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/util.pyi +0 -0
  54. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment/version.pyi +0 -0
  55. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment.egg-info/SOURCES.txt +0 -0
  56. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment.egg-info/dependency_links.txt +0 -0
  57. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment.egg-info/entry_points.txt +0 -0
  58. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment.egg-info/requires.txt +0 -0
  59. {vim_eof_comment-0.3.8 → vim_eof_comment-0.3.10}/vim_eof_comment.egg-info/top_level.txt +0 -0
@@ -1,20 +1,28 @@
1
1
  repos:
2
+ - repo: https://github.com/pycqa/isort
3
+ rev: 7.0.0
4
+ hooks:
5
+ - id: isort
6
+ verbose: true
2
7
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
8
  rev: v6.0.0
4
9
  hooks:
5
10
  - id: end-of-file-fixer
11
+ verbose: true
6
12
  - repo: https://github.com/Lucas-C/pre-commit-hooks
7
13
  rev: v1.5.5
8
14
  hooks:
9
15
  - id: remove-crlf
16
+ verbose: true
10
17
  - id: forbid-crlf # Forbid files containing CRLF end-lines to be committed
18
+ verbose: true
11
19
  - repo: local
12
20
  hooks:
13
21
  - id: lint
14
22
  name: Lint Script
15
23
  language: system
16
24
  types: [python]
17
- files: ^(vim_eof_comment/.*\.py|Makefile)$
25
+ files: ^(vim_eof_comment/.*\.pyi?|Makefile)$
18
26
  entry: make lint
19
27
  verbose: true
20
28
  - id: run_script
@@ -40,12 +40,14 @@ lint:
40
40
  @flake8 --statistics --show-source --color=always --max-line-length=100 --ignore=D401 \
41
41
  --per-file-ignores=__init__.py:F401 \
42
42
  --exclude .tox,.git,*staticfiles*,build,locale,docs,tools,venv,.venv,*migrations*,*.pyc,*.pyi,__pycache__,test_*.py \
43
- .
43
+ vim_eof_comment
44
+ @pydocstyle --convention=numpy --match='.*\.py' vim_eof_comment
45
+ @autopep8 --aggressive --aggressive --aggressive --in-place --recursive vim_eof_comment
44
46
  @echo -e "\nDone!"
45
47
 
46
48
  stubs: lint
47
49
  @echo -e "Generating stubs...\n"
48
- @stubgen --include-docstrings --include-private -p vim_eof_comment -o .
50
+ @stubgen --include-docstrings --include-private -v -p vim_eof_comment -o .
49
51
  @echo -e "\nDone!"
50
52
  @echo -e "\nRunning isort...\n"
51
53
  @isort vim_eof_comment
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vim-eof-comment
3
- Version: 0.3.8
3
+ Version: 0.3.10
4
4
  Summary: Adds Vim EOF 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>
@@ -34,7 +34,7 @@ maintainers = [{ name = "Guennadi Maximov C", email = "g.maxc.fox@protonmail.com
34
34
  name = "vim-eof-comment"
35
35
  readme = "README.md"
36
36
  requires-python = ">=3.10"
37
- version = "0.3.8"
37
+ version = "0.3.10"
38
38
 
39
39
  [project.scripts]
40
40
  vim-eof-comment = "vim_eof_comment.eof:main"
@@ -63,3 +63,27 @@ exclude_files = ['^module/gui.*', '^tests/.*']
63
63
 
64
64
  [tool.setuptools.package-data]
65
65
  "*" = ["*.json"]
66
+
67
+ [tool.mypy]
68
+ exclude_gitignore = true
69
+ follow_untyped_imports = true
70
+ python_version = "3.13"
71
+ warn_return_any = true
72
+ warn_unused_configs = true
73
+
74
+ [tool.pydocstyle]
75
+ convention = "numpy"
76
+ match = ".*\\.py"
77
+ verbose = true
78
+
79
+ [tool.autopep8]
80
+ aggressive = 3
81
+ in-place = true
82
+ max_line_length = 100
83
+ recursive = true
84
+ verbose = true
85
+
86
+ [tool.isort]
87
+ line_length = 100
88
+ skip_glob = ["docs/*"]
89
+ skip_gitignore = true
@@ -0,0 +1 @@
1
+ 0.3.10
@@ -7,8 +7,7 @@ Copyright (c) 2025 Guennadi Maximov C. All Rights Reserved.
7
7
  """
8
8
  __all__ = ["gen_parser_specs", "bootstrap_args", "arg_parser_init", "indent_handler"]
9
9
 
10
- from argparse import (ArgumentDefaultsHelpFormatter, ArgumentError,
11
- ArgumentParser, Namespace)
10
+ from argparse import ArgumentDefaultsHelpFormatter, ArgumentError, ArgumentParser, Namespace
12
11
  from typing import List, Tuple
13
12
 
14
13
  from argcomplete.completers import DirectoriesCompleter
@@ -81,7 +81,7 @@ class Comments():
81
81
 
82
82
  def __init__(self, mappings: IndentMapDict | None = None):
83
83
  """
84
- Creates a new Vim EOF comment object.
84
+ Create a new Vim EOF comment object.
85
85
 
86
86
  Parameters
87
87
  ----------
@@ -48,7 +48,7 @@ class Comments:
48
48
  langs: IndentMapDict
49
49
  def __init__(self, mappings: IndentMapDict | None = None) -> None:
50
50
  """
51
- Creates a new Vim EOF comment object.
51
+ Create a new Vim EOF comment object.
52
52
 
53
53
  Parameters
54
54
  ----------
@@ -18,8 +18,7 @@ from .args.parsing import arg_parser_init, indent_handler
18
18
  from .comments.generator import Comments, list_filetypes
19
19
  from .file import bootstrap_paths, get_last_line, modify_file, open_batch_paths
20
20
  from .regex import matches
21
- from .types import (BatchPathDict, EOFCommentSearch, IndentHandler,
22
- IOWrapperBool)
21
+ from .types import BatchPathDict, EOFCommentSearch, IndentHandler, IOWrapperBool
23
22
  from .util import die, gen_indent_maps, verbose_print, version_print
24
23
  from .version import list_versions, version_info
25
24
 
@@ -168,7 +167,8 @@ def main() -> int:
168
167
 
169
168
  files = open_batch_paths(bootstrap_paths(dirs, exts))
170
169
  if len(files) == 0:
171
- die("No matching files found!", code=1)
170
+ code = 1 if not dry_run else 0
171
+ die("No matching files found!", code=code)
172
172
 
173
173
  results = eof_comment_search(files, comments, verbose=verbose, newline=newline)
174
174
  if len(results) > 0 and not dry_run:
@@ -119,11 +119,12 @@ def modify_file(file: TextIOWrapper, comments: Dict[str, str], ext: str, **kwarg
119
119
  else:
120
120
  data.insert(-1, comment)
121
121
 
122
- if newline and data[-3] != "":
123
- data.insert(-2, "")
122
+ if len(data) >= 3:
123
+ if newline and data[-3] != "":
124
+ data.insert(-2, "")
124
125
 
125
- if not newline and data[-3] == "":
126
- data.pop(-3)
126
+ if not newline and data[-3] == "":
127
+ data.pop(-3)
127
128
 
128
129
  return "\n".join(data)
129
130
 
@@ -215,6 +215,8 @@ version_info: VersionInfo = VersionInfo([
215
215
  (0, 3, 6),
216
216
  (0, 3, 7),
217
217
  (0, 3, 8),
218
+ (0, 3, 9),
219
+ (0, 3, 10),
218
220
  ])
219
221
 
220
222
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vim-eof-comment
3
- Version: 0.3.8
3
+ Version: 0.3.10
4
4
  Summary: Adds Vim EOF 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>
@@ -1 +0,0 @@
1
- 0.3.8