Skip to content

Go To Definition does not work inside python REPL #23509

@bhavyaus

Description

@bhavyaus

Testing #23484

Steps:

  1. Create a python file and include the below sample code:
def is_prime(n):
    """Check if a number is prime."""
    if n <= 1:
        return False
    if n <= 3:
        return True
    if n % 2 == 0 or n % 3 == 0:
        return False
    i = 5
    while i * i <= n:
        if n % i == 0 or n % (i + 2) == 0:
            return False
        i += 6
    return True

def generate_primes(limit):
    """Generate a list of prime numbers up to a given limit."""
    primes = []
    for num in range(limit):
        if is_prime(num):
            primes.append(num)
    return primes

limit = 100
primes = generate_primes(limit)
print(f"Prime numbers up to {limit}: {primes}")
print('Hellp World!')

  1. Select the entire contents of the file and run in Python REPL
  2. In the Python REPL cell, right click on generate_primes(limit) and use Go To Definition command.
  3. Expected cursor to jump to the generate_primes definition but the operation results in a no-op

Metadata

Metadata

Labels

area-replfeature-requestRequest for new features or functionalityneeds spikeLabel for issues that need investigation before they can be worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions