https://github.com/wemake-services/wemake-python-styleguide/issues/2340
#wemake_python_styleguide #ast
#wemake_python_styleguide #ast
GitHub
Detect leaking `for` loops in `ClassDef` and `Module` · Issue #2340 · wemake-services/wemake-python-styleguide
Right now we can have two problems: class Some(object): for x in [1, 2]: print(x) print(Some.x) # oups, will show you `2` and with modules: # some.py for x in [1, 2]: print(x) # __main__ import som...
👍3❤1
https://github.com/wemake-services/wemake-python-styleguide/issues/3493
#ast #wemake_python_styleguide
#ast #wemake_python_styleguide
GitHub
Make `WPS222` configurable · Issue #3493 · wemake-services/wemake-python-styleguide
Currently we use MAX_CONDITIONS: Final = 4 as a constant in constants.py. There's no way to configure MAX_CONDITIONS. However, there might be projects where 5 or even 8 might be reasonable. So,...
👎1
https://github.com/wemake-services/wemake-python-styleguide/issues/3500
#ast #wemake_python_styleguide
#ast #wemake_python_styleguide
GitHub
Allow set comprehensions in `WPS335` · Issue #3500 · wemake-services/wemake-python-styleguide
We don't allow list and set to be used as iterable parts of for, because we only allow tuples there. We need to allow SetComp in for iterable: 118:22 WPS335 Found incorrect `for` loop iter type...
Не самая простая задача, но прикольная: https://github.com/wemake-services/wemake-python-styleguide/issues/3501
Подойдет тем, кто уже делает не первый PR :)
#ast #wemake_python_styleguide
Подойдет тем, кто уже делает не первый PR :)
#ast #wemake_python_styleguide
GitHub
False positive for `WPS529` · Issue #3501 · wemake-services/wemake-python-styleguide
Code like this def func(**kwargs): if 'a' in kwargs: assert 'a_kwargs' not in kwargs else: kwargs['a'] = other( **kwargs.pop('a_kwargs', {}), ) raises WPS529 I don&#...