coala / coala-bears

Bears for coala
https://coala.io/
GNU Affero General Public License v3.0
295 stars 580 forks source link

PythonPackageInitBear : Propose an empty init file as a patch #1089

Open coala-bot opened 7 years ago

coala-bot commented 7 years ago

Opened via gitter by @meetmangukiya

meetmangukiya commented 7 years ago

Remove - Bear proposal. Add - enhancement/feature label instead

madhur-tandon commented 7 years ago

Details ?

Makman2 commented 7 years ago

When PythonPackageInitBear detects a missing __init__.py, it shall propose a new empty __init__.py as a patch.

madhur-tandon commented 7 years ago

Propose as in ask the user if he wants to create the empty __init__.py file ? Or just create the empty __init__.py file and let the user know about it ?

meetmangukiya commented 7 years ago

Ask the user if he wants to create it @amrandahvur

On Tue, Dec 6, 2016 at 7:45 PM, Madhur Tandon notifications@github.com wrote:

Propose as in ask the user if he wants to create the empty init.py file ? Or just create the empty init.py file and let the user know about it ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coala/coala-bears/issues/1089#issuecomment-265159714, or mute the thread https://github.com/notifications/unsubscribe-auth/AHRHtcx0_xmsyDn6q5S1BWnvYZQeFzEfks5rFW4GgaJpZM4LEM6k .

madhur-tandon commented 7 years ago

I would like to give this a shot :D

meetmangukiya commented 7 years ago

@amrandahvur am not sure it is possible to fix this now... Blocked by https://github.com/coala/coala/issues/3123

Someone add Label status/blocked

madhur-tandon commented 7 years ago

Aah, I see, Ok, :+1:

adtac commented 7 years ago

And this should ideally not create __init__.py files for every directory. Only ones that have at least one other .py file IMO.

adtac commented 7 years ago

Or another file deeper down in a sub-directory, of course.

meetmangukiya commented 7 years ago

@adtac the bear by itself, suggests the directories containing python files to have an __init__.py file. So say if there was a directory containing just c++ files, then the bear wouldn't tell the user that it needs a init file...

On Fri, Dec 9, 2016 at 10:40 PM, Adhityaa Chandrasekar < notifications@github.com> wrote:

Or another file deeper down in a sub-directory, of course.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coala/coala-bears/issues/1089#issuecomment-266067658, or mute the thread https://github.com/notifications/unsubscribe-auth/AHRHtX9RentTTXdJpT807kN06vSIUC2uks5rGYt5gaJpZM4LEM6k .