diff --git a/tidbcloudy/api/_base.py b/tidbcloudy/api/_base.py index b9a4cab..4ed5de1 100644 --- a/tidbcloudy/api/_base.py +++ b/tidbcloudy/api/_base.py @@ -22,7 +22,8 @@ class TiDBCloudyBase: def __init_subclass__(cls): cls._keys = {} for key in cls.__slots__: - key = key.removeprefix("_") + if key.startswith("_"): + key = key[1:] cls._keys[key] = getattr(cls, key) def __init__(self, **kwargs):