melexis/sphinx-traceability-extension

View on GitHub

Showing 126 of 141 total issues

Formatting a regular string which could be a f-string
Open

            report_warning("The arguments of the '{}' option must be space-separated without commas; "

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                        errors.append(TraceabilityException("No automatic reverse relation: {source} {relation} "

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Unnecessary elif after raise, remove the leading el from elif
Open

        if relation in self.explicit_relations and target in self.explicit_relations[relation]:
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used in order to highlight an unnecessary block of code following an if containing a raise statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a raise statement.

Formatting a regular string which could be a f-string
Open

            raise TraceabilityException('item {item} has invalid attribute ({attr}={value})'
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                raise ValueError('Traceability: combination of forward+reverse relations for item-tree: %s' % rel)

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Refactor this function to reduce its Cognitive Complexity from 60 to the 15 allowed.
Open

    def perform_replacement(self, app, collection):

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Using open without explicitly specifying an encoding
Open

        with open(fname, 'w') as outfile:

It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://peps.python.org/pep-0597/

Formatting a regular string which could be a f-string
Open

            retval += '\tAttribute {attribute} = {value}\n'.format(attribute=attribute,
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

            retval += '\t{text} {relation}\n'.format(text=description, relation=relation)
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                "Item-matrix {!r} cannot combine 'targetcolumns' with more than one 'target'; "

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Use of insecure MD2, MD4, MD5, or SHA1 hash function.
Open

            data['content-hash'] = hashlib.md5(self.content.encode('utf-8')).hexdigest()

Formatting a regular string which could be a f-string
Open

            headers['Authorization'] = 'token {}'.format(private_token)
Severity: Info
Found in mlx/traceability/traceability.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                report_warning("The query did not return a description. URL = {}. Response = {}.".format(url, response))
Severity: Info
Found in mlx/traceability/traceability.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

            raise ValueError('Update error {old} vs {new}'.format(old=self.identifier, new=other.identifier))

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                report_warning('Expected value for coverage option to fully match regex {}; got {!r}'

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Too many local variables (16/15)
Confirmed

    def build_pie_chart(self, sizes, labels, colors, env):

Used when a function or method has too many local variables.

Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.
Open

    def _postprocess_tbody(self, tbody):

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Formatting a regular string which could be a f-string
Open

            report_warning('Traceability: unknown relation for %s: %s' % (self.name, rel),

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Consider iterating with .items()
Open

        for itemid in self.items:

Emitted when iterating over the keys of a dictionary and accessing the value by index lookup. Both the key and value can be accessed by iterating using the .items() method of the dictionary instead.

Formatting a regular string which could be a f-string
Open

                retval += '\t\t{target}\n'.format(target=tgtid)
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Severity
Category
Status
Source
Language