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

Remove symlinks! #2132

Merged
merged 4 commits into from
May 15, 2018
Merged

Remove symlinks! #2132

merged 4 commits into from
May 15, 2018

Conversation

emmatyping
Copy link
Contributor

This removes symlinks from typeshed, so I can finally get mypy to run cleanly on Windows.

Fixes #1175

raise ValueError('File {f1} does not match file {f2}. Please copy it to {f2}'.format(f1=file1, f2=file2))

if __name__ == '__main__':
main()
Copy link
Member

Choose a reason for hiding this comment

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

Missing a newline at the end.

for file1, file2 in consistent_files:
f1 = os.path.join(os.getcwd(), file1)
f2 = os.path.join(os.getcwd(), file2)
if os.path.islink(f1):
Copy link
Member

Choose a reason for hiding this comment

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

This check should look at all files in typeshed, not just the hardcoded list of identical files.

@@ -0,0 +1,29 @@
import os
Copy link
Member

Choose a reason for hiding this comment

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

Can you add documentation here that says that we can't use symlinks for technical reasons, so we use this as a way to make sure certain groups of files stay identical?

import os
import filecmp

consistent_files = [
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this make more sense as a list of sets, where every member of the set should be identical?

@JelleZijlstra JelleZijlstra merged commit e9600db into python:master May 15, 2018
gwk pushed a commit to gwk/typeshed that referenced this pull request May 29, 2018
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants