RonsenbergVI/cicd_circleci_codeclimate

View on GitHub
setup.py

Summary

Maintainability
C
1 day
Test Coverage

File setup.py has 42 lines of code (exceeds 10 allowed). Consider refactoring.
Open

# MIT License

# Copyright (c) 2021 Rene Jean Corneille

# Permission is hereby granted, free of charge, to any person obtaining a copy
Severity: Minor
Found in setup.py - About 2 hrs to fix

    Found indentation with tabs instead of spaces
    Open

        config=ConfigParser()
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        ISRELEASED = True
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        MICRO=config['version']['micro']
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        MAJOR=config['version']['major']
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        config.read(config_path)
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        VERSION = '%s.%s.%s' % (MAJOR, MINOR, MICRO)
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        return VERSION, ISRELEASED
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        """
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Found indentation with tabs instead of spaces
    Open

        MINOR=config['version']['minor']
    Severity: Minor
    Found in setup.py by pylint

    Used when there are some mixed tabs and spaces in a module.

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        MINOR=config['version']['minor']
    Severity: Major
    Found in setup.py and 2 other locations - About 1 hr to fix
    setup.py on lines 35..35
    setup.py on lines 37..37

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 17.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        MICRO=config['version']['micro']
    Severity: Major
    Found in setup.py and 2 other locations - About 1 hr to fix
    setup.py on lines 35..35
    setup.py on lines 36..36

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 17.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        MAJOR=config['version']['major']
    Severity: Major
    Found in setup.py and 2 other locations - About 1 hr to fix
    setup.py on lines 36..36
    setup.py on lines 37..37

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 17.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    if __name__ == "__main__":
        setup_package()
    Severity: Major
    Found in setup.py and 1 other location - About 1 hr to fix
    package_name/__init__.py on lines 26..27

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 15.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        config_path = os.path.join(os.path.dirname(__file__), 'setup.cfg')
    Severity: Minor
    Found in setup.py and 1 other location - About 40 mins to fix
    setup.py on lines 48..48

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 5.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        _version, _ = get_version_info(config_path)
    Severity: Minor
    Found in setup.py and 1 other location - About 40 mins to fix
    setup.py on lines 52..53

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 5.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

        setup(name = 'package-medium-post',
    Severity: Major
    Found in setup.py and 6 other locations - About 30 mins to fix
    setup.py on lines 52..52
    setup.py on lines 52..52
    setup.py on lines 52..52
    setup.py on lines 52..52
    setup.py on lines 52..52
    setup.py on lines 52..52

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 3.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    from configparser import ConfigParser
    Severity: Minor
    Found in setup.py and 2 other locations - About 30 mins to fix
    package_name/__init__.py on lines 23..23
    setup.py on lines 24..24

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 3.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    from setuptools import setup
    Severity: Minor
    Found in setup.py and 2 other locations - About 30 mins to fix
    package_name/__init__.py on lines 23..23
    setup.py on lines 25..25

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 3.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        return VERSION, ISRELEASED
    Severity: Minor
    Found in setup.py and 1 other location - About 30 mins to fix
    setup.py on lines 50..50

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 3.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Exactly one space required around assignment
    Open

        MINOR=config['version']['minor']
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. MINOR=config['version']['minor'] ^

    No space allowed around keyword argument assignment
    Open

            license = 'MIT',
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. license = 'MIT', ^

    Exactly one space required around assignment
    Open

        MAJOR=config['version']['major']
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. MAJOR=config['version']['major'] ^

    No space allowed around keyword argument assignment
    Open

            author = 'Rene-Jean Corneille',
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. author = 'Rene-Jean Corneille', ^

    Trailing whitespace
    Open

        
    Severity: Info
    Found in setup.py by pylint

    Used when there is whitespace between the end of a line and the newline.

    No space allowed around keyword argument assignment
    Open

            description = 'prints time in command.',
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. description = 'prints time in command.', ^

    Wrong continued indentation (add 2 spaces).
    Open

            entry_points='''
    Severity: Info
    Found in setup.py by pylint

    TODO entry_points=''' ^ |

    Variable name MICRO doesn't conform to snake_case naming style
    Open

        MICRO=config['version']['micro']
    Severity: Info
    Found in setup.py by pylint

    Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

    No space allowed around keyword argument assignment
    Open

            version = str(_version),
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. version = str(_version), ^

    Final newline missing
    Open

        setup_package()
    Severity: Info
    Found in setup.py by pylint

    Used when the last line in a file is missing a newline.

    Variable name VERSION doesn't conform to snake_case naming style
    Open

        VERSION = '%s.%s.%s' % (MAJOR, MINOR, MICRO)
    Severity: Info
    Found in setup.py by pylint

    Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

    No space allowed around keyword argument assignment
    Open

        setup(name = 'package-medium-post',
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. setup(name = 'package-medium-post', ^

    Wrong continued indentation (add 2 spaces).
    Open

            license = 'MIT',
    Severity: Info
    Found in setup.py by pylint

    TODO license = 'MIT', ^ |

    No space allowed around keyword argument assignment
    Open

            url = 'https://github.com/RonsenbergVI/cicd_circleci_codeclimate.git',
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. url = 'https://github.com/RonsenbergVI/cicd_circleci_codeclimate.git', ^

    Wrong continued indentation (add 2 spaces).
    Open

            classifiers=[
    Severity: Info
    Found in setup.py by pylint

    TODO classifiers=[ ^ |

    Missing function or method docstring
    Open

    def setup_package():
    Severity: Info
    Found in setup.py by pylint

    Used when a function or method has no docstring.Some special methods like init do not require a docstring.

    Wrong continued indentation (add 2 spaces).
    Open

            description = 'prints time in command.',
    Severity: Info
    Found in setup.py by pylint

    TODO description = 'prints time in command.', ^ |

    No space allowed around keyword argument assignment
    Open

            author_email = 'corneille.r.j@gmail.com',
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. author_email = 'corneille.r.j@gmail.com', ^

    Wrong continued indentation.
    Open

            )
    Severity: Info
    Found in setup.py by pylint

    TODO ) ^||

    Variable name MINOR doesn't conform to snake_case naming style
    Open

        MINOR=config['version']['minor']
    Severity: Info
    Found in setup.py by pylint

    Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

    standard import from configparser import ConfigParser should be placed before from setuptools import setup
    Open

    from configparser import ConfigParser
    Severity: Info
    Found in setup.py by pylint

    Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)

    Wrong continued indentation (add 2 spaces).
    Open

            version = str(_version),
    Severity: Info
    Found in setup.py by pylint

    TODO version = str(_version), ^ |

    Wrong continued indentation (add 2 spaces).
    Open

            packages=['package_name'],
    Severity: Info
    Found in setup.py by pylint

    TODO packages=['package_name'], ^ |

    Wrong continued indentation (add 2 spaces).
    Open

            url = 'https://github.com/RonsenbergVI/cicd_circleci_codeclimate.git',
    Severity: Info
    Found in setup.py by pylint

    Wrong continued indentation (add 2 spaces).
    Open

            include_package_data=True
    Severity: Info
    Found in setup.py by pylint

    TODO includepackagedata=True ^ |

    Wrong continued indentation (add 2 spaces).
    Open

            install_requires=[
    Severity: Info
    Found in setup.py by pylint

    TODO install_requires=[ ^ |

    Variable name ISRELEASED doesn't conform to snake_case naming style
    Open

        ISRELEASED = True
    Severity: Info
    Found in setup.py by pylint

    Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

    Exactly one space required around assignment
    Open

        config=ConfigParser()
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. config=ConfigParser() ^

    Wrong continued indentation (add 2 spaces).
    Open

            author_email = 'corneille.r.j@gmail.com',
    Severity: Info
    Found in setup.py by pylint

    TODO author_email = 'corneille.r.j@gmail.com', ^ |

    Missing module docstring
    Open

    # MIT License
    Severity: Info
    Found in setup.py by pylint

    Used when a module has no docstring.Empty modules do not require a docstring.

    Wrong continued indentation (add 2 spaces).
    Open

            author = 'Rene-Jean Corneille',
    Severity: Info
    Found in setup.py by pylint

    TODO author = 'Rene-Jean Corneille', ^ |

    Variable name MAJOR doesn't conform to snake_case naming style
    Open

        MAJOR=config['version']['major']
    Severity: Info
    Found in setup.py by pylint

    Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

    Exactly one space required around assignment
    Open

        MICRO=config['version']['micro']
    Severity: Info
    Found in setup.py by pylint

    Used when a wrong number of spaces is used around an operator, bracket or block opener. MICRO=config['version']['micro'] ^

    There are no issues that match your filters.

    Category
    Status