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

The arguments to the __init__ method, which can only be passed as keyword-only arguments, are documented as having a default of None. #7510

Closed
pynista opened this issue Apr 19, 2020 · 1 comment

Comments

@pynista
Copy link

pynista commented Apr 19, 2020

Describe the bug
The arguments to the init method, which can only be passed as keyword-only arguments, are documented as having a default of None.

To Reproduce

class Foo:
    """Test class."""
    def __init__(self, a: int, *, b: str, c: float):
        """Init Foo

        :param a: first argument
        :type a: int

        :param b: second argument
        :type b: str

        :param c: third argument
        :type c: float
        """
        pass
Foo
---
.. module:: pytelegrambots.for_so

.. autoclass:: Foo
    :members:
    :special-members: __init__

Result:
Text
Expected behavior
A clear and concise description of what you expected to happen:
(edited screenshot)
Text

Environment info

  • OS: [Ubuntu 18.04]
  • Python version: [3.7.2]
  • Sphinx version: [sphinx-build 3.0.1]
  • Sphinx extensions: [sphinx.ext.autodoc, 'sphinx.ext.viewcode']
@pynista pynista changed the title The arguments to the __init__ method, which can only be passed as keyword-only arguments, are documented as having a default of None. The arguments to the __init__ method, which can only be passed as keyword-only arguments, are documented as having a default of None. Apr 19, 2020
@pynista pynista changed the title The arguments to the __init__ method, which can only be passed as keyword-only arguments, are documented as having a default of None. The arguments to the __init__ method, which can only be passed as keyword-only arguments, are documented as having a default of None. Apr 19, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 19, 2020
@tk0miya tk0miya added this to the 3.0.2 milestone Apr 19, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 19, 2020
tk0miya added a commit that referenced this issue Apr 19, 2020
Fix #7510: py domain: keyword-only arguments are wrongly rendered
@tk0miya
Copy link
Member

tk0miya commented Apr 19, 2020

Fixed by #7511. Thank you for reporting!

@tk0miya tk0miya closed this as completed Apr 19, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants