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

Introducing DynamicType and removing usage of AutoType from python #1668

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Sep 3, 2024

This PR introduces a new Type, the DynamicType. It is needed for programming languages that do not have static typing, such as TypeScript or Python. In these languages, the type is determined at run-time. Therefore, neither of our existing AutoType or UnknownType types completely catch the dynamics.

This PR adds the basic concept of the type itself and uses it very sparsely for function parameters, which previously were of AutoType.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (0110554) to head (c3e012e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...hofer/aisec/cpg/frontends/python/PythonLanguage.kt 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...otlin/de/fraunhofer/aisec/cpg/graph/TypeBuilder.kt 55.00% <100.00%> (+1.15%) ⬆️
...in/de/fraunhofer/aisec/cpg/graph/types/AutoType.kt 66.66% <ø> (ø)
...de/fraunhofer/aisec/cpg/graph/types/DynamicType.kt 100.00% <100.00%> (ø)
...er/aisec/cpg/frontends/python/ExpressionHandler.kt 83.04% <100.00%> (ø)
...sec/cpg/frontends/python/PythonLanguageFrontend.kt 80.60% <100.00%> (ø)
...hofer/aisec/cpg/frontends/python/PythonLanguage.kt 92.72% <50.00%> (+0.13%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oxisto oxisto changed the title Playing around with a dynamic type Introducing DynamicType Jan 22, 2025
@oxisto oxisto added the publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package label Jan 22, 2025
@oxisto oxisto changed the title Introducing DynamicType Introducing DynamicType and removing usage of AutoType from python Jan 22, 2025
@oxisto oxisto added the python label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant