Skip to content

Commit cb65de8

Browse files
authored
Merge pull request #60 from carsongee/rc/0.12.1
Released 0.12.1
2 parents 9d138ad + d049d50 commit cb65de8

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ This code is heavily based on
4949
Releases
5050
========
5151

52+
0.12.1
53+
~~~~~~
54+
55+
- Corrected a bug preventing this plugin from working with py.test >= 3.7.0.
56+
5257
0.12.0
5358
~~~~~~
5459

pytest_pylint.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,22 @@ def pytest_sessionstart(session):
137137

138138
def pytest_collect_file(path, parent):
139139
"""Collect files on which pylint should run"""
140-
config = parent.config
140+
config = parent.session.config
141141
if not config.option.pylint or config.option.no_pylint:
142142
return None
143143
if path.ext != ".py":
144144
return None
145-
rel_path = get_rel_path(path.strpath, parent.fspath.strpath)
146-
if parent.pylint_config is None:
147-
parent.pylint_files.add(rel_path)
145+
rel_path = get_rel_path(path.strpath, parent.session.fspath.strpath)
146+
session = parent.session
147+
if session.pylint_config is None:
148+
session.pylint_files.add(rel_path)
148149
# No pylintrc, therefore no ignores, so return the item.
149150
return PyLintItem(path, parent)
150151

151-
if not any(basename in rel_path for basename in parent.pylint_ignore):
152-
parent.pylint_files.add(rel_path)
152+
if not any(basename in rel_path for basename in session.pylint_ignore):
153+
session.pylint_files.add(rel_path)
153154
return PyLintItem(
154-
path, parent, parent.pylint_msg_template, parent.pylintrc_file
155+
path, parent, session.pylint_msg_template, session.pylintrc_file
155156
)
156157
return None
157158

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
description='pytest plugin to check source code with pylint',
1414
long_description=open("README.rst").read(),
1515
license='MIT',
16-
version='0.12.0',
16+
version='0.12.1',
1717
author='Carson Gee',
1818
author_email='[email protected]',
1919
url='https://github.com/carsongee/pytest-pylint',
@@ -28,5 +28,6 @@
2828
'Programming Language :: Python :: 3.4',
2929
'Programming Language :: Python :: 3.5',
3030
'Programming Language :: Python :: 3.6',
31+
'Programming Language :: Python :: 3.7',
3132
],
3233
)

0 commit comments

Comments
 (0)