nngogol / PySimpleGUIDocGen

Software for making documentation for PySimpleGUI
9 stars 2 forks source link

[CRITICAL] The number of #'s is off by 1 in the show_all_tags.py file..... #55

Closed PySimpleGUI closed 4 years ago

PySimpleGUI commented 4 years ago

Hi Mr. Wizard.... creator of this amazing tool!!!

Can you please remove 1 # from each of the prints? I am now running the code in this modified way:

for aclass in psg_classes:
    class_name = aclass.__name__

    # filter bad objects
    if  'Tk' in class_name or 'TK' in class_name or\
        'Element' == class_name: # or 'Window' == class_name:
        continue

    # print standart things:
    log(f'## {class_name} Element ')
    log(f'<!-- <+{class_name}.doc+> -->')
    log(f'<!-- <+{class_name}.__init__+> -->\n')

    # print all public methods:
    log('\n'.join([f"### {name}\n<!-- <+{class_name}.{name}+> -->\n"
                    for name, obj in inspect.getmembers(aclass)
                    if not name.startswith('_')  ]))

The classes should have ## and the members / methods should have ###

The result that I then paste into the call reference file looks like this:

## Window 
<!-- <+Window.doc+> -->
<!-- <+Window.__init__+> -->

### AddRow
<!-- <+Window.AddRow+> -->

### AddRows
<!-- <+Window.AddRows+> -->
PySimpleGUI commented 4 years ago

I can't stress enough how much this needs to be fixed. I have to manually fix this bug on every release.

The current code produces tags with the WRONG indentation level. This majorly fucks up the docs.

show_all_tags.py continues to make these kinds of tags (note the wrong number of #)

### Button Element 
<!-- <+Button.doc+> -->
<!-- <+Button.__init__+> -->

#### ButtonCallBack
<!-- <+Button.ButtonCallBack+> -->

#### ButtonPressCallBack
<!-- <+Button.ButtonPressCallBack+> -->
nngogol commented 4 years ago

Fixed