Skip to content

Conversation

@MashyBasker
Copy link
Contributor

@MashyBasker MashyBasker commented Apr 5, 2025

This PR introduces scope analysis for Python language for better data flow analysis.
Resolves #191

Support for(till now):

  • variable declarations

    • simple declarations (<name> = ...)
    • tuple unpack ((<name1>, <name2>) = (..., ...))
    • list unpack ([<name1>, <name2>] = [..., ...])
    • pattern list (<name1>, <name2> = ..., ...)
  • import

    • simple import (import <name>)
    • import with alias (import <name> as <alias>)
    • import with from (from <name> import <another_name>)
  • functions

    • function names
    • function parameters
  • exception error variable in try/catch

  • with statement's as pattern variable

  • class statements

  • walrus operator

  • comprehension patterns

    • list comprehension
    • dictionary comprehension
    • generator expression
  • lambda expression

  • for loops

@vercel
Copy link

vercel bot commented Apr 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
globstar ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2025 9:41am

@MashyBasker MashyBasker marked this pull request as draft April 5, 2025 18:02
@MashyBasker MashyBasker changed the title feat: introduce scope analysis for python ENH: introduce scope analysis for python Apr 5, 2025
@MashyBasker MashyBasker changed the title ENH: introduce scope analysis for python feat: introduce scope analysis for python Apr 15, 2025
@MashyBasker MashyBasker marked this pull request as ready for review April 21, 2025 11:53
@MashyBasker MashyBasker changed the title feat: introduce scope analysis for python feat: introduce scope and data-flow analysis for python Apr 24, 2025
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.

feat: Add scope analysis support for Python

1 participant