From the course: GitHub Copilot for Software Developers by Microsoft Press

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Generate meaningful code comments and docstrings

Generate meaningful code comments and docstrings - Github Copilot Tutorial

From the course: GitHub Copilot for Software Developers by Microsoft Press

Generate meaningful code comments and docstrings

- All right, in this first video, we're going to take a look at how GitHub Copilot can help you automatically generate meaningful documentation. And we're going to start here by taking a look at docstrings and inline comments. And it can do all of this based on your code, right? So in previous videos we've taken a look at how GitHub Copilot can generate code from comments that you've written, but it's perfectly possible to do the reverse where you just have it write the comments for you after you write the code. All right, so one of the easiest ways to get documentation help from Copilot is just to write a function signature, right? Copilot will usually respond in this case by automatically inserting a docstring without you needing to prompt it directly. That can happen sometimes. It kind of depends on your exact setup and the function you're writing, but I'll show you that in more detail shortly. All right, now, the next thing to know before we take a look at some examples is that…

Contents