10 Commits

Author SHA1 Message Date
Alex Trotta da12618f32 [lint] Bump ruff to 0.16.3
This is a large jump, about 10 months. There are enough changes that I'm
disabling all of the new lints.

One notable feature is that ruff now formats Python within .md files, I
had to correct a few sections that were actually Bazel.

This makes some changes to the wrapper to respect .md files, and to fix
errors being swallowed. We no longer use `--quiet` and instead filter
the output ourselves.

MODULAR_ORIG_COMMIT_REV_ID: 682865af1c774db9426438626d45425c2191239d
2026-08-15 06:28:30 +00:00
zgarapetian 82fd1a21a2 [stdlib] Rename OwnedKwargsDict to StringDict
Rename the container backing variadic `**kwargs` from `OwnedKwargsDict`
to `StringDict`, updating the compiler lowering, stdlib export, Python
bindings, tests, and docs.

This is a breaking change: code that refers to `OwnedKwargsDict` must
switch to `StringDict`.

MODULAR_ORIG_COMMIT_REV_ID: 0302a8b7a21acc153052f81332102192e73121e9
2026-07-15 06:51:23 +00:00
Fraser Cormack dd4326c3a6 [mojo-lang] Make exported fns require an explicit abi
This commit adds a requirement on `@export`ed functions that they be
supplied with an explicit `abi` effect. The compiler currently produces
a warning on missing `abi` effects, which will become an error in a
future release.

MODULAR_ORIG_COMMIT_REV_ID: aba378d06ca59a60ba2b589704bbda1479b244c3
2026-06-10 07:58:48 +00:00
Conor Bronsdon 474eaeb64a [Skills] Fix mojo-python-interop for fn deprecation and edge cases
Fixes three issues in `mojo-python-interop` found during structured
skills evaluation.

1. All extension module examples updated from `fn` to `def` (11
instances), resolving contradiction with `mojo-syntax`.
2. Added `Python.dict()` Bool limitation note with WRONG/CORRECT
workaround.
3. Added `main()` + shared-lib constraint to the `mojo.importer`
section.

MODULAR_ORIG_COMMIT_REV_ID: 20b1de3db8695afe4bb8d9ec912ca9034aab7507
2026-03-31 06:50:58 +00:00
Conor Bronsdon aaf208daf3 [Skills] Fix gaps found in structured skills evaluation
Fixes three agent skill files based on a structured eval where published
skills were used to build a Mojo CLI tool with Python FFI. Every
compilation failure was logged and traced back to skill gaps.

- **mojo-syntax**: String indexing (`s[byte=i]`) and universal `std.`
prefix added to WRONG/CORRECT table — the two most common compilation
failures
- **new-modular-project**: System prerequisites (gcc per OS, WSL2
guidance) and Python FFI `pixi add` patterns
- **mojo-python-interop**: Common FFI patterns — env var access, lambda
sort keys via `Python.evaluate`, dict `.get()`

All changes use WRONG/CORRECT pairs per editorial guidelines. 87 lines
across 3 independent files.

MODULAR_ORIG_COMMIT_REV_ID: 39abb66f9e1f494e3a0d28299ed8052e37f02d15
2026-03-28 06:35:45 +00:00
Alex Trotta 7f3f3222f5 [lint] Enable table formatting in markdown
Using `aligned-no-space` style since it creates the smallest diff, I
don't think we care about the exact style.

MODULAR_ORIG_COMMIT_REV_ID: 0672b3c5baf992e5d7cfb7205b7ba3f5f786752f
2026-03-28 06:35:42 +00:00
Alex Trotta 9a6c16b218 [lint] Apply MD013 (word wrapping) to everywhere except oss/modular
MODULAR_ORIG_COMMIT_REV_ID: 08b190df5019430e6c3f44155f04727e40227f8e
2026-03-28 06:35:39 +00:00
Alex Trotta 4a92705e83 Revert "[lint] Auto-apply rumdl fixes"
This broke some formatting in the docs build, reverting for now while we
investigate.

MODULAR_ORIG_COMMIT_REV_ID: 03fecb8a1f46ab64ebb53451a3fb020537a47021
2026-03-25 22:25:25 +00:00
Alex Trotta 5ac1a751c5 [lint] Auto-apply rumdl fixes
MODULAR_ORIG_COMMIT_REV_ID: fe0c3e5e3dae71de2e25fd2a9f963256f7438f47
2026-03-24 06:29:02 +00:00
Brad Larson ab271e86e1 [Skills] Add new Python interop skill, edit other skills based on
testing
We were starting to get more content added into the main `mojo-syntax`
skill related to Python interop, so it was worth pulling that out into a
separate skill that is activated only when needed for interacting with
Python code. After testing, the found some places where the models
struggled with CUDA translation and enhanced the guidance to avoid those
issues.

MODULAR_ORIG_COMMIT_REV_ID: a766e17f719eb59bac58ad3d99129d876ad79a91
2026-03-11 14:35:01 +00:00