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

Fix mypy errors #54

Closed
wants to merge 1 commit into from
Closed

Fix mypy errors #54

wants to merge 1 commit into from

Conversation

runame
Copy link
Contributor

@runame runame commented Nov 20, 2024

  • Added one minor type hint.
  • Ignored errors about instantiating a class with an abstractmethod since this seems to be a shortcoming on mypy's side: it doesn't recognize that the dataclass decorator will take care of __init__.
  • Removed a super() call in the __post_init__ function of AdaGradGraftingConfig. I think this is not necessary and mypy complains about inheriting from an abstractmethod.

@runame runame added the enhancement New feature or request label Nov 20, 2024
@runame runame requested a review from tsunghsienlee November 20, 2024 12:24
@runame runame self-assigned this Nov 20, 2024
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 20, 2024
@facebook-github-bot
Copy link
Contributor

@tsunghsienlee has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@tsunghsienlee merged this pull request in bfc71b1.

@runame runame deleted the fix-mypy branch November 20, 2024 21:59
facebook-github-bot pushed a commit that referenced this pull request Nov 21, 2024
Summary: According to [CI mypy test](https://github.com/facebookresearch/optimizers/actions/runs/11919205460/job/33218398648), this diff followed #54 to add mypy complains ignore in internal codes.

Reviewed By: anana10c

Differential Revision: D66219137

fbshipit-source-id: 20d6ed40c6315cf94921d38a88e0764035b7053b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants