Commit Graph
18 Commits
Author SHA1 Message Date
baldurk 79ad933913 Avoid accessing possibly deprecated typing members 2026-08-13 21:05:14 +01:00
baldurk 782e7101e6 Improve formatting of function tooltips 2026-08-13 17:46:45 +01:00
baldurk b83fabce3a Try to patch in 'pass' instead of commenting to preserve scopes 2026-08-13 17:46:45 +01:00
baldurk 8a86b754f6 Generate autocomplete tooltips inside python reflector 2026-08-13 17:46:43 +01:00
baldurk b9595f3685 Handle forward-referenced string return annotations 2026-08-13 17:46:43 +01:00
baldurk be3d34fb93 Add support for aliasing modules when processing reflection
* This is a little specific to us, but when we see references to a `renderdoc`
  module etc we want to be able to look up the generated stubs instead as they
  have better type hints for processing.
2026-08-13 17:46:42 +01:00
baldurk 64645aa9d6 Add autocomplete helpers for members and function calls
* This requires a small quasi-hack for tracking user defined function calls
  while looking up types.
2026-08-13 17:46:42 +01:00
baldurk e0ca14d55a Add a helper to figure out which function call and argument we're in 2026-08-13 17:46:42 +01:00
baldurk 575d8ed853 Add a function to figure out the trailing subexpression in an expr
* This is what will be used for autocompletion at a cursor point
2026-08-13 17:46:42 +01:00
baldurk 1b5ba59336 Return the correct type for list comprehension targets 2026-08-13 17:46:42 +01:00
baldurk d7c3371777 Add a helper function that replaces contents of any strings with "xxx" 2026-08-13 17:46:42 +01:00
baldurk 6a2fca967c Add a helper to get the friendly name for a type 2026-08-13 17:46:42 +01:00
baldurk 6b85e503fe Add testing for type checking 2026-08-13 17:46:42 +01:00
baldurk e7845446db Add a query to pull the type of a given location 2026-08-13 17:46:41 +01:00
baldurk f090436670 Determine best-effort type information for AST nodes
* This is not perfect but does a good enough job for most common cases.
2026-08-13 17:46:41 +01:00
baldurk e57d9db9c4 Process scope declarations and identifiers in AST tree
* We don't generate type information yet, _get_type is stubbed out.
2026-08-13 17:46:41 +01:00
baldurk b2b46e7e7c Add structs for tracking identifiers and scopes 2026-08-13 17:46:41 +01:00
baldurk 08369056d3 Add python script for autocompletion parsing
* This tries to ast parse source that may contain an error.
* We don't try to fully error recover from unlimited problems, but a single
  statement that is being edited can be tolerated by commenting out lines around
  it
2026-08-13 17:46:41 +01:00