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.4.tar.gz (2.6 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.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yatodo-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 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.4.tar.gz
Algorithm Hash digest
SHA256 a068cee6a4955f5c87c82ab27c236c0b3d3682b22102a0650f7d3a45259e69c8
MD5 3c44b84c92de8d9ea6e4dfb2b0e5a7eb
BLAKE2b-256 d7ed2c315874c049b7d09ecda658b5473022c30e58344c1646f38bf4088d1866

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yatodo-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f0d14115a1a55d3436e5e356677cccd2d28cd778beb8512ad01222ebae9d487
MD5 57581cbc1aa07f79b91c144ea7292108
BLAKE2b-256 66156814ba523ea00aafefa92215fba326042bd0e0d502975b45f60576c2d3bf

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