Skip to main content

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. It provides todo, todof, todoc for different levels of todo.

Project description

YATODO

や!トド!
や!トド!

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.

Provides three functions: todo(what: str), todof(msg: str), and todoc(msg: str). todo(what: str) can be inserted anywhere in the code where functionality is yet to be implemented, without basedpyright screaming warnings. todof(msg: str) is a decorator that can be used to mark entire functions as TODOs. When the decorated function is called, it raises a NotImplementedError with a descriptive message about the call site. todoc(msg: str) is a class decorator that can be used to mark entire classes as TODOs. When any method of the decorated class is called, it raises a NotImplementedError with a descriptive message about the call site.

Usage

from yatodo import todo, todof, todoc

# Example 1: Using todo as a placeholder for a function body
def my_function():
    todo("Implement the logic for my_function")

# Example 2: Using todo as a placeholder in an expression
def calculate_area(radius: float) -> float:
    return 3.14 * todo() * todo()

# Example 3: Using todof to mark an entire function as a TODO
@todof("This function is not implemented yet")
def unimplemented_function():
    pass

# Example 4: Using todoc to mark an entire class as a TODO
@todoc("This class is not implemented yet")
class UnimplementedClass:
    def method_one(self):
        pass
    def method_two(self):
        pass

    @todof("This method is not implemented yet")
    def already_decorated_method(self):
        pass

    @staticmethod
    @todof("This static method is not implemented yet")
    def already_decorated_static_method():
        pass

    @classmethod
    @todof("This class method is not implemented yet")
    def already_decorated_class_method(cls):
        pass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yatodo-0.1.6.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yatodo-0.1.6-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file yatodo-0.1.6.tar.gz.

File metadata

  • Download URL: yatodo-0.1.6.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for yatodo-0.1.6.tar.gz
Algorithm Hash digest
SHA256 471437a7bf3008b281222d0df98d378374f768752169cd86fd9cd92164445e72
MD5 2047b2460c06b7e7486ba3a450a1f8d5
BLAKE2b-256 33044bca454f160791d19c46b305ebf74328fa4913e4e780648f8f5b57332dd9

See more details on using hashes here.

File details

Details for the file yatodo-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: yatodo-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for yatodo-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bdf7133c39639a12e40443b17b4231f5d2ca13046314c3856725aed4e5438841
MD5 bc7fb9b9ddd6da706979edc633ab11c4
BLAKE2b-256 0f51bb8c6f8acc471153db20371af45462d1d882d696115a6d8f5996b20c6aee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page