GitHub Provides Precise Python Code Navigation
Written by Kay Ewbank   
Thursday, 30 December 2021

GitHub has announced that developers can now get precise code navigation in pull requests and specifically in Python code.

The improvements followed hard on the heels of GitHub's announcement of an improved way to search code on the platform, see GitHub Improves Code Search.

githubdeklogo

The first half of the improvement adds precise code navigation for Python. The existing code navigation on GitHub has been “fuzzy” or “search based”, meaning that if you clicked on a reference you'd see all the definitions in your repository with that name. This can result in far too many matches when you're looking for something that has a common name.

The improved code navigation is powered by GitHub's new stack graphs framework. Stack graphs can include detailed information about Python’s name binding rules, making it easier to work out which specific definition each reference refers to.

github code navigation

Stack graphs work without developers having to make any changes to the configuration in repositories, and work for all public repositories and for any private repositories that you have access to. If your repository contains Python code, code navigation in that repository is now precise.

GitHub plans to add the features for additional languages over coming months.

The second improvement adds code navigation to pull requests. Code navigation features have until now only been available when viewing files in GitHub’s code browser. The improvement adds it to the “files changed” tab of each pull request, and if you click on a definition or reference you'll be taken you to the code browser for the pull request’s head branch. GitHub says this improvement makes it more obvious what the impact of your changes might be by letting you see all of the callers that would be affected by a change.

githubdeklogo

More Information

GitHub Navigate code documentation

Related Articles

GitHub Improves Code Search

GitHub Desktop Adds Squashing

GitHub Desktop 2.0 Introduces Stashing and Rebasing

GitHub Copilot Your Programming Pal

GitHub Introduces Super Linter

GitHub Strengthens Team Working

New From GitHub Universe

GitHub Launches Actions

Microsoft Buys GitHub - Get Ready For a Bigger Devil

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Remembering Thomas Kurtz, Co-creator of BASIC
15/11/2024

Thomas Eugene Kurtz, the co-founder of the BASIC programming language, has died at the age of 96. BASIC, which was developed for the purpose of education, popularized computer programming making it ac [ ... ]



Ai-Da's Portrait of Alan Turing At Auction
01/11/2024

Sotheby's Digital Art Day Action, now underway, features a large-scale portrait of  Alan Turing created by Ai-Da, the humanoid robot artist whose work, including this canvas, was exhibited at the [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 30 December 2021 )