-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Function compatibility rewrite (#2521)
* New algorithm for checking function compatibility. The new algorithm correctly handles argument names. It pays attention to them when matching up arguments for function assignments, but not for overrides (because too many libraries vary the agument names between superclass and subclass). I'll include a full writeup in prose of the new algorithm in the pull request. Print callable types with named arguments differently from each other when important Fix importFunctionAndAssignFunction test to match var names * Rename argument shorter * Explain what i am doing better * Stop checking argument names for multiple base classes * Elide __foo argument names from funcs where args are not typed * Cosmetic * Make the text descriptions of args more concise * Account for one left argument with two corresponding right args * cosmetic * cosmetic * Remove `In class foo` * Factor out corresponding_argument method * Optional for the name and pos * typo * Ignore implicitly typed function arg names * Test for ignoring arg names for implicit defs * Fix tests * Delete tests for implicit callable lacking names as they make no sense now
- Loading branch information
Showing
9 changed files
with
445 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.