Skip to content

Add missing parameter to simple tiled server docstring, fix type hint, allow for both lists and strings, add unit test for readable storage#1321

Open
jwlodek wants to merge 4 commits intobluesky:mainfrom
jwlodek:simple-tiled-server-improvements
Open

Add missing parameter to simple tiled server docstring, fix type hint, allow for both lists and strings, add unit test for readable storage#1321
jwlodek wants to merge 4 commits intobluesky:mainfrom
jwlodek:simple-tiled-server-improvements

Conversation

@jwlodek
Copy link
Copy Markdown
Member

@jwlodek jwlodek commented Mar 27, 2026

Typically, when we use SimpleTiledServer it is in a dev environment where the easiest thing to do is just point readable_storage at /tmp (or tmp_path in unit tests). Requiring a list and having the user enter [/tmp] I think is unnecessary.

Also, readable_storage was missing from the docstring, and the existing type hint was actually incorrect, since it did not specify that a list was required.

Checklist

  • Add a Changelog entry
  • Add the ticket number which this PR closes to the comment section

…, allow for both lists and strings, add unit test for readable storage
Copy link
Copy Markdown
Contributor

@genematx genematx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds sensible to me.

port: int = 0,
readable_storage: Optional[Union[str, pathlib.Path]] = None,
readable_storage: Optional[
Union[str, pathlib.Path, list[str], list[pathlib.Path]]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably Union[str, pathlib.Path, list[Union[str,pathlib.Path]]] is more accurate

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.

2 participants