Showing 440 of 1,826 total issues
File imcconstants.py
has 2052 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File BiosVfPCISlotOptionROMEnable.py
has 1731 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""This module contains the general information for BiosVfPCISlotOptionROMEnable ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
File imcmeta.py
has 1455 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File storage.py
has 874 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File storage.py
has 874 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File imccoreutils.py
has 757 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License prop
File snmp.py
has 723 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File vic.py
has 701 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File sdcard.py
has 667 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2018 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File imcbiostables.py
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File ldap.py
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File GenerateCertificateSigningRequest.py
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""This module contains the general information for GenerateCertificateSigningRequest ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
File vd.py
has 586 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File imcmo.py
has 585 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License prop
File imcsession.py
has 560 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File imchandle.py
has 557 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File pd.py
has 529 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
File TopSystem.py
has 524 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""This module contains the general information for TopSystem ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
File network.py
has 508 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Function _sd_card_config_set_m4
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
Open
def _sd_card_config_set_m4(handle, expected_vds, existing_vds, mos_dict=None):
if mos_dict is None:
mos_dict = _prepare_mos_dict(handle, expected_vds.keys())
is_mode_changed = False
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"