Skip to content

Typing and formatting #1302

Open
Open

Description

@albertedwardson

I would like to volunteer to add type hints with mypy checks and include a formatting tool like Black or Ruff on the main file and tests. But before I have to ask:

  1. Is introducing a formatting tool an acceptable change? There are some places where I would like to change the styling a bit.

  2. If running a formatting tool on the code is not an option, but type hints are, should they be added inline or in a separate .pyi file?

I'm not looking to be disruptive. I just want to know if this is a nice-to-have or if it's not needed

Activity

  1. asottile commented on Oct 29, 2025

    @asottile
    Member

    historically a formatter has been avoided to dogfood pycodestyle on itself

    would be open to type hints and checking though but please do so in reviewable patches

    curious what the motivation is though?

  2. asottile commented on Oct 29, 2025

    @asottile
    Member

    and inline ideally -- though it won't matter for consuming repositories as it is a single file distribution

  3. albertedwardson commented on Oct 29, 2025

    @albertedwardson
    Author

    thanks!

    curious what the motivation is though?

    well, only one: typed code is generally nicer to read and understand :)

    also, I want to add that I'd like to help keep this tool as maintainable as possible. I think every modern linter owes a debt to pycodestyle and its friends, and ensuring its long-term health is a great motivation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions