File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,12 +112,14 @@ def check_patterns(
112112 default_style = "sh"
113113 for pattern in patterns :
114114 pattern = pattern .strip ()
115+ if not pattern :
116+ continue
115117 culprit = src
116118 codicil = repr (pattern )
117119 kind = pattern [0 :1 ]
118120 arg = pattern [1 :].lstrip ()
119121 if not kind or not arg :
120- raise Error (f"invalid pattern: ‘{ pattern } ’" )
122+ raise Error (f"invalid pattern: ‘{ pattern } ’" , culprit = culprit )
121123 if kind in ["" , "#" ]:
122124 continue # is comment
123125 if kind not in known_kinds :
Original file line number Diff line number Diff line change 44# shell-script-like things relatively easily in Python.
55
66# License {{{1
7- # Copyright (C) 2016-2024 Kenneth S. Kundert
7+ # Copyright (C) 2016-2025 Kenneth S. Kundert
88#
99# This program is free software: you can redistribute it and/or modify
1010# it under the terms of the GNU General Public License as published by
1919# You should have received a copy of the GNU General Public License
2020# along with this program. If not, see [http://www.gnu.org/licenses/].
2121
22- __version__ = "1.6 "
23- __released__ = "2023 -05-18 "
22+ __version__ = "1.7 "
23+ __released__ = "2025 -05-20 "
2424
2525# Imports {{{1
2626try :
You can’t perform that action at this time.
0 commit comments