Skip to content

Python 3.10 / 4 checker? #409

@hugovk

Description

@hugovk

We don't yet know if 3.10 or 4.0 will follow Python 3.9, but great to see your tests with https://github.com/asottile/python3.10 and the related fixes!

How about a pre-commit hook to detect, and possibly fix, some potential 3.10 errors?

-sys.version[:3]
+'{}.{}'.format(*sys.version_info)

And also any possible Python 4 errors?

-if sys.version_info.major == 3:
+if sys.version_info.major >= 3:
    # Python 3+ stuff
else:
    # Python 2 stuff

Maybe this might not be something for pre-commit, but I think it could be a useful tool of some sort.

Thanks!

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