Remove pyre-fixme/pyre-ignore from ax/core/ source files#4976
Closed
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Closed
Remove pyre-fixme/pyre-ignore from ax/core/ source files#4976saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary: Remove ~29 pyre-fixme/pyre-ignore suppression comments from 11 source files in ax/core/ by applying proper type fixes: - Use `none_throws()` for Optional unwrapping - Use `cast()` for type narrowing - Add proper type annotations (e.g., `partial[Any]`, `type[Any]`) - Refactor pandas `itertuples()` access to use `Any`-typed row variable - Make `Parameter.clone()` abstract with `abstractmethod` - Use `float()` casts for numeric comparisons - Remove explicit `: int` from enum members (pyre-fixme[35]) 24 genuinely unfixable suppressions remain (documented): - `copy_doc` with `property` interaction - Property setter decorator type inference - `np.floating`/`np.integer` generic params (runtime isinstance limitation) - Intentional inconsistent overrides in OptimizationConfig subclasses - Abstract class instantiation via `type(self)` Reviewed By: dme65 Differential Revision: D95264859
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95264859. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4976 +/- ##
=======================================
Coverage 96.86% 96.86%
=======================================
Files 597 597
Lines 64230 64235 +5
=======================================
+ Hits 62219 62224 +5
Misses 2011 2011 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in 4059782. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Remove ~29 pyre-fixme/pyre-ignore suppression comments from 11 source files
in ax/core/ by applying proper type fixes:
none_throws()for Optional unwrappingcast()for type narrowingpartial[Any],type[Any])itertuples()access to useAny-typed row variableParameter.clone()abstract withabstractmethodfloat()casts for numeric comparisons: intfrom enum members (pyre-fixme[35])24 genuinely unfixable suppressions remain (documented):
copy_docwithpropertyinteractionnp.floating/np.integergeneric params (runtime isinstance limitation)type(self)Reviewed By: dme65
Differential Revision: D95264859