diff --git a/CHANGELOG.md b/CHANGELOG.md index ec404f83a..94e94b25f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ We used to have incremental versioning before `0.1.0`. ### Features - Now we are counting `async` function as a module member +- We now forbid to use `credits()` builtin function +- We now check for `async with` and `async for` nesting level +- We now count `async` methods as method for classes complexity check +- We now count `async` functions as functions for module complexity check ### Misc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d82e9987..f2a01e85c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,9 +77,10 @@ Before submitting your code please do the following steps: 2. Add any changes you want 3. Adds tests for the new changes 4. Edit documentation if you have changed something significant -5. Run `pytest` again to make sure it is still working -6. Run `mypy` to ensure that types are correct -7. Run `doc8` to ensure that docs are correct +5. Update `CHANGELOG.md` with a quick summary of your changes +6. Run `pytest` again to make sure it is still working +7. Run `mypy` to ensure that types are correct +8. Run `doc8` to ensure that docs are correct ## Other help @@ -87,4 +88,4 @@ Before submitting your code please do the following steps: You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article on how you are using this project. -What are your best-practices? +You can also share your best practices with us. diff --git a/README.md b/README.md index d199b9498..aa6043abb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# wemake-python-styleguide [![Build Status](https://travis-ci.org/wemake-services/wemake-python-styleguide.svg?branch=master)](https://travis-ci.org/wemake-services/wemake-python-styleguide) [![Build status](https://ci.appveyor.com/api/projects/status/mpopx4wpfkrhc1sl?svg=true)](https://ci.appveyor.com/project/wemake-services/wemake-python-styleguide) +# wemake-python-styleguide [![wemake.services](https://img.shields.io/badge/-wemake.services-green.svg?label=%20&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC%2FxhBQAAAAFzUkdCAK7OHOkAAAAbUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP%2F%2F%2F5TvxDIAAAAIdFJOUwAjRA8xXANAL%2Bv0SAAAADNJREFUGNNjYCAIOJjRBdBFWMkVQeGzcHAwksJnAPPZGOGAASzPzAEHEGVsLExQwE7YswCb7AFZSF3bbAAAAABJRU5ErkJggg%3D%3D)](https://wemake.services) +[![Build Status](https://travis-ci.org/wemake-services/wemake-python-styleguide.svg?branch=master)](https://travis-ci.org/wemake-services/wemake-python-styleguide) [![Build status](https://ci.appveyor.com/api/projects/status/mpopx4wpfkrhc1sl?svg=true)](https://ci.appveyor.com/project/wemake-services/wemake-python-styleguide) [![Coverage](https://coveralls.io/repos/github/wemake-services/wemake-python-styleguide/badge.svg?branch=master)](https://coveralls.io/github/wemake-services/wemake-python-styleguide?branch=master) [![PyPI version](https://badge.fury.io/py/wemake-python-styleguide.svg)](https://badge.fury.io/py/wemake-python-styleguide) [![Python Version](https://img.shields.io/pypi/pyversions/wemake-python-styleguide.svg)](https://pypi.org/project/wemake-python-styleguide/) @@ -88,7 +89,7 @@ We are here not to: ## Contributing -See [CONTRIBUTING.md](https://github.com/wemake-services/wemake-python-styleguide/blob/master/CONTRIBUTING.md) file if you want to contribute. +See ["Contributing" section](https://wemake-python-styleguide.readthedocs.io/en/latest/_pages/contributing.html) file in the docs if you want to contribute. You can also check which [issues need some help](https://github.com/wemake-services/wemake-python-styleguide/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) right now. diff --git a/docs/_pages/api.rst b/docs/_pages/api.rst index ebd29cd4a..ec7007c03 100644 --- a/docs/_pages/api.rst +++ b/docs/_pages/api.rst @@ -1,13 +1,12 @@ -API Reference +Internal Docs ============= -Internal documentation. - Here you can find: 1. How our development process works 2. How to contribute to the project 3. How to write new rules +4. How our internal API looks like This information will also be helpful if you would like to create our own ``flake8`` plugin. @@ -23,16 +22,20 @@ where we specify all technical details about our workflow and tools. And finally you will need to go through the API reference. +Contributing +------------ + .. toctree:: :maxdepth: 2 - :caption: Meta: glossary.rst contributing.rst +API Reference +------------- + .. toctree:: :maxdepth: 2 - :caption: API Reference: checker.rst visitors/base.rst diff --git a/docs/_pages/glossary.rst b/docs/_pages/glossary.rst index cbba02a65..c0275b33d 100644 --- a/docs/_pages/glossary.rst +++ b/docs/_pages/glossary.rst @@ -3,6 +3,9 @@ Glossary ======== +First of all, we should speak the same language. +Here we collect all the specific terms that are used in this project. + .. glossary:: plugin diff --git a/docs/index.rst b/docs/index.rst index d1ee9cebd..310b5d31b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,9 +1,5 @@ .. mdinclude:: ../README.md - -User guide ------------ - .. toctree:: :maxdepth: 2 :caption: Userguide: @@ -13,21 +9,13 @@ User guide _pages/constants.rst _pages/options/config.rst - -Internal docs -------------- - .. toctree:: - :maxdepth: 1 + :maxdepth: 2 :caption: API: :hidden: _pages/api.rst - -Changelog ---------- - .. toctree:: :maxdepth: 1 :caption: Changelog: diff --git a/wemake_python_styleguide/visitors/ast/numbers.py b/wemake_python_styleguide/visitors/ast/numbers.py index 30a8859b9..789055b5e 100644 --- a/wemake_python_styleguide/visitors/ast/numbers.py +++ b/wemake_python_styleguide/visitors/ast/numbers.py @@ -27,6 +27,7 @@ class MagicNumberVisitor(BaseNodeVisitor): ast.Tuple, ) + # TODO: make consistent naming rules for class attributes: _PROXY_PARENTS = ( ast.UnaryOp, )