lol macs amirite


On 15 May 2014 00:25, Alex Couper <notifications@github.com> wrote:

> In captainhook/checkers/utils.py:
>
> >
> >
> >  def python_files_for_commit():
> >      "Get all python files that are staged for commit, that are not deleted."
> > -    files_pattern = '\.py(\..+)?$'
> > -    return get_files_for_commit(files_pattern)
> > +    return [f for f in get_files_for_commit()
> > +            if 'Python script' in str(bash('file {}'.format(f)))]
>
> This doesn't work for me:
>
> $ file captainhook/checkers/utils.py
> captainhook/checkers/utils.py: ASCII Java program text
>
> Although it almost works for the captainhook script
>
> $ file scripts/captainhook
> scripts/captainhook: a python script text executable
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/alexcouper/captainhook/pull/27/files#r12667613>
> .
>