@@ -74,11 +74,10 @@ def get_item_type(el):
7474 if el .get ('link' ) == '.' :
7575 return ITEM_TYPE_FUNCTION_INLINEMEM
7676 return ITEM_TYPE_FUNCTION
77-
78- if el .tag == 'variable' :
79- if el .get ('link' ) == '.' :
80- return ITEM_TYPE_VARIABLE_INLINEMEM
81- return ITEM_TYPE_VARIABLE
77+ if el .tag == 'variable' :
78+ if el .get ('link' ) == '.' :
79+ return ITEM_TYPE_VARIABLE_INLINEMEM
80+ return ITEM_TYPE_VARIABLE
8281 if el .tag == 'constructor' :
8382 if el .get ('link' ) == '.' :
8483 return ITEM_TYPE_CONSTRUCTOR_INLINEMEM
@@ -145,7 +144,7 @@ def process_item_hook(self, el, full_name, full_link):
145144
146145def get_html_files (root ):
147146 files = []
148- for dir , dirnames , filenames in os .walk (root ):
147+ for dir , _ , filenames in os .walk (root ):
149148 for filename in fnmatch .filter (filenames , '*.html' ):
150149 files .append (os .path .join (dir , filename ))
151150 return files
@@ -207,8 +206,8 @@ def build_abstract(decls, desc, max_code_lines, split_code_lines,
207206 # limit the number of code snippets to be included so that total number
208207 # of lines is less than max_code_lines. The limit becomes active only
209208 # for the second and subsequent snippets.
210- first = True if i == 0 else False
211- last = True if i == len (decls )- 1 else False
209+ first = ( i == 0 )
210+ last = ( i == len (decls )- 1 )
212211
213212 if not first :
214213 if last :
@@ -424,31 +423,31 @@ def process_identifier(out, redirects, root, link, item_ident, item_type,
424423 elif item_type in [ITEM_TYPE_FUNCTION_INLINEMEM ,
425424 ITEM_TYPE_CONSTRUCTOR_INLINEMEM ,
426425 ITEM_TYPE_DESTRUCTOR_INLINEMEM ]:
427- raise DdgException ("INLINEMEM" ) # not implemented
428426 ''' Implementation notes:
429427 * the declarations are possibly versioned
430428 * declaration is selected from the member table
431429 * the member table is found according to the identifier
432430 (last part after :: is enough, hopefully)
433431 '''
432+ raise DdgException ("INLINEMEM" ) # not implemented
434433
435434 elif item_type in [ITEM_TYPE_VARIABLE ,
436435 ITEM_TYPE_VARIABLE_INLINEMEM ,
437436 ITEM_TYPE_ENUM ]:
438- raise DdgException ("ENUM" ) # not implemented
439437 ''' Implementation notes:
440438 * the declarations are possibly versioned
441439 '''
440+ raise DdgException ("ENUM" ) # not implemented
442441
443442 elif item_type == ITEM_TYPE_ENUM_CONST :
444- raise DdgException ("ENUM_CONST" ) # not implemented
445443 ''' Implementation notes:
446444 * the abstract will come from the const -> definition table,
447445 which is always put before the first heading.
448446 * the declaration will come from the dcl template. We need
449447 to split the content at ';' and ',', then search for the
450448 name of the enum. If we find duplicates, signal an error.
451449 '''
450+ raise DdgException ("ENUM_CONST" ) # not implemented
452451
453452 if debug .enabled :
454453 debug .debug_abstracts_file .write ("--------------\n " )
0 commit comments