Skip to main content

6 posts tagged with "vscode"

vscode tag description

View All Tags

Resolving Pylance(reportMissingImports) in VS Code

· 6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

The Pylance(reportMissingImports) error is one of the most common issues Python developers encounter in Visual Studio Code (VS Code). Pylance is a language server that provides intelligent code completion and type checking. This specific error means Pylance cannot find the installed package in the Python environment it is currently configured to inspect.

This issue is almost never a code problem; it is an environment configuration problem within VS Code.

Check history of specific line in vscode

· 4 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

You can check the history of a specific line in VS Code using the built-in Git Blame feature or the Timeline view. For a much more powerful experience, the free GitLens extension is highly recommended.

Regex for searches in VSCode

· 6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Visual Studio Code (VS Code) provides a powerful, built-in regex engine for its Find and Search functions. This feature allows you to perform highly specific and complex searches and replacements across a single file or an entire project.

How to create a template snippet in VS Code that you can use after

· 4 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Typing that boilerplate from scratch every time is not only tedious, but also error-prone. Fortunately, if you're using Visual Studio Code, there are excellent ways to automate this process by creating custom templates or snippets. Let's walk through some effective strategies for doing just that.

Python Doctests: The Complete Guide to Documentation-Driven Testing

· 6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Writing documentation is essential, but code examples in documentation frequently rot over time as codebases evolve. Python's built-in doctest module solves this problem by allowing you to write executable code examples directly inside your docstrings. The system verifies that the actual function output matches your documented example output.

By combining doctest (for living documentation correctness) and pytest (as your primary test runner), you get a symbiotic testing strategy that guarantees your code works and your documentation is always truthful.

This guide covers when to use doctests, how to write them, the various ways to execute them, and how to optimize your developer workflow in VS Code and Gitpod.

How to Easily Write Docstrings in Python Without a Headache (Using VSCode)

· 4 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Writing docstrings in Python can feel like a chore - especially with the odd formatting involving triple quotes, >>> signs, and parameter blocks. But clear, standardized docstrings are critical for both readability and maintainability.

If you're using VSCode (Visual Studio Code), you're in luck. With a few extensions and configurations, you can make writing professional, PEP 257-compliant docstrings painless.