[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
# pylint-behave
**`pylint-behave`** is a Pylint plugin to improve code analysis when analyzing a Behave project.
# Table of contents
* [Get started](#get-started)
* [Installation](#installation)
* [Usage](#usage)
* [Features](#features)
* [Testing](#testing)
* [Requirements](#requirements)
* [Set Python versions](#set-python-versions)
* [Run](#run)
* [License](#license)
* [Changelog](#changelog)
# Get started
## Installation
This plugin can be simply installed by running:
```bash
pip install pylint-behave
```
if you want to install from a source distribution:
```bash
git clone https://github.com/eccanto/pylint-behave.git
cd pylint-behave/
python setup.py install
```
## Usage
Ensure **`pylint-behave`** is installed and on your **`PATH`**:
```bash
pylint --load-plugins=pylint_behave [options..] <path_to_your_code>
```
# Features
- Prevents warnings about *redefined names* in the Behave steps (**`step_impl`**).
```python
@step('step 1')
def step_impl():
pass
@given('given 1')
def step_impl():
pass
```
- Prevents warnings about *no names* in the Behave module (**`step`**, **`given`**, **`when`**, etc.).
```python
from behave import step, given
```
# Testing
## Requirements
```bash
pip3 install -r requirements.txt
```
## Set Python versions
1. Install [pyenv](https://github.com/pyenv/pyenv)
2. Install python versions:
```bash
for python_version in "3.7" "3.8" "3.9" "3.10" "3.11" "3.12" ; do pyenv install ${python_version}; done
```
3. Enable python versions:
```bash
pyenv local "3.7" "3.8" "3.9" "3.10" "3.11" "3.12"
```
## Run
We use [tox](https://tox.wiki/en/latest/) and [pytest](https://docs.pytest.org/en/6.2.x) to run the
test suite:
```bash
tox
```
to run the test suite for a particular Python version, you can do:
```bash
tox -e py37
```
# License
[MIT](./LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/eccanto/pylint-behave",
"name": "pylint-behave",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "pylint, behave, plugin",
"author": "Erik Ccanto",
"author_email": "ccanto.erik@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/85/7c/a15d94dec7d8a6f2dfa36eb8a1517b87f40f463a5035622ce56a63480cd6/pylint_behave-1.0.3.tar.gz",
"platform": null,
"description": "[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n# pylint-behave\n\n**`pylint-behave`** is a Pylint plugin to improve code analysis when analyzing a Behave project.\n\n# Table of contents\n\n* [Get started](#get-started)\n * [Installation](#installation)\n * [Usage](#usage)\n* [Features](#features)\n* [Testing](#testing)\n * [Requirements](#requirements)\n * [Set Python versions](#set-python-versions)\n * [Run](#run)\n* [License](#license)\n* [Changelog](#changelog)\n\n# Get started\n\n## Installation\n\nThis plugin can be simply installed by running:\n\n```bash\npip install pylint-behave\n```\n\nif you want to install from a source distribution:\n\n```bash\ngit clone https://github.com/eccanto/pylint-behave.git\ncd pylint-behave/\npython setup.py install\n```\n\n## Usage\n\nEnsure **`pylint-behave`** is installed and on your **`PATH`**:\n\n```bash\npylint --load-plugins=pylint_behave [options..] <path_to_your_code>\n```\n\n# Features\n\n- Prevents warnings about *redefined names* in the Behave steps (**`step_impl`**).\n ```python\n @step('step 1')\n def step_impl():\n pass\n\n\n @given('given 1')\n def step_impl():\n pass\n\n ```\n\n- Prevents warnings about *no names* in the Behave module (**`step`**, **`given`**, **`when`**, etc.).\n ```python\n from behave import step, given\n ```\n\n# Testing\n\n## Requirements\n\n```bash\npip3 install -r requirements.txt\n```\n\n## Set Python versions\n\n1. Install [pyenv](https://github.com/pyenv/pyenv)\n2. Install python versions:\n ```bash\n for python_version in \"3.7\" \"3.8\" \"3.9\" \"3.10\" \"3.11\" \"3.12\" ; do pyenv install ${python_version}; done\n ```\n3. Enable python versions:\n ```bash\n pyenv local \"3.7\" \"3.8\" \"3.9\" \"3.10\" \"3.11\" \"3.12\"\n ```\n\n## Run\n\nWe use [tox](https://tox.wiki/en/latest/) and [pytest](https://docs.pytest.org/en/6.2.x) to run the\ntest suite:\n\n```bash\ntox\n```\n\nto run the test suite for a particular Python version, you can do:\n\n\n```bash\ntox -e py37\n```\n\n# License\n\n[MIT](./LICENSE)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Pylint plugin to help Pylint understand the Behave projects",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/eccanto/pylint-behave"
},
"split_keywords": [
"pylint",
" behave",
" plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "686ffe3635d4bc394473e14b76b2a125a57fbccda488640c9730c08fdd63b41c",
"md5": "2075dda4ae96eff5febf4f8c67b3a80f",
"sha256": "e63f70ce895c6e874c5b526574d14faf2c75b2d88dcac6979fdf39c226c145b2"
},
"downloads": -1,
"filename": "pylint_behave-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2075dda4ae96eff5febf4f8c67b3a80f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7784,
"upload_time": "2024-06-07T23:38:04",
"upload_time_iso_8601": "2024-06-07T23:38:04.340634Z",
"url": "https://files.pythonhosted.org/packages/68/6f/fe3635d4bc394473e14b76b2a125a57fbccda488640c9730c08fdd63b41c/pylint_behave-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "857ca15d94dec7d8a6f2dfa36eb8a1517b87f40f463a5035622ce56a63480cd6",
"md5": "b3b2f9b2d548f2c24be92d33b4e2b15a",
"sha256": "c5d1cf6945a5884b7e2c5bd3aed9e04036feea8d0b06050a5c31d844e829be75"
},
"downloads": -1,
"filename": "pylint_behave-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "b3b2f9b2d548f2c24be92d33b4e2b15a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6724,
"upload_time": "2024-06-07T23:38:05",
"upload_time_iso_8601": "2024-06-07T23:38:05.829828Z",
"url": "https://files.pythonhosted.org/packages/85/7c/a15d94dec7d8a6f2dfa36eb8a1517b87f40f463a5035622ce56a63480cd6/pylint_behave-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-07 23:38:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eccanto",
"github_project": "pylint-behave",
"travis_ci": false,
"coveralls": true,
"github_actions": false,
"requirements": [
{
"name": "pytest",
"specs": [
[
"==",
"8.2.2"
]
]
},
{
"name": "tox",
"specs": [
[
"==",
"3.27.0"
]
]
},
{
"name": "twine",
"specs": [
[
"==",
"5.1.0"
]
]
}
],
"tox": true,
"lcname": "pylint-behave"
}