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

type fixes for pep 484 compliance #3181

Merged
merged 2 commits into from
Jan 17, 2023
Merged

type fixes for pep 484 compliance #3181

merged 2 commits into from
Jan 17, 2023

Conversation

arunppsg
Copy link
Contributor

Made some type fixes for compliance with pep 484.

PEP 484 prohibits the use of implicit optional. For example, the following piece of code allows assumption of implicit optional: def foo(a: int = None): ... . It allows type checkers to assume an optional type of None for a. To comply with PEP 484, it should be def foo(a: Optional[int] = None): ....

The latest mypy version (0.991, release blog) had a breaking change which disabled implicit optionals type. Hence, it was not detected earlier by mypy.

Copy link
Member

@rbharath rbharath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, reviewed at OH

@arunppsg arunppsg merged commit f2aa60d into deepchem:master Jan 17, 2023
@arunppsg arunppsg deleted the mypy branch June 30, 2023 02:36
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 this pull request may close these issues.

None yet

2 participants