Skip to content
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

update docstrings so that sphinx don't throw warnings anymore #983

Merged
merged 1 commit into from Sep 28, 2020

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Sep 28, 2020

it's still not perfect, but much better

params (dict): Lookup parameters (i.e. parent_id for nested entities) (optional)
foreman_spec (dict): Description of the entity structure
Return value:
The new current state if the entity
Copy link
Member Author

Choose a reason for hiding this comment

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

I took the liberty to fix that typo XD

Comment on lines 871 to 872
:return: The new current state of the entity
:rtype: dict
Copy link
Member Author

Choose a reason for hiding this comment

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

this is IMHO wrong, the method returns None

Copy link
Member

Choose a reason for hiding this comment

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

With None being "the new state of the entity", so it is technically NoneType, but we always meant Union(NoneType, dict).

Copy link
Member Author

Choose a reason for hiding this comment

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

So that's also what sphinx-doc/sphinx#1874 recommends and I've implemented it now ;)

it's still not perfect, but much better
@evgeni evgeni merged commit d2d8e1f into theforeman:develop Sep 28, 2020
@evgeni evgeni deleted the docstring-formatting branch September 28, 2020 09:46
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.

None yet

2 participants