'How to change the color of variables/funktions in Pycharm

I'm currently working on a project to download a bunch of hentai using api requests. The code works, but whenever i found a bug, I always had to use the search function to see where variables or funktions i created are located in the code. Then I had the idea, to change the color of the funktions, so that if i wanted to look for the funktion Sample_funktion i would just have to look for the color red.

from time import sleep
from keyboard import is_pressed
import random
import win32clipboard

# SETTINGS
pyautogui.PAUSE = 0.5
reloadtime = 1
s2tv = 1
nothing = 1786, 327
filedownload = "720p.png"

# VARIABLES
captchas_destroyed = 0
fucked_by_captchas = 0
data = None


def get_URL():
    global data
    pyautogui.hotkey('ctrl', 'l')
    pyautogui.hotkey('ctrl', 'c')
    win32clipboard.OpenClipboard()
    data = win32clipboard.GetClipboardData()
    win32clipboard.CloseClipboard()


def p720_checker():
    p720 = pyautogui.locateCenterOnScreen(filedownload, grayscale=True, confidence=0.95)
    if p720 is not None:
        pyautogui.click(p720)


def check4ads():
    ads = pyautogui.locateCenterOnScreen('close_ad.png', grayscale=True, confidence=0.95)
    if ads is not None:
        pyautogui.click(ads)


def yellow_download():
    yellow_download_kink = pyautogui.locateCenterOnScreen('getdownloadlinks.png', grayscale=True, confidence=0.9)
    if yellow_download_kink is not None:
        pyautogui.click(yellow_download_kink)


def cloud_download_checker():
    download_cloud = pyautogui.locateCenterOnScreen("gray_cloud.png", grayscale=True, confidence=0.9)
    if download_cloud is not None:
        pyautogui.click(download_cloud)


def randomclick(box):
    x_click = int(random.uniform(box.left, box.left + box.width))
    y_click = int(random.uniform(box.top, box.top + box.height))
    pyautogui.moveTo(x_click, y_click, duration=random.uniform(0.1, 0.2))
    sleep(random.uniform(0.2, 0.3))
    pyautogui.click()
    sleep(random.uniform(1, 2))


def moverandomasf():
    for hot_single_moms in range(random.randint(2, 6)):
        x_click = random.randint(1, 1080)
        y_click = random.randint(1, 1080)
        pyautogui.moveTo(x=x_click, y=y_click, duration=random.uniform(0.2, 0.5))


def reload():
    pyautogui.hotkey('ctrl', 'r')
    sleep(reloadtime)


def s2t():
    sleep(s2tv)


def andere_tabs_schließen():
    pyautogui.hotkey('alt', 'o')
    sleep(s2tv)


def captcha_checka():
    global captchas_destroyed, fucked_by_captchas
    captchabox = pyautogui.locateOnScreen("Roboterfeld.png", grayscale=False, confidence=0.9)
    if captchabox is not None:
        moverandomasf()
        randomclick(captchabox)
        if pyautogui.locateCenterOnScreen("imnotarobotiswear.png", grayscale=True, confidence=0.9):
            print("I DESTROYED DA CAPTCHA BADABABOOM")
            captchas_destroyed += 1
        elif pyautogui.locateCenterOnScreen("fucked_by_captcha.png", grayscale=True, confidence=0.9):
            print("I just got fucked by the captcha... rest in pieces")
            reload()
            fucked_by_captchas += 1
            captcha_checka()
    else:
        print("No captcha that I can destroy!")


while True:
    if is_pressed("ü"):
        s2t()
        while not is_pressed("ü"):
            check4ads()
            pyautogui.scroll(-120)
            gay_heart = pyautogui.locateCenterOnScreen("gray_heart.png", grayscale=False, confidence=0.9)
            if gay_heart is not None:
                pyautogui.click(gay_heart)
                cloud_download_checker()
                s2t()
                check4ads()
                captcha_checka()
                yellow_download()
                s2t()
                p720_checker()

Sample of my code

Is this possible in pycharm 2020.3.3?

Kind regards, Alupy



Solution 1:[1]

As far as I understand, Pycharm does not currently support separate colors for specific functions. It does support using a single color for ALL function definitions and another single color for ALL function calls.

I would start becoming familiar with the actions 'Find Usage', 'Find Usages', 'Find Usages in File', and 'Show Usages'. These will all help you locate where a function is being used.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcel Wilson