-
Notifications
You must be signed in to change notification settings - Fork 20
Update _get_application_import_names to have fall-backs #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Michael Johansen <michael.johansen@ni.com>
|
Thank you for contributing! 👋 |
Signed-off-by: Michael Johansen <michael.johansen@ni.com>
We don't currently have tests that cover this... I wonder if the right way to do this would be to add some example pyproject.toml files into the test_fix.py example folders that set or don't set this value with a name ("foo"? ) so that's it's part of the testing that the name gets treated as third-party if not set, but firstparty if set. |
Are those snapshot folders actually |
|
@mjohanse-emr @mshafer-NI Does this feature really need end-to-end CLI testing? How about writing unit tests for the Also, as an alternative to saving multiple pyproject.tomls as test assets, you could write setup code that copies the root pyproject.toml and use tomlkit to modify it, or generate one on the fly, or use toml embedded as multi-line strings. That would prevent tooling such as Renovate from seeing a bunch of pyproject.toml files. |
Signed-off-by: Michael Johansen <michael.johansen@ni.com>
I added some unit tests that create a "pyproject object" that is just a dictionary and run |
Signed-off-by: Michael Johansen <michael.johansen@ni.com>
Fixes #233
Update the styleguide to check the following fields in descending priority order to find the application name.
tool.ni-python-styleguide.application-import-namesproject.import-namesproject.nametool.poetry.nameI created some unit tests for
_get_application_import_names()