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

Split CallPath into QualifiedName and UnqualifiedName #10210

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Mar 3, 2024

Summary

Charlie can probably explain this better than I but it turns out, CallPath is used for two different things:

  • To represent unqualified names like version where version can be a local variable or imported (e.g. from sys import version where the full qualified name is sys.version)
  • To represent resolved, full qualified names

This PR splits CallPath into two types to make this destinction clear.

Note: I haven't renamed all call_path variables to qualified_name or unqualified_name. I can do that if that's welcomed but I first want to get feedback on the approach and naming overall.

Test Plan

cargo test

@MichaReiser MichaReiser requested a review from AlexWaygood as a code owner March 3, 2024 16:25
@MichaReiser MichaReiser added the internal An internal refactor or improvement label Mar 3, 2024
Copy link
Contributor

github-actions bot commented Mar 3, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -1 violations, +0 -0 fixes in 1 projects; 42 projects unchanged)

pandas-dev/pandas (+0 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- pandas/_libs/reshape.pyi:6:5: PLR0917 Too many positional arguments (7/5)

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLR0917 1 0 1 0 0

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser enabled auto-merge (squash) March 4, 2024 09:02
@MichaReiser MichaReiser merged commit a6d892b into main Mar 4, 2024
17 checks passed
@MichaReiser MichaReiser deleted the rename-call-path branch March 4, 2024 09:06
nkxxll pushed a commit to nkxxll/ruff that referenced this pull request Mar 10, 2024
…h#10210)

## Summary

Charlie can probably explain this better than I but it turns out,
`CallPath` is used for two different things:

* To represent unqualified names like `version` where `version` can be a
local variable or imported (e.g. `from sys import version` where the
full qualified name is `sys.version`)
* To represent resolved, full qualified names

This PR splits `CallPath` into two types to make this destinction clear.

> Note: I haven't renamed all `call_path` variables to `qualified_name`
or `unqualified_name`. I can do that if that's welcomed but I first want
to get feedback on the approach and naming overall.

## Test Plan

`cargo test`
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.

2 participants