Skip to main content

Pylint plugin to help Pylint understand the Behave projects

Project description

code style: prettier

pylint-behave

pylint-behave is a Pylint plugin to improve code analysis when analyzing a Behave project.

Table of contents

Get started

Installation

This plugin can be simply installed by running:

pip install pylint-behave

if you want to install from a source distribution:

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:

pylint --load-plugins=pylint_behave [options..] <path_to_your_code>

Features

  • Prevents warnings about redefined names in the Behave steps (step_impl).

    @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.).

    from behave import step, given
    

Testing

Requirements

pip3 install -r requirements.txt

Set Python versions

  1. Install pyenv
  2. Install python versions:
    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:
    pyenv local "3.7" "3.8" "3.9" "3.10" "3.11" "3.12"
    

Run

We use tox and pytest to run the test suite:

tox

to run the test suite for a particular Python version, you can do:

tox -e py37

License

MIT

Changelog

  • 1.0.2 - Extended support for Python 3.10, 3.11 and 3.12, and update the documentation.
  • 1.0.1 - Compatibility with pylint outdated versions.
  • 1.0.0 - Initial version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylint-behave-1.0.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

pylint_behave-1.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file pylint-behave-1.0.2.tar.gz.

File metadata

  • Download URL: pylint-behave-1.0.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pylint-behave-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a0856b7b4c943341ced752fc33ac44ec28ca376c135047133d7572f650c8f54c
MD5 ddce0498e85bfa24b581dadbd377e326
BLAKE2b-256 6565c28f36372a4d42d5fc55f417e44befcdc4cf63fa7bb72296a3a688617cf0

See more details on using hashes here.

File details

Details for the file pylint_behave-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pylint_behave-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa2021b75f936f788557f20567484ebfd2901190077c6483c82e0e88c6ba8c06
MD5 630d583ba7d646eefabd32f65a64687b
BLAKE2b-256 176a6c33d92cfd2d689b6a6d3e69278b6ba748039fe17db442f9c8f5e4bc69e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page