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

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.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

pylint_behave-1.0.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pylint_behave-1.0.3.tar.gz.

File metadata

  • Download URL: pylint_behave-1.0.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for pylint_behave-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c5d1cf6945a5884b7e2c5bd3aed9e04036feea8d0b06050a5c31d844e829be75
MD5 b3b2f9b2d548f2c24be92d33b4e2b15a
BLAKE2b-256 857ca15d94dec7d8a6f2dfa36eb8a1517b87f40f463a5035622ce56a63480cd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylint_behave-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e63f70ce895c6e874c5b526574d14faf2c75b2d88dcac6979fdf39c226c145b2
MD5 2075dda4ae96eff5febf4f8c67b3a80f
BLAKE2b-256 686ffe3635d4bc394473e14b76b2a125a57fbccda488640c9730c08fdd63b41c

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