Skip to content

Commit 990e119

Browse files
jayhackcodegen-bot
and
codegen-bot
authored
hotfix: removes dynamic widget from home page (#232)
# 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 Co-authored-by: codegen-bot <[email protected]>
1 parent ec734ec commit 990e119

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

docs/introduction/overview.mdx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,24 @@ 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>
39+
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+
```
5157

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

0 commit comments

Comments
 (0)