pacifikus / flake8-global-variables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flake8-global-variables

Tests Code style Python Version PyPI version

flake8 plugin to prevent from global variables using.

Installation

pip install flake8-global-variables

Code example

Things checked with this plugin:

# Global variable declaration
global_hello = 'Hello'


def fun_a():
    return 2


def fun_b(var=5):
    result = fun_a() + var
    return result


# And here global variable again 
global_var = 3

fun_b(global_var)

Error codes

Error code Description
GV400 Found global variable

License

MIT.

About

License:MIT License


Languages

Language:Python 100.0%