-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python] add type hints in docs/conf.py #4526
Conversation
docs/conf.py
Outdated
@@ -197,7 +198,7 @@ def run(self): | |||
latex_logo = str(CURR_PATH / 'logo' / 'LightGBM_logo_black_text_small.png') | |||
|
|||
|
|||
def generate_doxygen_xml(app): | |||
def generate_doxygen_xml(app: Any) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use sphinx.application.Sphinx
for app
(here and at L246 and L308)?
https://www.sphinx-doc.org/en/master/extdev/appapi.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, can do. I was just following the documentation below.
Parameters
----------
app : object
The application object representing the Sphinx process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can update docstring as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! Updated in 81f0a82
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Adds type hints to code in
docs/conf.py
, as part of #3756.Notes for Reviewers
#3756 has been open for about 8 months now, so I think it's ok for maintainers to start picking up the work to finish it and not wait any longer for outside contributors to find it from searches for
good first issue
.Better type hints will improve the ability of
mypy
to catch issues (#3868 ).