Refs #34233 -- Used str.removeprefix()/removesuffix().

This commit is contained in:
Mariusz Felisiak 2023-01-18 19:11:18 +01:00 committed by GitHub
parent fd21f82aa8
commit 23e8868862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 42 additions and 53 deletions

View file

@ -312,7 +312,7 @@ would override ``get_lookup`` with something like::
def get_lookup(self, lookup_name):
if lookup_name.startswith('x'):
try:
dimension = int(lookup_name[1:])
dimension = int(lookup_name.removeprefix("x"))
except ValueError:
pass
else: