Skip to content

Commit

Permalink
Setting __docformat__ to "restructuredtext"
Browse files Browse the repository at this point in the history
  • Loading branch information
arnauddupuis committed Oct 23, 2020
1 parent e520b97 commit 8d3e6c8
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions pygamelib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""
pygamelib is a module aimed at helping people to learn Python with a fun and
easy game development framework.
Expand Down
1 change: 1 addition & 0 deletions pygamelib/actuators.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""This module contains the base classes for simple and advanced actuators.
These classes are the base contract for actuators.
If you wish to create your own one, you need to inheritate from one of these base class.
Expand Down
1 change: 1 addition & 0 deletions pygamelib/assets/graphics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""
.. Important:: The Graphics module was introduced in version 1.1.0.
Expand Down
1 change: 1 addition & 0 deletions pygamelib/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""
The Game.py module has only one class: Game. It is what could be called the game engine.
It holds a lot of methods that helps taking care of some complex mechanics behind the
Expand Down
1 change: 1 addition & 0 deletions pygamelib/board_items.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""This module contains the basic board items classes.
.. autosummary::
Expand Down
1 change: 1 addition & 0 deletions pygamelib/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""
Accessible constants are the following:
Expand Down
18 changes: 5 additions & 13 deletions pygamelib/engine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""
The game module contains the core classes for a game:
Expand Down Expand Up @@ -809,9 +810,7 @@ def _move_complex(self, item, direction, step=1):
] = None
# Finally, place the item at its new position
self.place_item(
item,
projected_position.row,
projected_position.column,
item, projected_position.row, projected_position.column,
)
else: # pragma: no cover
# This is actually test in tests/test_board.py in function test_move()
Expand Down Expand Up @@ -1033,9 +1032,7 @@ def _move_simple(self, item, direction, step=1):
self._overlapped_matrix[item.pos[0]][item.pos[1]] = None
else:
self.place_item(
self.generate_void_cell(),
item.pos[0],
item.pos[1],
self.generate_void_cell(), item.pos[0], item.pos[1],
)
self.place_item(item, new_row, new_column)
else:
Expand Down Expand Up @@ -2105,8 +2102,7 @@ def actuate_projectiles(self, level_number, elapsed_time=0.0):
# nothing blocks its path. And that's where it will be
# unless we detect a collision.
pp = base.Vector2D(
proj.row + dm.row,
proj.column + dm.column,
proj.row + dm.row, proj.column + dm.column,
)
v = proj.position_as_vector()
if (
Expand Down Expand Up @@ -3077,11 +3073,7 @@ def display_line(self, *text, end="\n", file=sys.stdout, flush=False):
"""
# Funny how the documentation is waaayyy bigger than the code ;)
print(
*text,
self.terminal.clear_eol,
end=end,
file=file,
flush=flush,
*text, self.terminal.clear_eol, end=end, file=file, flush=flush,
)

def display_at(
Expand Down
1 change: 1 addition & 0 deletions pygamelib/gfx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""This is the gfx sub-module.
This module provide classes for more "advanced graphics" capabilities (in the terminal
context).
Expand Down
1 change: 1 addition & 0 deletions pygamelib/gfx/core.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__docformat__ = "restructuredtext"
"""This module contains the core classes for the "graphic" system.
.. autosummary::
Expand Down
2 changes: 2 additions & 0 deletions pygamelib/gfx/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import random
import uuid

__docformat__ = "restructuredtext"


class BaseParticle(board_items.Movable):
"""
Expand Down

0 comments on commit 8d3e6c8

Please sign in to comment.