Vauxoo / pylint-odoo

1 stars 4 forks source link

Disable pylint: file-not-used for csv files #133

Closed maitaoriana closed 6 years ago

maitaoriana commented 6 years ago

In some cases the data of the csv files are loaded from a hook then it is not necessary to add it to the __manifest__.py file.

But this pylint error occurs: [W7930 (file-not-used),] not used from manifest

moylop260 commented 6 years ago

What is your real case?

NOTE: If you use tests folder the check is skipped

maitaoriana commented 6 years ago

@moylop260 In this PR https://github.com/Vauxoo/mexico/pull/870, i have two csv files (l10n_mx_edi.res.locality.csv, res.city.csv) and they are not uset from manifest because they are loaded from hook.

These files contain the data of the cities and localities of Mexico, do you think it is correct to move them to the tests folder?

moylop260 commented 6 years ago

@maitaoriana I saw the docstring of your method Import CSV data as it is faster than xml and because we can't use noupdate anymore with csv

So we need to support this case, maybe a extra folder defined for these cases...

@JesusZapata Could you help us to support a extra folder for these cases?

(I don't know what is the better name but maybe @nhomar could help us to define a folder name)

nhomar commented 6 years ago

@moylop260 we can not ignore the file itself? why a folder? and remember this is how this is working on 11.0 also in all case use static folder ?

maitaoriana commented 6 years ago

@moylop260, do you agree with adding the files into the static folder?

moylop260 commented 6 years ago

Maybe, we should use the folder examples defined in our template module in order to skip these cases:

maitaoriana commented 6 years ago

@moylop260 Any news about this? Remember this is still pending.

egrivero commented 6 years ago

@moylop260 about this issue is there any progress?, is that for vauxoo/mexico 11.0, only this is needed to correct the lint. If you need something help with tests, I can support you with that.

luisg123v commented 6 years ago

@moylop260 I've got a couple of ideas in mint to solve this issue:

What do you think?