vim-eof-comment 0.5.2__tar.gz → 0.5.3__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.
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/PKG-INFO +1 -1
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/pyproject.toml +1 -1
- vim_eof_comment-0.5.3/version.txt +1 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/eof.py +4 -5
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/file.py +13 -14
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/version.py +1 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment.egg-info/PKG-INFO +1 -1
- vim_eof_comment-0.5.2/version.txt +0 -1
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.flake8 +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.gitattributes +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.github/CODEOWNERS +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.github/FUNDING.yml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.github/workflows/flake8-lint.yml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.github/workflows/mypy-lint.yml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.github/workflows/release.yml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.github/workflows/vim-eof-comment.yml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/.pre-commit-config.yaml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/CHANGELOG.md +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/LICENSE +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/Makefile +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/README.md +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/docs/Makefile +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/docs/make.bat +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/docs/source/conf.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/docs/source/functions.rst +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/docs/source/index.rst +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/docs/source/installation.rst +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/requirements.txt +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/setup.cfg +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/taplo.toml +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/__init__.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/__init__.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/__main__.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/args/__init__.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/args/__init__.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/args/completion.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/args/completion.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/args/parsing.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/args/parsing.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/comments/__init__.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/comments/__init__.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/comments/filetypes.json +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/comments/generator.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/comments/generator.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/eof.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/file.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/py.typed +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/regex.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/regex.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/types.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/types.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/util.py +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/util.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment/version.pyi +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment.egg-info/SOURCES.txt +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment.egg-info/dependency_links.txt +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment.egg-info/entry_points.txt +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment.egg-info/requires.txt +0 -0
- {vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/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.5.
|
|
3
|
+
Version: 0.5.3
|
|
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>
|
|
@@ -40,7 +40,7 @@ maintainers = [{ name = "Guennadi Maximov C", email = "g.maxc.fox@protonmail.com
|
|
|
40
40
|
name = "vim-eof-comment"
|
|
41
41
|
readme = "README.md"
|
|
42
42
|
requires-python = ">=3.10"
|
|
43
|
-
version = "0.5.
|
|
43
|
+
version = "0.5.3"
|
|
44
44
|
|
|
45
45
|
[project.scripts]
|
|
46
46
|
vim-eof-comment = "vim_eof_comment.eof:main"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.5.3
|
|
@@ -120,12 +120,11 @@ def append_eof_comment(
|
|
|
120
120
|
ext=ext,
|
|
121
121
|
newline=newline,
|
|
122
122
|
had_nwl=had_nwl,
|
|
123
|
-
matching=matching
|
|
123
|
+
matching=matching,
|
|
124
|
+
crlf=crlf
|
|
124
125
|
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
file_obj.write(txt)
|
|
128
|
-
file_obj.close()
|
|
126
|
+
with open(path, "w") as file_obj:
|
|
127
|
+
file_obj.write(txt)
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
def main() -> int:
|
|
@@ -148,27 +148,27 @@ def modify_file(file: TextIOWrapper, comments: Dict[str, str], ext: str, **kwarg
|
|
|
148
148
|
newline: bool = kwargs.get("newline", False)
|
|
149
149
|
crlf: bool = kwargs.get("crlf", False)
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
data: List[str] = file.read().split("\n")
|
|
152
152
|
file.close()
|
|
153
153
|
|
|
154
|
-
data
|
|
154
|
+
if len(data) >= 1 and data[-1] != "":
|
|
155
|
+
data.append("")
|
|
156
|
+
|
|
155
157
|
if crlf:
|
|
156
158
|
data[-2] = ""
|
|
157
159
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
data = [comment, ""]
|
|
162
|
-
elif data_len == 1:
|
|
160
|
+
if len(data) == 0:
|
|
161
|
+
data = [comments[ext], ""]
|
|
162
|
+
elif len(data) == 1:
|
|
163
163
|
if matching:
|
|
164
|
-
data = [
|
|
164
|
+
data = [comments[ext], ""]
|
|
165
165
|
else:
|
|
166
|
-
data.insert(0,
|
|
167
|
-
elif
|
|
166
|
+
data.insert(0, comments[ext])
|
|
167
|
+
elif len(data) >= 2:
|
|
168
168
|
if matching:
|
|
169
|
-
data[-2] =
|
|
169
|
+
data[-2] = comments[ext]
|
|
170
170
|
else:
|
|
171
|
-
data.insert(-1,
|
|
171
|
+
data.insert(-1, comments[ext])
|
|
172
172
|
|
|
173
173
|
if len(data) >= 3:
|
|
174
174
|
if newline and data[-3] != "":
|
|
@@ -197,8 +197,7 @@ def get_last_line(file: TextIOWrapper) -> LineBool:
|
|
|
197
197
|
LineBool
|
|
198
198
|
An object containing both the last line in a string and a boolean indicating a newline.
|
|
199
199
|
"""
|
|
200
|
-
|
|
201
|
-
data: List[str] = bdata.split("\n")
|
|
200
|
+
data: List[str] = file.read().split("\n")
|
|
202
201
|
file.close()
|
|
203
202
|
|
|
204
203
|
if data[-1] != "":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vim-eof-comment
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.5.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vim_eof_comment-0.5.2 → vim_eof_comment-0.5.3}/vim_eof_comment.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|