Skip to content

Convert typing to use Standard types where possible. #280

Description

@Christian-B

See: https://peps.python.org/pep-0585/

Starting with python 3.9 where applicable Standard classes

So instead of doing List[int] we can type as list[int]


As readthedocs is able to use type hint in the def to document param types we will remove ALL tying from the method documentation.


While doing this I will apply the rule at all (OK almost all) methods must be typed.

Exception will be (I reserve the right to add to this list)

  • Deep generic methods like AbstractBase.new

  • spinn_utilities/citation as I am not civinced we want to keep this code


All public methods must be documented

A protected (single underscore) should be documented.

Private need not be documented.


WILL not work with Python 3.8!


Features only available in Python 3.10 will not be used so we will keep

  • from typing_extensions import TypeAlias

Activity

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

Metadata

Metadata

Assignees

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