Skip to content

Commit

Permalink
Fix compatibility with old Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt committed Dec 4, 2022
1 parent c8b60e8 commit 968d2d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tidbcloudy/api/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 968d2d5

Please sign in to comment.