Skip to content

Prefer property decorator to explicit call #765

@jaraco

Description

@jaraco

This is a feature request for pyupgrade.

Prior to Python 2.4, it wasn't possible to use decorators, so properties were had to be implemented in a two-step process. I recently stumbled onto such code and had hopes pyupgrade would automatically fix that usage, but alas, it did not. It would be nice if pyupgrade could support upgrading that syntax.

Even better would be if it could also upgrade the setter syntax and maybe others (I don't think I've ever used a deleter).

Given the age of Python 2.3 compatible code, it may not be worthwhile implementing this upgrade, but I thought I'd register the concern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions