Skip to content

Commit

Permalink
Merge pull request #60 from carsongee/rc/0.12.1
Browse files Browse the repository at this point in the history
Released 0.12.1
  • Loading branch information
carsongee authored Aug 2, 2018
2 parents 9d138ad + d049d50 commit cb65de8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ This code is heavily based on
Releases
========

0.12.1
~~~~~~

- Corrected a bug preventing this plugin from working with py.test >= 3.7.0.

0.12.0
~~~~~~

Expand Down
15 changes: 8 additions & 7 deletions pytest_pylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,22 @@ def pytest_sessionstart(session):

def pytest_collect_file(path, parent):
"""Collect files on which pylint should run"""
config = parent.config
config = parent.session.config
if not config.option.pylint or config.option.no_pylint:
return None
if path.ext != ".py":
return None
rel_path = get_rel_path(path.strpath, parent.fspath.strpath)
if parent.pylint_config is None:
parent.pylint_files.add(rel_path)
rel_path = get_rel_path(path.strpath, parent.session.fspath.strpath)
session = parent.session
if session.pylint_config is None:
session.pylint_files.add(rel_path)
# No pylintrc, therefore no ignores, so return the item.
return PyLintItem(path, parent)

if not any(basename in rel_path for basename in parent.pylint_ignore):
parent.pylint_files.add(rel_path)
if not any(basename in rel_path for basename in session.pylint_ignore):
session.pylint_files.add(rel_path)
return PyLintItem(
path, parent, parent.pylint_msg_template, parent.pylintrc_file
path, parent, session.pylint_msg_template, session.pylintrc_file
)
return None

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
description='pytest plugin to check source code with pylint',
long_description=open("README.rst").read(),
license='MIT',
version='0.12.0',
version='0.12.1',
author='Carson Gee',
author_email='[email protected]',
url='https://github.com/carsongee/pytest-pylint',
Expand All @@ -28,5 +28,6 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
)

0 comments on commit cb65de8

Please sign in to comment.