yatodo 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yatodo-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: yatodo
3
+ Version: 0.1.0
4
+ Summary: A placeholder for code that needs to be implemented. Raises a NotImplementedError with a descriptive message about the call site. Can be inserted anywhere in the code where functionality is yet to be implemented, without basedpyright screaming warnings. The name yatodo is because there is already a todo. 呀土豆?
5
+ Requires-Python: >=3.12
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: build>=1.4.0
8
+ Requires-Dist: flit-core>=3.12.0
9
+ Requires-Dist: twine>=6.2.0
10
+
11
+ # YATODO
12
+
13
+ <center><a href="https://ja.wikipedia.org/wiki/%E3%83%88%E3%83%89">
14
+ <figure>
15
+ <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Adult_male_Northern_Fur_Seal.jpg/250px-Adult_male_Northern_Fur_Seal.jpg" alt="や!トド!" width="200"/>
16
+ <figcaption>や!トド!</figcaption>
17
+ </figure>
18
+ </a>
19
+ </center>
20
+
21
+ YATODO (Yet Another TODO) is a placeholder function for code that needs to be implemented. It raises a NotImplementedError with a descriptive message about the call site. It can be inserted anywhere in the code where functionality is yet to be implemented, without basedpyright screaming warnings. You can use it as a placeholder for function bodies, expressions that are not yet decided, or even insert into the middle of an not fully implemented class.
22
+
yatodo-0.1.0/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # YATODO
2
+
3
+ <center><a href="https://ja.wikipedia.org/wiki/%E3%83%88%E3%83%89">
4
+ <figure>
5
+ <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Adult_male_Northern_Fur_Seal.jpg/250px-Adult_male_Northern_Fur_Seal.jpg" alt="や!トド!" width="200"/>
6
+ <figcaption>や!トド!</figcaption>
7
+ </figure>
8
+ </a>
9
+ </center>
10
+
11
+ YATODO (Yet Another TODO) is a placeholder function for code that needs to be implemented. It raises a NotImplementedError with a descriptive message about the call site. It can be inserted anywhere in the code where functionality is yet to be implemented, without basedpyright screaming warnings. You can use it as a placeholder for function bodies, expressions that are not yet decided, or even insert into the middle of an not fully implemented class.
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "yatodo"
3
+ version = "0.1.0"
4
+ description = "A placeholder for code that needs to be implemented. Raises a NotImplementedError with a descriptive message about the call site. Can be inserted anywhere in the code where functionality is yet to be implemented, without basedpyright screaming warnings. The name yatodo is because there is already a todo. 呀土豆?"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "build>=1.4.0",
9
+ "flit-core>=3.12.0",
10
+ "twine>=6.2.0",
11
+ ]
12
+
13
+ [tool.ruff]
14
+ indent-width = 2
15
+
16
+ [build-system]
17
+ requires = ["flit_core>=3.8"]
18
+ build-backend = "flit_core.buildapi"
@@ -0,0 +1,21 @@
1
+ from typing import NoReturn
2
+
3
+
4
+ def todo(what: str = "") -> NoReturn:
5
+ """
6
+ A placeholder for code that needs to be implemented.
7
+ Raises a NotImplementedError with a descriptive message about the call site.
8
+ Can be inserted anywhere in the code where functionality is yet to be implemented, without basedpyright screaming warnings.
9
+ """
10
+ import inspect
11
+ import sys
12
+
13
+ # Temporarily suppress the traceback to show a cleaner error message.
14
+ sys.tracebacklimit = 0
15
+ caller_frame = inspect.stack()[1]
16
+ message = (
17
+ f"\n\nTODO: {'Implementation needed' if not what else f'{f"Implement {what}" if not what.startswith("Implement") else what}'}\n"
18
+ f" in function '{caller_frame.function}'\n"
19
+ f" at {caller_frame.filename}:{caller_frame.lineno}\n"
20
+ )
21
+ raise NotImplementedError(message)