Skip to content

Commit

Permalink
Fix QA
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed May 31, 2020
1 parent 56347b8 commit 7253e2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pytest_sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
]


def flatten(l):
for x in l:
def flatten(seq):
for x in seq:
if isinstance(x, (list, tuple)):
for y in flatten(x):
yield y
Expand Down Expand Up @@ -589,8 +589,8 @@ def _get_decoded_crashline(self, report):
return crashline

def _get_lineno_from_report(self, report):
# Doctest failure reports changed the attribute where longrepr were stored in pytest>3.10
# to reprlocation_lines, a list of (ReprFileLocation, lines)
# Doctest failures in pytest>3.10 are stored in
# reprlocation_lines, a list of (ReprFileLocation, lines)
try:
location, lines = report.longrepr.reprlocation_lines[0]
return location.lineno
Expand Down
1 change: 0 additions & 1 deletion test_sugar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import pytest
import re
from distutils.version import LooseVersion
from pytest_sugar import strip_colors

pytest_plugins = "pytester"
Expand Down

0 comments on commit 7253e2c

Please sign in to comment.