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

Replace NamedTuple with plain class #267

Merged
merged 1 commit into from Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/blacken_docs/__init__.py
Expand Up @@ -6,7 +6,6 @@
import textwrap
from typing import Generator
from typing import Match
from typing import NamedTuple
from typing import Sequence

import black
Expand Down Expand Up @@ -88,9 +87,10 @@
TRAILING_NL_RE = re.compile(r"\n+\Z", re.MULTILINE)


class CodeBlockError(NamedTuple):
offset: int
exc: Exception
class CodeBlockError:
def __init__(self, offset: int, exc: Exception) -> None:
self.offset = offset
self.exc = exc


def format_str(
Expand Down