Skip to content

Error DCO051 in abstract methodsΒ #17

@JCHacking

Description

@JCHacking

If I have the following code:

"""Actions that we can perform on to a fragment."""
from abc import ABC, abstractmethod
from typing import Optional, Sequence

from py_web_gui.action.types import Key, ModificationKey


class ActionBase(ABC):
    """Actions that we can perform onto a fragment.

    Attributes:
        _css_query: CSS Query for fragment
    """

    def __init__(self, css_query: str):
        """Actions that we can perform onto a fragment.

        Args:
            css_query: CSS Query for fragment
        """
        self._css_query: str = css_query

    @abstractmethod
    async def fill(self, text: str, time_wait: int = 0) -> None:
        """Write text into the fragment.

        Args:
            text: What we want to write.
            time_wait: Time to wait for the action to complete. (Milliseconds)

        Raises:
            InvalidActionError: Fragment not support fill
        """
        pass

It fails me because this method doesn't throw the exception, but it's really just for documentation, and everyone who implements it should throw it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions