summaryrefslogtreecommitdiff
path: root/qutebrowser/misc/split.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/misc/split.py')
-rw-r--r--qutebrowser/misc/split.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/qutebrowser/misc/split.py b/qutebrowser/misc/split.py
index 0aac9005c..da463b647 100644
--- a/qutebrowser/misc/split.py
+++ b/qutebrowser/misc/split.py
@@ -1,19 +1,6 @@
-# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
+# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
-# This file is part of qutebrowser.
-#
-# qutebrowser is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# qutebrowser is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Our own fork of shlex.split with some added and removed features."""
@@ -201,10 +188,10 @@ def simple_split(s, keep=False, maxsplit=None):
if keep:
pattern = '([' + whitespace + '])'
- parts = re.split(pattern, s, maxsplit)
+ parts = re.split(pattern, s, maxsplit=maxsplit)
return _combine_ws(parts, whitespace)
else:
pattern = '[' + whitespace + ']'
- parts = re.split(pattern, s, maxsplit)
+ parts = re.split(pattern, s, maxsplit=maxsplit)
parts[-1] = parts[-1].rstrip()
return [p for p in parts if p]