FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104050: Add more type annotations to Argument Clinic by erlend-aasland · Pull Request #104628 · python/cpython · GitHub

/ cpython Public

gh-104050: Add more type annotations to Argument Clinic - #104628

Merged
erlend-aasland merged 3 commits into
python:mainfrom
erlend-aasland:typed-clinic/pre-parser
May 18, 2023
Merged

gh-104050: Add more type annotations to Argument Clinic#104628
erlend-aasland merged 3 commits into
python:mainfrom
erlend-aasland:typed-clinic/pre-parser

Conversation

erlend-aasland commented May 18, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor
  • class Class
  • class Module
  • class PythonParser
  • function compute_checksum()
  • function parse_file()
  • variable unsupported_special_methods

- class Class
- class Module
- class PythonParser
- function compute_checksum()
- function parse_file()
- variable unsupported_special_methods
Comment thread Tools/clinic/clinic.py
Comment thread Tools/clinic/clinic.py Outdated
Comment thread Tools/clinic/clinic.py
Comment on lines +2304 to +2305
self.modules: ModuleDict = collections.OrderedDict()
self.classes: ClassDict = collections.OrderedDict()

AlexWaygood May 18, 2023
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Since we're touching these lines anyway: do these need to be OrderedDicts anymore? Regular dicts are guaranteed by the language spec to be ordered on 3.7+ (and clinic now requires 3.10+), and regular dicts are faster than OrderedDicts. OrderedDicts are mainly there for backwards compatibility these days (they have a few fancy methods that dicts don't have, but I really doubt we need any of them in clinic.py).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could leave this to another PR, though

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes, regular dicts should be fine post 3.7.

erlend-aasland enabled auto-merge (squash) May 18, 2023 22:53
erlend-aasland changed the title gh-104050: Add more typing annotations to Argument Clinic gh-104050: Add more type annotations to Argument Clinic May 18, 2023
erlend-aasland merged commit 94c8eda into python:main May 18, 2023
carljm added a commit to carljm/cpython that referenced this pull request May 18, 2023
* main:
  pythongh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols (python#104622)
  pythongh-104623: Update Windows installer to use SQLite 3.42.0 (python#104625)
  pythongh-104050: Add more type annotations to Argument Clinic (python#104628)
  pythongh-104629: Don't skip test_clinic if _testclinic is missing (python#104630)
  pythongh-104549: Set __module__ on TypeAliasType (python#104550)
  pythongh-104050: Improve some typing around `default`s and sentinel values (python#104626)
  pythongh-104146: Remove unused vars from Argument Clinic (python#104627)
  pythongh-104615: don't make unsafe swaps in apply_static_swaps (python#104620)
  pythonGH-104484: Add case_sensitive argument to `pathlib.PurePath.match()` (pythonGH-104565)
  pythonGH-96803: Document and test new unstable internal frame API functions (pythonGH-104211)
  pythonGH-104580: Don't cache eval breaker in interpreter (pythonGH-104581)
erlend-aasland deleted the typed-clinic/pre-parser branch May 21, 2023 20:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL