Skip to main content

6 posts tagged with "static-analysis"

static-analysis tag description

View All Tags

Reasons not to use pyright

· 7 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

While Pyright, particularly its integration via Pylance in VS Code, offers superior speed and a responsive developer experience, it is not without its drawbacks. For certain projects, teams, or development philosophies, Pyright's characteristics can lead to friction, complexity, or outright incompatibility.

Here is a critical assessment of the reasons why an experienced developer might choose not to rely on Pyright, or use it only in a secondary role.

MyPy vs. Pyright

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

MyPy and Pyright are the two most powerful static type checkers currently used in the Python ecosystem. While both aim to enforce type hints and catch errors before runtime, they differ significantly in their implementation, philosophy, speed, and feature set.

Choosing between them—or deciding how to use them together—depends heavily on your priorities: speed, strictness, or integration with development environments.

MyPy Configuration for Strict Typing

· 7 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

MyPy is the premier static type checker for Python. While running MyPy with no configuration works, achieving true, robust type safety requires a configuration that enables strict mode and specifically targets potential weak points in Python's type system.

This article details the essential settings within the mypy.ini, pyproject.toml, or setup.cfg file that an experienced developer uses to maximize type checking effectiveness.

flake8 or ruff - Detects Unused Variables, Bad Patterns, and Syntax Errors Early

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Writing clean and correct code is critical for every Python programmer, especially beginners. Tools like flake8 and ruff help catch issues like unused variables, potential bugs, syntax errors, and styling problems early - often before you even run the code.

What is Pyright and Why You Should Use It

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Python is known for being dynamic, fast to prototype with, and easy to write. But these same characteristics can introduce bugs that are only caught at runtime.

Static type checking-validating code without running it-helps you catch bugs earlier. This is where Pyright enters the stage.

Paradigms Every Beginner Should Know Before Learning Shift Left

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Before diving into Shift Left, which emphasizes catching bugs, performance, and security issues early in the software development lifecycle, it’s important for new programmers to learn the foundational paradigms that support this philosophy.

These paradigms teach early thinking, good code hygiene, and automation - all of which are building blocks of effective software engineering.