summaryrefslogtreecommitdiff
path: root/scripts/dev/pylint_checkers/qute_pylint/config.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2024-10-13 15:28:44 +0200
committerFlorian Bruhin <me@the-compiler.org>2024-10-13 18:24:44 +0200
commit4d069b8fc3f482fb0308391e453d7d69523de753 (patch)
tree9e38eac0696f7034f853caf536241ee034f57d66 /scripts/dev/pylint_checkers/qute_pylint/config.py
parentfe868901aba6efcc28fe903fd20cfe278e4c838d (diff)
downloadqutebrowser-4d069b8fc3f482fb0308391e453d7d69523de753.tar.gz
qutebrowser-4d069b8fc3f482fb0308391e453d7d69523de753.zip
Use str.removeprefix() and str.removesuffix()
https://docs.python.org/3/whatsnew/3.9.html#new-string-methods-to-remove-prefixes-and-suffixes
Diffstat (limited to 'scripts/dev/pylint_checkers/qute_pylint/config.py')
-rw-r--r--scripts/dev/pylint_checkers/qute_pylint/config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dev/pylint_checkers/qute_pylint/config.py b/scripts/dev/pylint_checkers/qute_pylint/config.py
index be5bae082..6effc8836 100644
--- a/scripts/dev/pylint_checkers/qute_pylint/config.py
+++ b/scripts/dev/pylint_checkers/qute_pylint/config.py
@@ -50,7 +50,7 @@ class ConfigChecker(checkers.BaseChecker):
node_str = node.as_string()
prefix = 'config.val.'
if node_str.startswith(prefix):
- self._check_config(node, node_str[len(prefix):])
+ self._check_config(node, node_str.removeprefix(prefix))
def _check_config(self, node, name):
"""Check that we're accessing proper config options."""