Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete uses of typing.* #433

Closed
shsms opened this issue Jun 12, 2023 · 1 comment · Fixed by #644
Closed

Remove obsolete uses of typing.* #433

shsms opened this issue Jun 12, 2023 · 1 comment · Fixed by #644
Assignees
Labels
priority:low This should be addressed only if there is nothing else on the table type:tech-debt Improves the project without visible changes for users
Milestone

Comments

@shsms
Copy link
Contributor

shsms commented Jun 12, 2023

Oh, interesting that you can use type as a generic type, maybe you should replace the other Type uses?

Originally posted by @leandro-lucarella-frequenz in #422 (comment)

@llucax
Copy link
Contributor

llucax commented Jun 12, 2023

I want to eventually add pyupgrade to repo-config, which should do this automatically: https://github.com/asottile/pyupgrade#pep-585-typing-rewrites

I guess this is a motivation to do it sooner than later, will probably be more worth investing the time in integrating pyupgrade than in fixing it manually :)

@llucax llucax added this to the v1.0.0 milestone Aug 8, 2023
@llucax llucax added priority:low This should be addressed only if there is nothing else on the table type:tech-debt Improves the project without visible changes for users labels Aug 8, 2023
@llucax llucax modified the milestones: v1.0.0, v1.0.0-rc Aug 10, 2023
@llucax llucax moved this from To do to In progress in Python SDK Roadmap Sep 5, 2023
github-merge-queue bot pushed a commit that referenced this issue Sep 7, 2023
The tool `pyupgrade` was used to modernize the code base given that
frequenz-SDK is already using python 3.11 as minimum version. The tool
was mainly used to replace obsolete types.

Just as a reference the tool was run with the following shell command:

```sh
find ./src ./benchmarks ./docs ./examples ./tests -name '*.py' -exec pyupgrade --py311-plus {} \;
```

Also `black` and `isort` were both run to format the code base after
running `pyupgrade`.

Fixes #433
@github-project-automation github-project-automation bot moved this from In progress to Done in Python SDK Roadmap Sep 7, 2023
github-merge-queue bot pushed a commit to frequenz-floss/frequenz-channels-python that referenced this issue Sep 7, 2023
The tool `pyupgrade` was used to modernize the code base given that
frequenz-channels is already using python 3.11
as minimum version. The tool was mainly used to replace obsolete types.

Also `black` and `isort` tools were both run to format the code base
after running `pyupgrade`.

Related to
frequenz-floss/frequenz-sdk-python#433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low This should be addressed only if there is nothing else on the table type:tech-debt Improves the project without visible changes for users
Projects
Development

Successfully merging a pull request may close this issue.

3 participants