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

This Constructor Doesn't Return a Class Instance #10

Closed
bh2smith opened this issue Apr 22, 2024 · 0 comments · Fixed by #9
Closed

This Constructor Doesn't Return a Class Instance #10

bh2smith opened this issue Apr 22, 2024 · 0 comments · Fixed by #9

Comments

@bh2smith
Copy link
Contributor

@classmethod
def mainnet(cls) -> Type["LakeConfig"]:
cls.s3_bucket_name = "near-lake-data-mainnet"
cls.s3_region_name = "eu-central-1"
return cls
@classmethod
def testnet(cls) -> Type["LakeConfig"]:
cls.s3_bucket_name = "near-lake-data-testnet"
cls.s3_region_name = "eu-central-1"
return cls

While testing #9, the type checker has correctly pointed out that this isn't really a constructor. Since the project is still released below v1, I think its reasonable to change the constructor interface. I will make a proposal for this in the open PR related to types.

bh2smith added a commit to bh2smith/near-lake-framework-py that referenced this issue Apr 22, 2024
@bh2smith bh2smith mentioned this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant