Skip to content

Commit

Permalink
📝 Use sphinx.ext.todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Sep 2, 2023
1 parent 126469f commit d8e6aae
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 37 deletions.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Configure the Sphinx documentation builder.
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""
from translate_shell import __version__ as version # type: ignore
from translate_shell._metainfo import author, copyright, project
Expand All @@ -26,9 +27,10 @@
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.githubpages",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"myst_parser",
"sphinxcontrib.autofile",
"sphinxcontrib.requirements_txt",
Expand All @@ -37,6 +39,7 @@

myst_heading_anchors = 3
myst_title_to_header = True
todo_include_todos = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
7 changes: 0 additions & 7 deletions docs/misc/acknowledgements.md

This file was deleted.

5 changes: 1 addition & 4 deletions docs/misc/todo.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# TODO

```{eval-bash}
cd ..
shopt -s globstar
scripts/generate-todo.md.pl src/**/*.py
```{todolist}
```
9 changes: 0 additions & 9 deletions scripts/generate-acknowledgements.md.pl

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/generate-todo.md.pl

This file was deleted.

3 changes: 2 additions & 1 deletion src/translate_shell/translators/online/yandex.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Yandex Translator
====================
TODO: Refer https://github.com/soimort/translate-shell
.. todo::
Refer `<https://github.com/soimort/translate-shell>`_
"""
3 changes: 2 additions & 1 deletion src/translate_shell/translators/online/youdao.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Youdao Translator
====================
TODO: Refer https://github.com/ChestnutHeng/Wudao-dict
.. todo::
Refer `<https://github.com/ChestnutHeng/Wudao-dict>`_.
"""
5 changes: 2 additions & 3 deletions src/translate_shell/translators/stardict/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Stardict Translator
======================
TODO: more stardicts.
TODO: Create different subclasses for different dict to get phonetic, explains
better
.. todo::
More stardicts.
"""
import logging
import os
Expand Down
5 changes: 3 additions & 2 deletions src/translate_shell/ui/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
def run(args: Namespace) -> None:
"""Run.
.. todo::
make the last line gray like ``ptpython``.
:param args:
:type args: Namespace
:rtype: None
Expand All @@ -29,8 +32,6 @@ def run(args: Namespace) -> None:
)
process(args, True)
except KeyboardInterrupt:
# skipcq: PYL-W0511
# TODO: make the last line gray like ptpython
print("")
continue
except EOFError:
Expand Down

0 comments on commit d8e6aae

Please sign in to comment.