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

bears/general: Add CheckmanifestBear #1066

Closed
wants to merge 1 commit into from
Closed

Conversation

aptrishu
Copy link
Member

Adds CheckmanifestBear for https://pypi.python.org/pypi/check-manifest
to check MANIFEST.in for completeness.

Closes #798

@gitmate-bot
Copy link
Collaborator

Thanks for your contribution!

Reviewing pull requests take really a lot of time and we're all volunteers. Please make sure you go through the following check list and complete them all before pinging someone for a review.

As you learn things over your Pull Request please help others on the chat and on PRs to get their stuff right as well!

settings={"ignore": "unrelated.txt"})

if __name__ == '__main__':
unittest.main
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -28,4 +28,4 @@
 			settings={"ignore": "unrelated.txt"})
 
 if __name__ == '__main__':
-    unittest.main+    unittest.main


from bears.general.CheckmanifestBear import CheckmanifestBear
from tests.LocalBearTestHelper import verify_local_bear

Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -5,7 +5,9 @@
 from bears.general.CheckmanifestBear import CheckmanifestBear
 from tests.LocalBearTestHelper import verify_local_bear
 
+
 class TestExample(unittest.TestCase):
+
     def setUp(self):
         self.test_dir = tempfile.mkdtemp()
 

@@ -0,0 +1,31 @@
import shutil, tempfile
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -1,4 +1,5 @@
-import shutil, tempfile
+import shutil
+import tempfile
 from os import path
 import unittest
 

extra += '-u '
args = ()
if ignore:
args = (extra + '--ignore=' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/bears/general/CheckmanifestBear.py
+++ b/bears/general/CheckmanifestBear.py
@@ -41,6 +41,6 @@
             extra += '-u '
         args = ()
         if ignore:
-          args = (extra + '--ignore=' +
-                  ','.join(ignore),)
+            args = (extra + '--ignore=' +
+                    ','.join(ignore),)
         return args + (os.path.dirname(filename),)

settings={"ignore": "unrelated.txt"})

if __name__ == '__main__':
unittest.main
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • No newline at EOF.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -28,4 +28,4 @@
 			settings={"ignore": "unrelated.txt"})
 
 if __name__ == '__main__':
-    unittest.main+    unittest.main

invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
settings={"ignore": "unrelated.txt"})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -25,7 +25,7 @@
 			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
-			settings={"ignore": "unrelated.txt"})
+            settings={"ignore": "unrelated.txt"})
 
 if __name__ == '__main__':
     unittest.main```

CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -24,7 +24,7 @@
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
-			valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
+            valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
 			settings={"ignore": "unrelated.txt"})
 
 if __name__ == '__main__':

f.write('Hello from the other side')
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -23,7 +23,7 @@
 		f.write('Hello from the other side')
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
-		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
+        CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
 			settings={"ignore": "unrelated.txt"})
 

f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
f.write('Hello from the other side')
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -22,7 +22,7 @@
 		f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
 		f.write('Hello from the other side')
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
-			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
+            invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
 			settings={"ignore": "unrelated.txt"})

f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
f.write('Hello from the other side')
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -21,7 +21,7 @@
 		f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
 		f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
 		f.write('Hello from the other side')
-		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
+        CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			valid_files=(path.join(self.test_dir, 'MANIFEST.in')),

f.write("# wow. such code. so amaze\n")
f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
f.write('Hello from the other side')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -20,7 +20,7 @@
 			f.write("# wow. such code. so amaze\n")
 		f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
 		f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
-		f.write('Hello from the other side')
+        f.write('Hello from the other side')
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,

with open(path.join(self.test_dir, 'sample.py'), 'w') as f:
f.write("# wow. such code. so amaze\n")
f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -19,7 +19,7 @@
         with open(path.join(self.test_dir, 'sample.py'), 'w') as f:
 			f.write("# wow. such code. so amaze\n")
 		f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
-		f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
+        f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
 		f.write('Hello from the other side')
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
 			invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))

f.write("setup(name='sample', py_modules=['sample'])\n")
with open(path.join(self.test_dir, 'sample.py'), 'w') as f:
f.write("# wow. such code. so amaze\n")
f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -18,7 +18,7 @@
             f.write("setup(name='sample', py_modules=['sample'])\n")
         with open(path.join(self.test_dir, 'sample.py'), 'w') as f:
 			f.write("# wow. such code. so amaze\n")
-		f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
+        f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
 		f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
 		f.write('Hello from the other side')
 		CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,

f.write("from setuptools import setup\n")
f.write("setup(name='sample', py_modules=['sample'])\n")
with open(path.join(self.test_dir, 'sample.py'), 'w') as f:
f.write("# wow. such code. so amaze\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -17,7 +17,7 @@
             f.write("from setuptools import setup\n")
             f.write("setup(name='sample', py_modules=['sample'])\n")
         with open(path.join(self.test_dir, 'sample.py'), 'w') as f:
-			f.write("# wow. such code. so amaze\n")
+            f.write("# wow. such code. so amaze\n")
 		f = open(path.join(self.test_dir, 'MANIFEST.in'), 'w')
 		f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
 		f.write('Hello from the other side')


@staticmethod
def create_arguments(filename, file, config_file,
create: bool=False, update: bool=False, ignore: list=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (84 > 79)

LineLengthBear, severity NORMAL, section linelength.


@staticmethod
def create_arguments(filename, file, config_file,
create: bool=False, update: bool=False, ignore: list=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (84 > 79)

LineLengthBear, severity NORMAL, section linelength.

f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
f.write('Hello from the other side')
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/general/CheckmanifestBearTest.py
+++ b/tests/general/CheckmanifestBearTest.py
@@ -25,10 +25,11 @@
         f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
         f.write('Hello from the other side')
         CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
-            invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
+                                                             invalid_files=(path.join(self.test_dir, 'MANIFEST.in')))
         CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
-            valid_files=(path.join(self.test_dir, 'MANIFEST.in')),
-            settings={"ignore": "unrelated.txt"})
+                                                             valid_files=(
+                                                                 path.join(self.test_dir, 'MANIFEST.in')),
+                                                             settings={"ignore": "unrelated.txt"})
 
 if __name__ == '__main__':
     unittest.main

f.write('Hello from the other side')
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir,
'MANIFEST.in')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (102 > 79)

LineLengthBear, severity NORMAL, section linelength.

f = open(path.join(self.test_dir, 'unrelated.txt'), 'w')
f.write('Hello from the other side')
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (100 > 79)

LineLengthBear, severity NORMAL, section linelength.


@staticmethod
def create_arguments(filename, file, config_file,
create: bool=False, update: bool=False, ignore: list=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (84 > 79)

LineLengthBear, severity NORMAL, section linelength.

extra += '-u '
args = ()
if ignore:
args = (extra + '--ignore=' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/bears/rest/CheckmanifestBear.py
+++ b/bears/rest/CheckmanifestBear.py
@@ -41,6 +41,6 @@
             extra += '-u '
         args = ()
         if ignore:
-          args = (extra + '--ignore=' +
-                  ','.join(ignore),)
+            args = (extra + '--ignore=' +
+                    ','.join(ignore),)
         return args + (os.path.dirname(filename),)

path.join(self.test_dir,
'MANIFEST.in')),
settings={"ignore":
"unrelated.txt"})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (88 > 79)

LineLengthBear, severity NORMAL, section linelength.

valid_files=(
path.join(self.test_dir,
'MANIFEST.in')),
settings={"ignore":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (80 > 79)

LineLengthBear, severity NORMAL, section linelength.

CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
valid_files=(
path.join(self.test_dir,
'MANIFEST.in')),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (91 > 79)

LineLengthBear, severity NORMAL, section linelength.

'MANIFEST.in')))
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
valid_files=(
path.join(self.test_dir,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (89 > 79)

LineLengthBear, severity NORMAL, section linelength.

# Ignore LineLengthBear
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir,
'MANIFEST.in')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (102 > 79)

LineLengthBear, severity NORMAL, section linelength.

f.write('Hello from the other side')
# Ignore LineLengthBear
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
invalid_files=(path.join(self.test_dir,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (100 > 79)

LineLengthBear, severity NORMAL, section linelength.


@staticmethod
def create_arguments(filename, file, config_file,
create: bool=False, update: bool=False, ignore: list=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (84 > 79)

LineLengthBear, severity NORMAL, section linelength.

Adds CheckmanifestBear for https://pypi.python.org/pypi/check-manifest
to check MANIFEST.in for completeness.

Closes coala#798
extra += '-u '
args = ()
if ignore:
args = (extra + '--ignore=' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/bears/rest/CheckmanifestBear.py
+++ b/bears/rest/CheckmanifestBear.py
@@ -41,6 +41,6 @@
             extra += '-u '
         args = ()
         if ignore:
-          args = (extra + '--ignore=' +
-                  ','.join(ignore),)
+            args = (extra + '--ignore=' +
+                    ','.join(ignore),)
         return args + (os.path.dirname(filename),)

path.join(self.test_dir,
'MANIFEST.in')),
settings={"ignore":
"unrelated.txt"})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (88 > 79)

LineLengthBear, severity NORMAL, section linelength.

valid_files=(
path.join(self.test_dir,
'MANIFEST.in')),
settings={"ignore":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (80 > 79)

LineLengthBear, severity NORMAL, section linelength.

CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
valid_files=(
path.join(self.test_dir,
'MANIFEST.in')),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (91 > 79)

LineLengthBear, severity NORMAL, section linelength.

'MANIFEST.in')))
CheckmanifestBearTest_suggestion = verify_local_bear(CheckmanifestBear,
valid_files=(
path.join(self.test_dir,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (89 > 79)

LineLengthBear, severity NORMAL, section linelength.


@staticmethod
def create_arguments(filename, file, config_file,
create: bool=False, update: bool=False, ignore: list=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (84 > 79)

LineLengthBear, severity NORMAL, section linelength.

@jayvdb
Copy link
Member

jayvdb commented Apr 28, 2017

Work continues at #1067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants