MT001: HasProjectName

Overview

Property Value
ID MT001
Name HasProjectName
Group metadata
Severity ERROR

Description

Checks that the [project].name field is defined in pyproject.toml.

The project name is the identifier used when installing and importing your package. It’s required for:

  • Publishing to PyPI
  • Installing with pip
  • Dependency resolution

What it checks

The check verifies that pyproject.toml contains:

[project]
name = "your-package-name"

How to fix

Add the name field to your pyproject.toml:

[project]
name = "my-package"

Naming conventions

  • Use lowercase letters, numbers, and hyphens
  • Avoid underscores (use hyphens instead)
  • Keep it short and memorable
  • Check PyPI for name availability

Configuration

Skip this check

[tool.pycmdcheck]
skip = ["MT001"]

CLI

pycmdcheck --skip MT001