Issue #1 resolved

Empty __init__.py files are reported as 1 executable line.

Ned Batchelder
repo owner created an issue

This is counter-intuitive. It'd be better (but not essential) for it to match people's perception, which is that an empty init.py has no executable lines.

Comments (4)

  1. Ned Batchelder reporter

    An empty file is compiled to this:

    magic b3f20d0a
    moddate d105e149 (Sat Apr 11 17:04:17 2009)
    code
       argcount 0
       nlocals 0
       stacksize 1
       flags 0040
       code 64000053
      1           0 LOAD_CONST               0 (None)
                  3 RETURN_VALUE
       consts
          None
       names ()
       varnames ()
       freevars ()
       cellvars ()
       filename '.\\empty.py'
       name '<module>'
       firstlineno 1
       lnotab
    
  2. Log in to comment