-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config to allow decorators that function like @classmethod #38
Comments
This certainly seems reasonable |
@sigmavirus24: do you have any suggestions for testing such a change? I have a working implementation, but the testing framework does not allow custom options to be passed into the NamingChecker. I'm currently experimenting with the test syntax looking as such:
and then parsing the options, which get passed to an instance of Does this sound like an OK approach to you? Also, looking at the codebase, I'm unsure which version of flake8 I am using within the test suite. Is it always the latest version? |
- Added support for parsing CLI-style flake8-config parameters, with such tests only run in the py27-flake8 and py34-flake8 test environments. - Removed support for multiple `codes` in a testcase, since it was never used. Fixes PyCQA#38
- Added support for parsing CLI-style flake8-config parameters, with such tests only run in the py27-flake8 and py34-flake8 test environments. - Removed support for multiple `codes` in a testcase, since it was never used. - Add tests for late-decorated methods Fixes PyCQA#38
- Added support for parsing CLI-style flake8-config parameters, with such tests only run in the py27-flake8 and py34-flake8 test environments. - Removed support for multiple `codes` in a testcase, since it was never used. - Add tests for late-decorated methods Fixes PyCQA#38
- Added support for parsing CLI-style flake8-config parameters, with such tests only run in the py27-flake8 and py34-flake8 test environments. - Removed support for multiple `codes` in a testcase, since it was never used. - Add tests for late-decorated methods Fixes PyCQA#38
@sigmavirus24: just checking to see if there is anything else I need to do on my end to get #39 through. Cheers! |
- Added support for parsing CLI-style flake8-config parameters in tests using flake8_polyfill (has a stable API which flake8>=3 lacks) - Removed support for multiple `codes` in testcases (unused) - Clean up incorrect usage of default which caused redundant work in parse_options for ignore_names Fixes PyCQA#38
In SQLAlchemy, there is a
declared_attr
decorator that creates class methods:http://docs.sqlalchemy.org/en/latest/orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr
As a result, my codebase is sprinkled with:
It would be nice if we could have a config option that lets us declare if a decorator results in a
staticmethod
orclassmethod
as opposed to the implicit default of it being an instance method. I was thinking something like using comma separated list in the setup.cfg/tox.ini file, e.g:The text was updated successfully, but these errors were encountered: