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

Fixes from other extensions #103

Merged
merged 2 commits into from Jun 5, 2023
Merged

Conversation

karthiknadig
Copy link
Member

No description provided.

@karthiknadig karthiknadig self-assigned this Jun 2, 2023
@karthiknadig karthiknadig marked this pull request as ready for review June 2, 2023 22:52
return pathlib.Path(file_path1) == pathlib.Path(file_path2)


def normalize_path(file_path: str) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

how did this function before without the path normalization?

Copy link
Member Author

Choose a reason for hiding this comment

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

Normally we don't need path normalization. It is needed in windows if user launches VS Code using case different from the one used in the workspace name. This bug is not hit commonly. But we need to propagate this fix to all extensions in python extension set.

def is_stdlib_file(file_path) -> bool:
"""Return True if the file belongs to standard library."""
return os.path.normcase(os.path.normpath(file_path)).startswith(_site_paths)
def is_stdlib_file(file_path: str) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

is this the standard library for autopep8 specifically?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, this is general standard library

@karthiknadig karthiknadig merged commit 037eefc into microsoft:main Jun 5, 2023
16 checks passed
@karthiknadig karthiknadig deleted the filter-args1 branch June 5, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants