mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Make pydoc.Doc an abstract class (#7200)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from _typeshed import SupportsWrite
|
||||
from abc import abstractmethod
|
||||
from reprlib import Repr
|
||||
from types import MethodType, ModuleType, TracebackType
|
||||
from typing import IO, Any, AnyStr, Callable, Container, Mapping, MutableMapping, NoReturn, TypeVar
|
||||
@@ -42,11 +43,17 @@ class Doc:
|
||||
PYTHONDOCS: str
|
||||
def document(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
def fail(self, object: object, name: str | None = ..., *args: Any) -> NoReturn: ...
|
||||
@abstractmethod
|
||||
def docmodule(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
@abstractmethod
|
||||
def docclass(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
@abstractmethod
|
||||
def docroutine(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
@abstractmethod
|
||||
def docother(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
@abstractmethod
|
||||
def docproperty(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
@abstractmethod
|
||||
def docdata(self, object: object, name: str | None = ..., *args: Any) -> str: ...
|
||||
def getdocloc(self, object: object, basedir: str = ...) -> str | None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user