vim-eof-comment 0.5.0__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.
- vim_eof_comment/eof.py +1 -1
- vim_eof_comment/regex.py +9 -12
- vim_eof_comment/regex.pyi +1 -3
- vim_eof_comment/version.py +1 -0
- {vim_eof_comment-0.5.0.dist-info → vim_eof_comment-0.5.1.dist-info}/METADATA +2 -1
- {vim_eof_comment-0.5.0.dist-info → vim_eof_comment-0.5.1.dist-info}/RECORD +10 -10
- {vim_eof_comment-0.5.0.dist-info → vim_eof_comment-0.5.1.dist-info}/WHEEL +0 -0
- {vim_eof_comment-0.5.0.dist-info → vim_eof_comment-0.5.1.dist-info}/entry_points.txt +0 -0
- {vim_eof_comment-0.5.0.dist-info → vim_eof_comment-0.5.1.dist-info}/licenses/LICENSE +0 -0
- {vim_eof_comment-0.5.0.dist-info → vim_eof_comment-0.5.1.dist-info}/top_level.txt +0 -0
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
|
|
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
|
|
10
|
+
from re import Pattern, compile
|
|
11
|
+
from typing import AnyStr, List
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
def matches(s: str
|
|
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:
|
|
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
|
|
35
|
-
|
|
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
|
|
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/version.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vim-eof-comment
|
|
3
|
-
Version: 0.5.
|
|
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
|
|
@@ -7,18 +7,18 @@ 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=
|
|
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=
|
|
16
|
-
vim_eof_comment/regex.pyi,sha256=
|
|
15
|
+
vim_eof_comment/regex.py,sha256=48oxUO3YDdM30U0qAsqyH_AycYCrcnaQ6cghy3NXHrw,903
|
|
16
|
+
vim_eof_comment/regex.pyi,sha256=W0ZX_J9mLRckCdBNE-Bl09hsQ61VFqjuLwDlevEeeUM,336
|
|
17
17
|
vim_eof_comment/types.py,sha256=YumpVIUl1wxbn_QIEkWeUbxsa9b9RJYdVEBzx-Kt4xo,8195
|
|
18
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=
|
|
21
|
+
vim_eof_comment/version.py,sha256=6mVWL-zWSneVLKmOEP1oeDzCZLnDPkRJzEAv_l5N6MQ,1898
|
|
22
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
|
|
@@ -31,9 +31,9 @@ vim_eof_comment/comments/__init__.pyi,sha256=cecbbrShh0If8btwJ8zKYpBt9dIsMwrDXbd
|
|
|
31
31
|
vim_eof_comment/comments/filetypes.json,sha256=JpSrnBNO2AivLYi-C5--8yVocyBwye3IkMesNIz1uHA,2973
|
|
32
32
|
vim_eof_comment/comments/generator.py,sha256=yuRvTuVd6qQ1ei496w8NQ0c1MR1e3qJHf1pOTalXlv8,7814
|
|
33
33
|
vim_eof_comment/comments/generator.pyi,sha256=ue8oMa7yEoKfgQDJbeTzx0Qm5Wck2gHrDb_wF00xIyo,3687
|
|
34
|
-
vim_eof_comment-0.5.
|
|
35
|
-
vim_eof_comment-0.5.
|
|
36
|
-
vim_eof_comment-0.5.
|
|
37
|
-
vim_eof_comment-0.5.
|
|
38
|
-
vim_eof_comment-0.5.
|
|
39
|
-
vim_eof_comment-0.5.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|