Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add abstractmethod
  • Loading branch information
Avasam committed Feb 7, 2023
commit 32a8aac9898b5ab1c810ce754f7306fc9c14a2ed
10 changes: 8 additions & 2 deletions stubs/fpdf2/fpdf/_fonttools_shims.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# from fontTools.misc.loggingTools
from abc import ABCMeta, abstractmethod
from collections.abc import Mapping
from logging import Logger
from typing import Protocol
Expand All @@ -20,17 +21,22 @@ class LogMixin:

# from fontTools.pens.basePen
class AbstractPen:
@abstractmethod
def moveTo(self, pt: tuple[float, float]) -> None: ...
@abstractmethod
def lineTo(self, pt: tuple[float, float]) -> None: ...
@abstractmethod
def curveTo(self, *points: tuple[float, float]) -> None: ...
@abstractmethod
def qCurveTo(self, *points: tuple[float, float]) -> None: ...
def closePath(self) -> None: ...
def endPath(self) -> None: ...
@abstractmethod
def addComponent(self, glyphName: str, transformation: tuple[float, float, float, float, float, float]) -> None: ...

class LoggingPen(LogMixin, AbstractPen): ...
class LoggingPen(LogMixin, AbstractPen, metaclass=ABCMeta): ...

class DecomposingPen(LoggingPen):
class DecomposingPen(LoggingPen, metaclass=ABCMeta):
skipMissingComponents: bool
glyphSet: _TTGlyphSet | None
def __init__(self, glyphSet: _TTGlyphSet | None) -> None: ...
Expand Down