Showing 6 of 141 total issues
File item_matrix_directive.py
has 605 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
"""Module for the item-matrix directive"""
import re
from collections import namedtuple
from copy import copy, deepcopy
TraceableItem
has 28 functions (exceeds 25 allowed). Consider refactoring. Open
Open
class TraceableItem(TraceableBaseClass):
'''
Storage for a traceable documentation item
'''
File traceability.py
has 515 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
# -*- coding: utf-8 -*-
"""
Traceability plugin
Function setup
has 53 lines of code (exceeds 40 allowed). Consider refactoring. Open
Open
def setup(app):
"""Extension setup"""
# Javascript and stylesheet for the tree-view
app.add_js_file('https://cdn.rawgit.com/aexmachina/jquery-bonsai/master/jquery.bonsai.js')
app.add_css_file('https://cdn.rawgit.com/aexmachina/jquery-bonsai/master/jquery.bonsai.css')
Avoid deeply nested control flow statements. Open
Open
if target_of_target in item.yield_targets(rev_relation):
errors.append(TraceabilityException(
"Circular relationship found: {src} {rel} {tgt} {rel} {nested} {rel} {src}"
.format(src=itemid, rel=relation, tgt=tgt, nested=target_of_target),
item.docname))
Avoid too many return
statements within this function. Open
Open
return self.items[source_id].is_related(relations, target_id)