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

Make scope.bindings private #3575

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Mar 17, 2023

This PR makes Scope.bindings private and instead adds semantic APIs to Scope that allow querying the bindings.

This reduces the nesting on call sites scope.bindings.get(name) vs scope.get(name)

@MichaReiser
Copy link
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                        main                                   pr
-----                        ----                                   --
linter/large/dataset.py      1.00      7.6±0.02ms     5.4 MB/sec    1.00      7.6±0.02ms     5.4 MB/sec
linter/numpy/ctypeslib.py    1.01      2.6±0.00ms   133.0 MB/sec    1.00      2.6±0.01ms   133.8 MB/sec
linter/numpy/globals.py      1.02   1323.1±3.61µs   134.7 MB/sec    1.00   1295.7±8.10µs   137.6 MB/sec
linter/pydantic/types.py     1.01      3.6±0.01ms     7.1 MB/sec    1.00      3.5±0.01ms     7.2 MB/sec

Windows

group                        main                                   pr
-----                        ----                                   --
linter/large/dataset.py      1.01      8.9±0.14ms     4.6 MB/sec    1.00      8.8±0.12ms     4.6 MB/sec
linter/numpy/ctypeslib.py    1.00      3.0±0.03ms   116.0 MB/sec    1.00      3.0±0.06ms   115.7 MB/sec
linter/numpy/globals.py      1.00  1512.2±26.58µs   117.9 MB/sec    1.00  1519.8±31.64µs   117.3 MB/sec
linter/pydantic/types.py     1.00      4.1±0.08ms     6.3 MB/sec    1.00      4.1±0.08ms     6.3 MB/sec

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Mar 17, 2023
@charliermarsh charliermarsh merged commit 2403d8e into extract-scope Mar 17, 2023
@charliermarsh charliermarsh deleted the make-scope-bindings-private branch March 17, 2023 14:39
MichaReiser added a commit that referenced this pull request Mar 17, 2023
MichaReiser added a commit that referenced this pull request Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants