Skip to content

Don't crash introspect when there is no [tool.spin.kwargs] table - #333

Open
abhishekcpp007 wants to merge 1 commit into
scientific-python:mainfrom
abhishekcpp007:fix/introspect-without-kwargs
Open

abhishekcpp007 wants to merge 1 commit into
scientific-python:mainfrom
abhishekcpp007:fix/introspect-without-kwargs

Conversation

@abhishekcpp007

Copy link
Copy Markdown

introspect reads get_config().get("tool.spin.kwargs"), which is None when a project has no [tool.spin.kwargs] table, and then checks if cmd_func.spec in overrides. So spin introspect build prints the source and dies with:

TypeError: argument of type 'NoneType' is not a container or iterable

__main__.py already reads the same key with a {} default, so this does the same.

example_pkg_src has no kwargs table, so I added introspect to its commands and a test_introspect_without_kwargs test that uses it.

This branch has not been deployed

No deployments
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