Skip to content

Commit eafb423

Browse files
committed
Resolve all Sphinx warnings.
Setup configuration files for ReadTheDocs.
1 parent c1dba7a commit eafb423

File tree

5 files changed

+42
-26
lines changed

5 files changed

+42
-26
lines changed

.readthedocs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
version: 2
6+
7+
build:
8+
image: latest
9+
10+
sphinx:
11+
builder: html
12+
configuration: docs/conf.py
13+
fail_on_warning: true
14+
15+
formats:
16+
- htmlzip
17+
- pdf
18+
- epub
19+
20+
python:
21+
version: 3.8
22+
install:
23+
- requirements: requirements.txt
24+
- requirements: docs/requirements.txt

docs/glossary.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,9 @@ Glossary
5656
So if you come across a project using the original `libtcodpy` you can
5757
delete the `libtcodpy/` folder and then :term:`python-tcod` will load
5858
instead.
59+
60+
color control
61+
color controls
62+
Libtcod's old system which assigns colors to specific codepoints.
63+
This is deprecated in favor of the codes which set the foreground and
64+
background colors directly.

docs/tcod.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

tcod/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class WindowMoved(WindowEvent):
601601
Attributes:
602602
type (str): Always "WINDOWMOVED".
603603
x (int): Movement on the x-axis.
604-
x (int): Movement on the y-axis.
604+
y (int): Movement on the y-axis.
605605
"""
606606

607607
def __init__(self, x: int, y: int) -> None:

tcod/libtcodpy.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ def console_set_custom_font(
10081008
file respectfully.
10091009
10101010
.. deprecated:: 11.13
1011-
Load fonts using :any:`tcod.tileset.load_tileheet` instead.
1011+
Load fonts using :any:`tcod.tileset.load_tilesheet` instead.
10121012
See :ref:`getting-started` for more info.
10131013
"""
10141014
if not os.path.exists(_unicode(fontFile)):
@@ -1692,7 +1692,7 @@ def console_print_frame(
16921692
def console_set_color_control(
16931693
con: int, fore: Tuple[int, int, int], back: Tuple[int, int, int]
16941694
) -> None:
1695-
"""Configure :any:`color controls`.
1695+
"""Configure :term:`color controls`.
16961696
16971697
Args:
16981698
con (int): :any:`Color control` constant to modify.
@@ -2426,7 +2426,7 @@ def heightmap_new(w: int, h: int, order: str = "C") -> np.ndarray:
24262426
following are true::
24272427
* The array is 2 dimensional.
24282428
* The array has the C_CONTIGUOUS or F_CONTIGUOUS flag.
2429-
* The array's dtype is :any:`dtype.float32`.
2429+
* The array's dtype is `dtype.float32`.
24302430
24312431
The returned NumPy array will fit all these conditions.
24322432
@@ -3576,10 +3576,10 @@ def noise_get(
35763576
) -> float:
35773577
"""Return the noise value sampled from the ``f`` coordinate.
35783578
3579-
``f`` should be a tuple or list with a length matching
3580-
:any:`Noise.dimensions`.
3581-
If ``f`` is shoerter than :any:`Noise.dimensions` the missing coordinates
3582-
will be filled with zeros.
3579+
``f`` should be a tuple or list with a length matching the `dimensions`
3580+
attribute of :any:`Noise`.
3581+
If ``f`` is shorter than `dimensions` the missing coordinates will be
3582+
filled with zeros.
35833583
35843584
Args:
35853585
n (Noise): A Noise instance.
@@ -4151,7 +4151,7 @@ def sys_elapsed_milli() -> int:
41514151
int: Time since the progeam has started in milliseconds.
41524152
41534153
.. deprecated:: 2.0
4154-
Use :any:`time.clock` instead.
4154+
Use Python's :mod:`time` module instead.
41554155
"""
41564156
return int(lib.TCOD_sys_elapsed_milli())
41574157

@@ -4164,7 +4164,7 @@ def sys_elapsed_seconds() -> float:
41644164
float: Time since the progeam has started in seconds.
41654165
41664166
.. deprecated:: 2.0
4167-
Use :any:`time.clock` instead.
4167+
Use Python's :mod:`time` module instead.
41684168
"""
41694169
return float(lib.TCOD_sys_elapsed_seconds())
41704170

@@ -4307,8 +4307,8 @@ def sys_register_SDL_renderer(callback: Callable[[Any], None]) -> None:
43074307
Note:
43084308
This callback will only be called by the SDL renderer.
43094309
4310-
The callack will receive a :any:`CData <ffi-cdata>` void* to an
4311-
SDL_Surface* struct.
4310+
The callback will receive a CData `void*` pointer to an
4311+
`SDL_Surface*` struct.
43124312
43134313
The callback is called on every call to :any:`tcod.console_flush`.
43144314

0 commit comments

Comments
 (0)