camilo-cf/Bible-pybot-Telegram

View on GitHub

Showing 58 of 58 total issues

File pages.py has 539 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from email import message
import logging as log
import sys
from telebot.util import split_string as split_string
 
 
Severity: Major
Found in src/telegram_pages/pages.py - About 1 day to fix

    Cyclomatic complexity is too high in function get_message. (7)
    Open

    def get_message(message: str, bible_version: str = "akjv") -> list:
    """Get the passage of the Bible given an income message.
     
    Args:
    message (str):
    Severity: Minor
    Found in src/utils/bible.py by radon

    Cyclomatic complexity is too high in method default. (7)
    Open

    def default(
    self,
    user_id: str,
    income_text: str,
    ) -> list:
    Severity: Minor
    Found in src/telegram_pages/pages.py by radon

    Cyclomatic complexity is too high in method return_verse. (6)
    Open

    def return_verse(self, user_id: str, income_text: str) -> list:
    """Return the desired verse
     
    Args:
    user_id (str):
    Severity: Minor
    Found in src/telegram_pages/pages.py by radon

    Function return_verse has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def return_verse(self, user_id: str, income_text: str) -> list:
    """Return the desired verse
     
    Args:
    user_id (str):
    Severity: Minor
    Found in src/telegram_pages/pages.py - About 55 mins to fix

    Function send_chapter has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def send_chapter(
    self,
    user_id: str,
    ) -> list:
    """Send chapter functionality
    Severity: Minor
    Found in src/telegram_pages/pages.py - About 45 mins to fix

    Function get_message has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def get_message(message: str, bible_version: str = "akjv") -> list:
    """Get the passage of the Bible given an income message.
     
    Args:
    message (str):
    Severity: Minor
    Found in src/utils/bible.py - About 45 mins to fix

    Avoid too many return statements within this function.
    Open

    return [
    Severity: Major
    Found in src/telegram_pages/pages.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

      return [self.set_bible_version(user_id, income_text)]
      Severity: Major
      Found in src/telegram_pages/pages.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

        return [self.set_chapter_selection(user_id, income_text)]
        Severity: Major
        Found in src/telegram_pages/pages.py - About 30 mins to fix

          Function default has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          def default(
          self,
          user_id: str,
          income_text: str,
          ) -> list:
          Severity: Minor
          Found in src/telegram_pages/pages.py - About 25 mins to fix

          Function set_chapter_selection has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          def set_chapter_selection(self, user_id: str, income_text: str) -> str:
          """_summary_
           
          Args:
          user_id (str):
          Severity: Minor
          Found in src/telegram_pages/pages.py - About 25 mins to fix

          Trailing whitespace
          Open

          chapter TINYINT DEFAULT 1,
          Severity: Minor
          Found in src/utils/queries.py by pep8

          Double quote to prevent globbing and word splitting.
          Open

          docker run --rm -v ${PWD}:/app -d biblepybottelegram
          Severity: Minor
          Found in build_run.sh by shellcheck

          Line length
          Open

          * Get your current status in the service (language, subscription status, bible version, current chapter/book)
          Severity: Info
          Found in README.md by markdownlint

          Line length
          Open

          This project uses the http://getbible.net API to gather the bible verses on different bible versions and languages.
          Severity: Info
          Found in README.md by markdownlint

          Line length
          Open

          * Get a daily chapter in consecutive order (set the current book and chapter you are reading, or start from Genesis 1).
          Severity: Info
          Found in README.md by markdownlint

          Inline HTML
          Open

          <img src="doc/Screeenrecord.gif" width="200"/>
          Severity: Info
          Found in README.md by markdownlint

          Headers should be surrounded by blank lines
          Open

          ### Screen record
          Severity: Info
          Found in README.md by markdownlint

          Module level import not at top of file
          Open

          import utils.queries as Q
          Severity: Minor
          Found in src/utils/database_control.py by pep8
          Severity
          Category
          Status
          Source
          Language