MT013: ValidProjectURLs

Overview

Property Value
ID MT013
Name ValidProjectURLs
Group metadata
Severity WARNING

Description

Checks that URLs defined in [project.urls] are reachable by making HTTP requests.

Valid project URLs are important for:

  • Users finding your documentation and source code
  • Package indexers displaying correct links
  • Building trust with potential users

What it checks

The check verifies that each URL in [project.urls] is accessible:

[project.urls]
Homepage = "https://github.com/username/my-package"
Documentation = "https://my-package.readthedocs.io"
Repository = "https://github.com/username/my-package.git"

For each URL, the check makes an HTTP HEAD request using httpx and verifies:

  • The URL responds with a status code less than 400
  • The connection does not time out (10 second timeout)
  • No connection errors occur

How to fix

Verify that all URLs in your pyproject.toml are correct and accessible:

  1. Check for typos - Ensure URLs are spelled correctly
  2. Verify the resource exists - Make sure the page or repository hasn’t moved
  3. Update stale URLs - Replace outdated URLs with current ones
[project.urls]
Homepage = "https://github.com/username/my-package"
Documentation = "https://my-package.readthedocs.io"
"Bug Tracker" = "https://github.com/username/my-package/issues"

Common issues

  • Repository renamed or moved
  • Documentation site not yet deployed
  • Typos in domain names
  • Using HTTP instead of HTTPS

Configuration

Skip this check

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

CLI

pycmdcheck --skip MT013