diff options
author | Florian Bruhin <me@the-compiler.org> | 2024-10-13 15:28:44 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2024-10-13 18:24:44 +0200 |
commit | 4d069b8fc3f482fb0308391e453d7d69523de753 (patch) | |
tree | 9e38eac0696f7034f853caf536241ee034f57d66 /scripts/dev/pylint_checkers/qute_pylint/config.py | |
parent | fe868901aba6efcc28fe903fd20cfe278e4c838d (diff) | |
download | qutebrowser-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.py | 2 |
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.""" |