Skip to content

Commit

Permalink
pragma: no branch
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki committed Nov 14, 2023
1 parent bfe8ca4 commit f76edaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dirty_equals/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _pprint_format(self, pprinter: PrettyPrinter, stream: io.StringIO, *args: An
# Check that the protected attribute _dispatch exists to be safe and to make linters happy.
# The reason we modify _dispatch rather than _format
# is that pytest sometimes uses a subclass of PrettyPrinter which overrides _format.
if hasattr(PrettyPrinter, '_dispatch'):
if hasattr(PrettyPrinter, '_dispatch'): # pragma: no branch
PrettyPrinter._dispatch[DirtyEquals.__repr__] = lambda pprinter, obj, *args, **kwargs: obj._pprint_format(
pprinter, *args, **kwargs
)
Expand Down

0 comments on commit f76edaa

Please sign in to comment.