I have a file in python like:
def test_constructor_for_legacy_json():
"""Test if constructor works for a legacy JSON in an old database"""
a = A(**{
'field1': 'BIG TEXT WITH MORE THAN 500 CHARACTERS....(...)',
'field2': 'BIG TEXT WITH MORE THAN 500 CHARACTERS....(...)',
'field3': 'BIG TEXT WITH MORE THAN 500 CHARACTERS....(...)',
# (...)
'field1000': 'BIG TEXT WITH MORE THAN 500 CHARACTERS....(...)',
})
assert type(a) == A
When I run flake8
+ hacking
I receive an error because the lines are too big.
If I put this command at the beginning of the file # flake8: noqa
all file will be ignored from linter. But I only want to exclude from linter the block where a
is declared.
I want to lint the rest of the file, and I cannot put at the end of each fieldx
an # noqa: E501
.
Some one know how can I solve this? Thanks