Skip to content

Add 3.12 examples from the typing preview - #438

Merged
gahjelle merged 9 commits into
masterfrom
gahjelle-python312-typing
Sep 25, 2023
Merged

gahjelle merged 9 commits into
masterfrom
gahjelle-python312-typing

Conversation

@gahjelle

Copy link
Copy Markdown
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉
@gahjelle
gahjelle requested a review from bzaczynski September 20, 2023 06:57
@gahjelle

Copy link
Copy Markdown
Contributor Author

I see that the linters are crashing on the new type variable syntax. I'll investigate whether we can update linters, or if we should do what Leodanis did for the f-strings, and provide the new syntax within comments.

Comment thread python-312/README.md Outdated

### Static Typing Improvements

You'll find all static typing examples inside the [`typing/`](typing/) directory. You should install the Pyright type checker for PyPI:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✍️ Typo

Should this be from instead of for? 🤔

Suggested change
You'll find all static typing examples inside the [`typing/`](typing/) directory. You should install the Pyright type checker for PyPI:
You'll find all static typing examples inside the [`typing/`](typing/) directory. You should install the Pyright type checker from PyPI:
Comment thread python-312/README.md Outdated
Comment on lines +155 to +160
- [`generic_queue.py`](typing/generic_queue.py) and [`generic_queue_311.py`](typing/generic_queue_311.py)
- [`list_helpers.py`](typing/list_helpers.py) and [`list_helpers_311.py`](typing/list_helpers_311.py)
- [`concatenation.py`](typing/concatenation.py) and [`concatenation_311.py`](typing/concatenation_311.py)
- [`inspect_string.py`](typing/inspect_string.py) and [`inspect_string_311.py`](typing/inspect_string_311.py)
- [`deck.py`](typing/deck.py) and [`deck_311.py`](typing/deck_311.py)
- [`alias.py`](typing/alias.py) and [`alias_311.py`](typing/alias_311.py)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Fact Check

Missing files? I'm not seeing the *_311.py files in this pull request.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry. I had updated the README to remove these links after I combined the 3.11 and 3.12, but the README wasn't committed. Should be fixed now.

@bzaczynski bzaczynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gahjelle LGTM!

@gahjelle
gahjelle merged commit e06ae43 into master Sep 25, 2023
@gahjelle
gahjelle deleted the gahjelle-python312-typing branch September 25, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants