Skip to content

Commit

Permalink
docs: docstring cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsanima committed Apr 2, 2022
1 parent 2507345 commit e15a31e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
8 changes: 6 additions & 2 deletions src/mdsanima_dev/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def set_complex_color() -> str:
:return: Color console literal variable.
:rtype: str
:usage: Assigning a function to a variable:
:usage:
Assigning a function to a variable:
.. code:: python
Expand Down Expand Up @@ -127,7 +129,9 @@ def show_complex_color(number: bool = False) -> str:
:return: Show all colors in the console output.
:rtype: str
:usage: Function calling:
:usage:
Function calling:
.. code:: python
Expand Down
14 changes: 10 additions & 4 deletions src/mdsanima_dev/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def emoji_get_url_data(emoji_url: str) -> str:
:return: HTML code as string text.
:rtype: str
:usage: Assigning a function by calling to a variable:
:usage:
Assigning a function by calling to a variable:
.. code:: python
Expand Down Expand Up @@ -92,8 +94,10 @@ def emoji_clean_url_data(
:return: Save dictionary data in to `.json` file.
:rtype: dict
:usage: Function call extract and save defaults data in debug mode
and second example also save second ling in debug mode:
:usage:
Function call extract and save defaults data in debug mode and second
example also save second ling in debug mode:
.. code:: python
Expand Down Expand Up @@ -295,7 +299,9 @@ def emoji_load_json_data() -> dict:
and `emoji_modifiers`.
:rtype: dict
:usage: Assigning a function by calling to a variable:
:usage:
Assigning a function by calling to a variable:
.. code:: python
Expand Down
32 changes: 24 additions & 8 deletions src/mdsanima_dev/utils/converts.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,19 @@ def frames_to_timecode(frames: int, fps: float) -> str:
:return: Timecode format.
:rtype: str
:usage: Assigning a function to a variable:
:usage:
Assigning a function to a variable:
.. code:: python
from mdsanima_dev.utils.converts import frames_to_timecode
timecode = frames_to_timecode(240, 24)
print(timecode)
:shell: Command line console script:
:shell:
Command line console script:
.. code:: shell
Expand Down Expand Up @@ -84,15 +88,19 @@ def timecode_to_frames(timecode: str, fps: float) -> int:
:return: Total frames number.
:rtype: int
:usage: Assigning a function to a variable:
:usage:
Assigning a function to a variable:
.. code:: python
from mdsanima_dev.utils.converts import timecode_to_frames
frames = timecode_to_frames("00:00:10:00", 24)
print(frames)
:shell: Command line console script:
:shell:
Command line console script:
.. code:: shell
Expand Down Expand Up @@ -132,14 +140,18 @@ def shell_frames_to_timecode(frames: int, fps: float) -> str:
:return: Timecode format.
:rtype: str
:shell: Command line console script:
:shell:
Command line console script:
.. code:: shell
mdsanima-dev-converts frames-to-timecode --frames 240 --fps 24
mdsanima-dev-converts frames-to-timecode --help
:usage: Assigning a function to a variable:
:usage:
Assigning a function to a variable:
.. code:: python
Expand All @@ -166,14 +178,18 @@ def shell_timecode_to_frames(timecode: str, fps: float) -> str:
:return: Total frames number.
:rtype: str
:shell: Command line shell console script:
:shell:
Command line shell console script:
.. code:: shell
mdsanima-dev-converts timecode-to-frames --time-code 00:00:10:00 --fps 24
mdsanima-dev-converts timecode-to-frames --help
:usage: Assigning a function to a variable:
:usage:
Assigning a function to a variable:
.. code:: python
Expand Down

0 comments on commit e15a31e

Please sign in to comment.