Skip to content

Fix nonexistent key in download example [DEVREL-7]#34

Open
enjojoy wants to merge 1 commit intomainfrom
devrel-7-fix-usage-of-nonexistent-key-in-download-example
Open

Fix nonexistent key in download example [DEVREL-7]#34
enjojoy wants to merge 1 commit intomainfrom
devrel-7-fix-usage-of-nonexistent-key-in-download-example

Conversation

@enjojoy
Copy link
Collaborator

@enjojoy enjojoy commented Mar 6, 2026

Summary

The Complete Example section in docs/files.mdx used file_info['name'] to construct output filenames, but 'name' is not a valid key of the kodosumi file info dict (which only has 'path' and 'size').

Changes

  • Added from pathlib import Path import to the complete example code block
  • Replaced file_info['name'] with Path(file_info['path']).name in two places within the ## Complete Example section of docs/files.mdx

This correctly extracts the filename from the path field using pathlib, which is the idiomatic Python approach.

Linear Issue

https://linear.app/sokosumi/issue/DEVREL-7

@linear
Copy link

linear bot commented Mar 6, 2026

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.

1 participant