Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error DCO051 in abstract methods #17

Open
JCHacking opened this issue Oct 24, 2023 · 0 comments
Open

Error DCO051 in abstract methods #17

JCHacking opened this issue Oct 24, 2023 · 0 comments

Comments

@JCHacking
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant