Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

[FIX] travis_run_flake8.cfg: do not fully ignore __init__.py #595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gustavovalverde
Copy link
Member

The only rule that has to be ignored in init.py is F401: https://lintlyci.github.io/Flake8Rules/rules/F401.html
All other rules must be validated in init.py files as those are also used to define pre-init hooks and other validations.

The only rule that has to be ignored in __init__.py is F401: https://lintlyci.github.io/Flake8Rules/rules/F401.html
All other rules must be validated in __init__.py files as those are also used to define pre-init hooks and other validations.
@pedrobaeza
Copy link
Member

You mustn't put hooks on __init__.py, but create a hooks.py file. See https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#17complete-structure

@gustavovalverde
Copy link
Member Author

Ok, so this is just overdoing it

@moylop260
Copy link
Contributor

@gustavovalverde
If I understood well it way avoid creating the following file:

Using just one file with all checks enabled and disabling just for custom files
Right?

@gustavovalverde
Copy link
Member Author

gustavovalverde commented Apr 22, 2019

Oh, didn't realize there was another file doing the same; so yes...it's mainly doing that but in the same file (additional exceptions should be specified as in https://github.com/oca/maintainer-quality-tools/blob/e19a8d0e4401cd5d8268a219ee69535b1c816b6a/travis/cfg/travis_run_flake8__init__.cfg )

@moylop260
Copy link
Contributor

Ok, that looks like a good idea since that currently we are using 2 files.

Could you finish the work (I mean, delete the another file and remove all references to another one), please?

@moylop260 moylop260 reopened this Apr 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants