-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix typeshed sync #1841
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
Closed
Closed
fix typeshed sync #1841
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -442,7 +442,7 @@ def test_copy2(self) -> None: | |
| self.assertEqual(getattr(file1_stat, 'st_flags'), | ||
| getattr(file2_stat, 'st_flags')) | ||
|
|
||
| @unittest.skipUnless(zlib, "requires zlib") | ||
| @unittest.skipUnless(zlib is not None, "requires zlib") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For these I think the stub for skipUnless should take object, not bool. |
||
| def test_make_tarball(self) -> None: | ||
| # creating something to tar | ||
| tmpdir = self.mkdtemp() | ||
|
|
@@ -505,8 +505,8 @@ def _create_files(self) -> Tuple[str, str, str]: | |
| base_name = os.path.join(tmpdir2, 'archive') | ||
| return tmpdir, tmpdir2, base_name | ||
|
|
||
| @unittest.skipUnless(zlib, "Requires zlib") | ||
| @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), | ||
| @unittest.skipUnless(zlib is not None, "Requires zlib") | ||
| @unittest.skipUnless((find_executable('tar') and find_executable('gzip')) is not None, | ||
| 'Need the tar command to run') | ||
| def test_tarfile_vs_tar(self) -> None: | ||
| tmpdir, tmpdir2, base_name = self._create_files() | ||
|
|
@@ -560,7 +560,7 @@ def test_tarfile_vs_tar(self) -> None: | |
| tarball = base_name + '.tar' | ||
| self.assertTrue(os.path.exists(tarball)) | ||
|
|
||
| @unittest.skipUnless(zlib, "Requires zlib") | ||
| @unittest.skipUnless(zlib is not None, "Requires zlib") | ||
| @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') | ||
| def test_make_zipfile(self) -> None: | ||
| # creating something to tar | ||
|
|
@@ -584,7 +584,7 @@ def test_make_archive(self) -> None: | |
| base_name = os.path.join(tmpdir, 'archive') | ||
| self.assertRaises(ValueError, make_archive, base_name, 'xxx') | ||
|
|
||
| @unittest.skipUnless(zlib, "Requires zlib") | ||
| @unittest.skipUnless(zlib is not None, "Requires zlib") | ||
| def test_make_archive_owner_group(self) -> None: | ||
| # testing make_archive with owner and group, with various combinations | ||
| # this works even if there's not gid/uid support | ||
|
|
@@ -612,7 +612,7 @@ def test_make_archive_owner_group(self) -> None: | |
| self.assertTrue(os.path.exists(res)) | ||
|
|
||
|
|
||
| @unittest.skipUnless(zlib, "Requires zlib") | ||
| @unittest.skipUnless(zlib is not None, "Requires zlib") | ||
| @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") | ||
| def test_tarfile_root_owner(self) -> None: | ||
| tmpdir, tmpdir2, base_name = self._create_files() | ||
|
|
@@ -683,7 +683,7 @@ def _compare_dirs(self, dir1: str, dir2: str) -> List[str]: | |
| diff.append(file_) | ||
| return diff | ||
|
|
||
| @unittest.skipUnless(zlib, "Requires zlib") | ||
| @unittest.skipUnless(zlib is not None, "Requires zlib") | ||
| def test_unpack_archive(self) -> None: | ||
| formats = ['tar', 'gztar', 'zip'] | ||
| if BZ2_SUPPORTED: | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed more simply by making SplitNamespace inherit from Namespace.