Closed alvassin closed 5 years ago
Does something like this work in the setup.cfg?
[pylama]
application-import-names = quart, tests
ignore = E252, W503, W504
import-order-style = smarkets
max_line_length = 100
I added this linter to pylama as following:
entry_points = {
'pylama.linter': [
'imports_order = flake8_import_order.pylama_linter:Linter'
]
},
Also, i configured pylama using pylama.ini:
[pylama]
linters=pycodestyle,pyflakes,mccabe,imports_order
[pylama:imports_order]
application-import-names=myapp
import-order-style = smarkets
The problem is that pylama does not detect imports from myapp
as local ones. Moreover, i do not see application_import_names
in self.options
.
I can see that self.options
contains the following:
{
'code': '...',
'ignore': set(),
'select': set(),
'params': {
'application-import-names': 'myapp',
'import-order-style': 'smarkets',
},
'import_order_style': Entrypoint('cryptography = flake8_import_order.styles:Cryptography')
}
I can see in your test, that you expect application_import_names named underscored with list. I can see string, even when i pass myapp,tests
value
Can you please advice, what is going wrong?
Have you tried putting this in the pylama.ini
?
[pylama:imports_order]
application_import_names=myapp
import_order_style = smarkets
I'm going to assumed the above worked, please reopen if not.
Not clear how to start using this plugin with pylama. Can it be somehow integrated via pylama.ini?