Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block_token.List.start is both a classmethod and attribute #205

Open
TeamSpen210 opened this issue Dec 11, 2023 · 1 comment
Open

block_token.List.start is both a classmethod and attribute #205

TeamSpen210 opened this issue Dec 11, 2023 · 1 comment

Comments

@TeamSpen210
Copy link

While looking through the codebase to understand it (and maybe write some type stubs), I noticed that block_token.List has both a classmethod start(), and an attribute with that same name. This does happen to work, but it's rather awkward, and might confuse various tools (or humans).

The classmethod seems to be common to all the token classes, so it seems better to rename the attribute form. (ordinal perhaps?) Either way it's backwards incompatible, though a custom descriptor class could be used temporarily to produce warnings.

@pbodnar
Copy link
Collaborator

pbodnar commented Dec 18, 2023

@TeamSpen210, thanks for pointing out this, hopefully just minor, issue. I think we can consider fixing it at some point, possibly when doing some bigger code cleanup. Provided we would rename the start attribute, I would vote e.g. for start_num (ordinal comes too generic to me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants