leandrotoledo/python-telegram-bot

View on GitHub

Showing 351 of 351 total issues

Function __init__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(
Severity: Major
Found in telegram/_inline/inlinequeryresultcachedvideo.py - About 1 hr to fix

    Function __init__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(
    Severity: Major
    Found in telegram/_files/inputmedia.py - About 1 hr to fix

      Function __init__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(
      Severity: Major
      Found in telegram/ext/_handlers/conversationhandler.py - About 1 hr to fix

        Function __setstate__ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            def __setstate__(self, state: Dict[str, object]) -> None:
                """
                Overrides :meth:`object.__setstate__` to customize the unpickling process of objects of
                this type. Modifies the object in-place.
        
        
        Severity: Minor
        Found in telegram/_telegramobject.py - About 1 hr to fix

        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"

        Further reading

        Function parse_file_input has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        def parse_file_input(  # pylint: disable=too-many-return-statements
            file_input: Union[FileInput, "TelegramObject"],
            tg_type: Optional[Type["TelegramObject"]] = None,
            filename: Optional[str] = None,
            attach: bool = False,
        Severity: Minor
        Found in telegram/_utils/files.py - About 1 hr to fix

        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"

        Further reading

        Function _de_json has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            def _de_json(
                cls: Type[Tele_co],
                data: Optional[JSONDict],
                bot: "Bot",
                api_kwargs: Optional[JSONDict] = None,
        Severity: Minor
        Found in telegram/_telegramobject.py - About 1 hr to fix

        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"

        Further reading

        Function check_update has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            def check_update(self, update: object) -> bool:
                """Determines whether an update should be passed to this handler's :attr:`callback`.
        
                Args:
                    update (:class:`telegram.Update` | :obj:`object`): Incoming update.
        Severity: Minor
        Found in telegram/ext/_handlers/chatboosthandler.py - About 1 hr to fix

        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"

        Further reading

        Function autodoc_skip_member has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        def autodoc_skip_member(app, what, name, obj, skip, options):
            """We use this to not document certain members like filter() or check_update() for filters.
            See https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#skipping-members"""
        
            included = {"MessageFilter", "UpdateFilter"}  # filter() and check_update() only for these.
        Severity: Minor
        Found in docs/auxil/sphinx_hooks.py - About 1 hr to fix

        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"

        Further reading

        Function run_polling has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def run_polling(
        Severity: Major
        Found in telegram/ext/_application.py - About 1 hr to fix

          Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Major
          Found in telegram/ext/_application.py - About 1 hr to fix

            Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Major
            Found in telegram/_inline/inlinequeryresultcachedmpeg4gif.py - About 1 hr to fix

              Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(
              Severity: Major
              Found in telegram/_chatinvitelink.py - About 1 hr to fix

                Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Major
                Found in telegram/_inline/inlinequeryresultcachedgif.py - About 1 hr to fix

                  Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(
                  Severity: Major
                  Found in telegram/_webhookinfo.py - About 1 hr to fix

                    Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(
                    Severity: Major
                    Found in telegram/_inline/inlinequeryresultcachedvoice.py - About 1 hr to fix

                      Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(
                      Severity: Major
                      Found in telegram/ext/_extbot.py - About 1 hr to fix

                        Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def __init__(
                        Severity: Major
                        Found in telegram/_files/audio.py - About 1 hr to fix

                          Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def __init__(
                          Severity: Major
                          Found in telegram/ext/_extbot.py - About 1 hr to fix

                            Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(
                            Severity: Major
                            Found in telegram/_files/animation.py - About 1 hr to fix

                              Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def __init__(
                              Severity: Major
                              Found in telegram/_files/video.py - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language