Skip to content

Commit ea71f6f

Browse files
committed
style(src): improve the head of all modules
1 parent 5e8365c commit ea71f6f

26 files changed

+111
-51
lines changed

maliang/__init__.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
1-
# MIT License
1+
# Copyright (c) 2023-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
23

3-
# Copyright (c) 2022 Xiaokang2022
4-
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
12-
# The above copyright notice and this permission notice shall be included in
13-
# all copies or substantial portions of the Software.
14-
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
# SOFTWARE.
22-
23-
"""A lightweight UI framework based on `tkinter` with all UI drawn in `Canvas`.
4+
"""A lightweight UI framework based on ``tkinter`` with all UI drawn in Canvas.
245
256
* Website: https://xiaokang2022.github.io/maliang/
267
* GitHub: https://github.com/Xiaokang2022/maliang

maliang/animation/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
"""A subpackage that provides animation-related features.
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
4+
"""A subpackage of ``maliang`` that provides animation-related features.
25
36
A highly customizable animation base class and related subclasses are provided,
47
as well as highly customizable control functions. In addition, control
5-
functions also applies to the related functions of the `color` subpackage.
8+
functions also applies to the related functions of the ``color`` subpackage.
69
"""
710

811
from .animations import *

maliang/animation/animations.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""Base and standard animation classes.
25
36
The animation base class can be inherited or called directly. Other standard

maliang/animation/controllers.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""Controller generator and standard control functions.
25
36
Definition of control function:
47
5-
```python
6-
def f(t: float) -> float: ...
7-
```
8+
def control_function(t: float) -> float:
9+
\"""Control function for animation.
10+
11+
Args:
12+
t: the percentage of time
813
9-
* `t`: 0% ~ 100%, indicates the percentage of time
10-
* return: real number, indicates a multiple of the cardinality of the animation
14+
Returns:
15+
a multiple of the cardinality of the animation
16+
\"""
1117
"""
1218

1319
from __future__ import annotations as _

maliang/color/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""A subpackage that provides color-related features.
25
36
Supports the processing of color strings in RGB and HSL formats, as well as the

maliang/color/colortable.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""Mapping table between the color names and the RGB codes."""
25

36
from __future__ import annotations as _

maliang/color/convert.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""Convert a format of color to another format.
25
36
* RGB: tuple, (Red, Green, Blue)

maliang/color/hsl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""Some functions about HSL codes."""
25

36
from __future__ import annotations as _

maliang/color/rgb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""Some functions about RGB codes."""
25

36
from __future__ import annotations as _

maliang/core/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024-2025 Xiaokang2022. All rights reserved.
2+
# Licensed under the MIT License. See LICENSE in the project root for details.
3+
14
"""The core code, you can see the general framework here.
25
36
Most of the abstract and base classes are defined here.

0 commit comments

Comments
 (0)