Skip to content

Commit 24b6ca4

Browse files
authored
hotfix: update overview.mdx (#235)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
1 parent 80a727f commit 24b6ca4

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

docs/introduction/overview.mdx

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,19 @@ def baz():
3636
pass
3737
`
3838

39+
<iframe
40+
width="100%"
41+
height="370px"
42+
scrolling="no"
43+
src={`https://codegen.sh/embedded/codemod/?code=${encodeURIComponent(
44+
metaCode
45+
)}&input=${encodeURIComponent(code)}`}
46+
style={{
47+
backgroundColor: "#15141b",
48+
}}
49+
className="rounded-xl"
50+
></iframe>
3951

40-
```python
41-
from codegen import Codebase
42-
43-
# Codegen builds a complete graph connecting
44-
# functions, classes, imports and their relationships
45-
codebase = Codebase("./")
46-
47-
# Work with code without dealing with syntax trees or parsing
48-
for function in codebase.functions:
49-
# Comprehensive static analysis for references, dependencies, etc.
50-
if not function.usages:
51-
# Auto-handles references and imports to maintain correctness
52-
function.remove()
53-
54-
# Fast, in-memory code index
55-
codebase.commit()
56-
```
5752

5853
<Note>
5954
Codegen handles complex refactors while maintaining correctness, enabling a broad set of advanced code manipulation programs.

0 commit comments

Comments
 (0)