diff --git a/bootstrap.py b/bootstrap.py index ec3757a..3bc5247 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -51,7 +51,7 @@ parser.add_option("-c", "--config-file", help=("Specify the path to the buildout configuration " "file to be used.")) parser.add_option("-f", "--find-links", - help=("Specify a URL to search for buildout releases")) + help="Specify a URL to search for buildout releases") options, args = parser.parse_args() diff --git a/pypiserver/__main__.py b/pypiserver/__main__.py index 12c6c76..856071c 100644 --- a/pypiserver/__main__.py +++ b/pypiserver/__main__.py @@ -233,7 +233,7 @@ def main(argv=None): c.password_file = v elif k in ("-o", "--overwrite"): c.overwrite = True - elif k in ("--hash-algo"): + elif k in "--hash-algo": c.hash_algo = None if not pypiserver.str2bool(v, c.hash_algo) else v elif k == "--log-file": c.log_file = v diff --git a/pypiserver/bottle.py b/pypiserver/bottle.py index 5f59fc7..a832075 100644 --- a/pypiserver/bottle.py +++ b/pypiserver/bottle.py @@ -1380,7 +1380,7 @@ class BaseRequest(object): basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION', '')) if basic: return basic ruser = self.environ.get('REMOTE_USER') - if ruser: return (ruser, None) + if ruser: return ruser, None return None @property diff --git a/tests/test_app.py b/tests/test_app.py index bfd0352..5e954ea 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -381,9 +381,9 @@ def test_upload_badAction(root, testapp): assert "Unsupported ':action' field: BAD" in hp.unescape(resp.text) -@pytest.mark.parametrize(("package"), [f[0] - for f in test_core.files - if f[1] and '/' not in f[0]]) +@pytest.mark.parametrize("package", [f[0] + for f in test_core.files + if f[1] and '/' not in f[0]]) def test_upload(package, root, testapp): resp = testapp.post("/", params={':action': 'file_upload'}, upload_files=[('content', package, b'')]) @@ -393,9 +393,9 @@ def test_upload(package, root, testapp): assert uploaded_pkgs[0].lower() == package.lower() -@pytest.mark.parametrize(("package"), [f[0] - for f in test_core.files - if f[1] and '/' not in f[0]]) +@pytest.mark.parametrize("package", [f[0] + for f in test_core.files + if f[1] and '/' not in f[0]]) def test_upload_with_signature(package, root, testapp): resp = testapp.post("/", params={':action': 'file_upload'}, upload_files=[ @@ -408,7 +408,7 @@ def test_upload_with_signature(package, root, testapp): assert '%s.asc' % package.lower() in uploaded_pkgs -@pytest.mark.parametrize(("package"), [ +@pytest.mark.parametrize("package", [ f[0] for f in test_core.files if f[1] is None]) def test_upload_badFilename(package, root, testapp):