A flake8 extension that checks for blind except: statements
Project description
flake8-blind-except
===================
A flake8 extension that checks for blind ``except:`` statements.
Using ``except`` without explicitly specifying which exceptions to catch is generally considered back practice.
An example of code that will fail this check is::
try:
something_scary()
except:
everybody_panic()
However, the following code is valid::
try:
something_terrifying()
except Exception:
dont_panic()
Installation
------------
If you don't already have it, install ``flake8``::
$ pip install flake8
Then, install the extension::
$ pip install flake8-blind-except
Usage
-----
Run the following to verify that the plugin has been installed correctly::
$ flake8 --version
2.0 (pep8: 1.4.6, flake8-blind-except: 0.1.0, pyflakes: 0.7.3)
Now, when you run ``flake8``, the plugin will automatically be used.
Changes
------
0.1.03 - 2014-02-07
``````````````````
* Initial release
Notes
-----
I've tested this package with flake8 2.0 and Python 2.7. It is untested, but likely compatible with other versions.
===================
A flake8 extension that checks for blind ``except:`` statements.
Using ``except`` without explicitly specifying which exceptions to catch is generally considered back practice.
An example of code that will fail this check is::
try:
something_scary()
except:
everybody_panic()
However, the following code is valid::
try:
something_terrifying()
except Exception:
dont_panic()
Installation
------------
If you don't already have it, install ``flake8``::
$ pip install flake8
Then, install the extension::
$ pip install flake8-blind-except
Usage
-----
Run the following to verify that the plugin has been installed correctly::
$ flake8 --version
2.0 (pep8: 1.4.6, flake8-blind-except: 0.1.0, pyflakes: 0.7.3)
Now, when you run ``flake8``, the plugin will automatically be used.
Changes
------
0.1.03 - 2014-02-07
``````````````````
* Initial release
Notes
-----
I've tested this package with flake8 2.0 and Python 2.7. It is untested, but likely compatible with other versions.
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
Close
Hashes for flake8-blind-except-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8599a48d9fff490ce4fa2c6a60ca876c39cc6c107f58068eb831079266b650b |
|
MD5 | a76ae6603b53c230ad81f9dea27c6bbb |
|
BLAKE2b-256 | 584501b5dd4cba855d42ffa61b24be0bba1e5e1da92533f5c054de38008ba611 |