Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit c34202f

Browse files
committed
update README and add CHANGELOG
1 parent 2aed435 commit c34202f

File tree

3 files changed

+65
-5
lines changed

3 files changed

+65
-5
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
### Fixed
5+
- Fix fixtures defined with `@pytest.yield_fixture` decorator still showing FP
6+
7+
## [0.1.1] - 2020-05-19
8+
### Fixed
9+
- Fix crashes when `*args` or `**kwargs` is used in FuncDef
10+
11+
## [0.1] - 2020-05-18
12+
### Added
13+
- Suppressing FP `unused-import` with tests
14+
- Suppressing FP `unused-argument` with tests
15+
- Suppressing FP `redefined-outer-scope` with tests
16+
- Add CI/CD configuration with Travis CI

README.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# pylint-pytest
22

3-
A Pylint plugin to suppress false positive pylint warnings about pytest fixtures.
3+
[![PyPI version fury.io](https://badge.fury.io/py/pylint-pytest.svg)](https://pypi.python.org/pypi/pylint-pytest/)
4+
[![Travis CI](https://travis-ci.org/reverbc/pylint-pytest.svg?branch=master)](https://travis-ci.org/reverbc/pylint-pytest)
5+
6+
A Pylint plugin to suppress pytest-related false positives.
47

58
## Installation
69

10+
Requirements:
11+
12+
- `pylint`
13+
- `pytest>=4.6`
14+
715
To install:
816

917
```bash
@@ -12,27 +20,55 @@ $ pip install pylint-pytest
1220

1321
## Usage
1422

23+
Enable via command line option `--load-plugins`
24+
1525
```bash
1626
$ pylint --load-plugins pylint_pytest <path_to_your_sources>
1727
```
1828

19-
Or
29+
Or in `pylintrc`:
30+
31+
```ini
32+
[MASTER]
33+
load-plugins=pylint_pytest
34+
```
2035

2136
## Suppressed Pylint Warnings
2237

2338
### `unused-argument`
2439

40+
FP when a fixture is used in an applicable function but not referenced in the function body, e.g.
2541

42+
```python
43+
def test_something(conftest_fixture): # <- Unused argument 'conftest_fixture'
44+
assert True
45+
```
2646

2747
### `unused-import`
2848

49+
FP when an imported fixture is used in an applicable function, e.g.
50+
51+
```python
52+
from fixture_collections import imported_fixture # <- Unused imported_fixture imported from fixture_collections
53+
54+
def test_something(imported_fixture):
55+
...
56+
```
2957

3058
### `redefined-outer-name`
3159

60+
FP when an imported/declared fixture is used in an applicable function, e.g.
61+
62+
```python
63+
from fixture_collections import imported_fixture
64+
65+
def test_something(imported_fixture): # <- Redefining name 'imported_fixture' from outer scope (line 1)
66+
...
67+
```
3268

33-
## Tests
69+
## Changelog
3470

35-
TBD
71+
See [CHANGELOG](CHANGELOG.md).
3672

3773
## License
3874

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4+
from os import path
45
from setuptools import setup
56

67

8+
here = path.abspath(path.dirname(__file__))
9+
with open(path.join(here, 'README.md')) as fin:
10+
long_description = fin.read()
11+
12+
713
setup(
814
name='pylint-pytest',
915
version='0.1.1',
@@ -13,7 +19,9 @@
1319
maintainer_email='[email protected]',
1420
license='MIT',
1521
url='https://github.com/reverbc/pylint-pytest',
16-
description='A Pylint plugin to suppress pytest fixture related false positive warnings.',
22+
description='A Pylint plugin to suppress pytest-related false positives.',
23+
long_description=long_description,
24+
long_description_content_type='text/markdown',
1725
py_modules=['pylint_pytest'],
1826
install_requires=[
1927
'pylint',

0 commit comments

Comments
 (0)