forked from github.com/pypiserver
Remove redundant parentheses
This commit is contained in:
parent
31a5b5d7e7
commit
676e86d683
@ -51,7 +51,7 @@ parser.add_option("-c", "--config-file",
|
|||||||
help=("Specify the path to the buildout configuration "
|
help=("Specify the path to the buildout configuration "
|
||||||
"file to be used."))
|
"file to be used."))
|
||||||
parser.add_option("-f", "--find-links",
|
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()
|
options, args = parser.parse_args()
|
||||||
|
@ -233,7 +233,7 @@ def main(argv=None):
|
|||||||
c.password_file = v
|
c.password_file = v
|
||||||
elif k in ("-o", "--overwrite"):
|
elif k in ("-o", "--overwrite"):
|
||||||
c.overwrite = True
|
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
|
c.hash_algo = None if not pypiserver.str2bool(v, c.hash_algo) else v
|
||||||
elif k == "--log-file":
|
elif k == "--log-file":
|
||||||
c.log_file = v
|
c.log_file = v
|
||||||
|
@ -1380,7 +1380,7 @@ class BaseRequest(object):
|
|||||||
basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION', ''))
|
basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION', ''))
|
||||||
if basic: return basic
|
if basic: return basic
|
||||||
ruser = self.environ.get('REMOTE_USER')
|
ruser = self.environ.get('REMOTE_USER')
|
||||||
if ruser: return (ruser, None)
|
if ruser: return ruser, None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -381,7 +381,7 @@ def test_upload_badAction(root, testapp):
|
|||||||
assert "Unsupported ':action' field: BAD" in hp.unescape(resp.text)
|
assert "Unsupported ':action' field: BAD" in hp.unescape(resp.text)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(("package"), [f[0]
|
@pytest.mark.parametrize("package", [f[0]
|
||||||
for f in test_core.files
|
for f in test_core.files
|
||||||
if f[1] and '/' not in f[0]])
|
if f[1] and '/' not in f[0]])
|
||||||
def test_upload(package, root, testapp):
|
def test_upload(package, root, testapp):
|
||||||
@ -393,7 +393,7 @@ def test_upload(package, root, testapp):
|
|||||||
assert uploaded_pkgs[0].lower() == package.lower()
|
assert uploaded_pkgs[0].lower() == package.lower()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(("package"), [f[0]
|
@pytest.mark.parametrize("package", [f[0]
|
||||||
for f in test_core.files
|
for f in test_core.files
|
||||||
if f[1] and '/' not in f[0]])
|
if f[1] and '/' not in f[0]])
|
||||||
def test_upload_with_signature(package, root, testapp):
|
def test_upload_with_signature(package, root, testapp):
|
||||||
@ -408,7 +408,7 @@ def test_upload_with_signature(package, root, testapp):
|
|||||||
assert '%s.asc' % package.lower() in uploaded_pkgs
|
assert '%s.asc' % package.lower() in uploaded_pkgs
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(("package"), [
|
@pytest.mark.parametrize("package", [
|
||||||
f[0] for f in test_core.files
|
f[0] for f in test_core.files
|
||||||
if f[1] is None])
|
if f[1] is None])
|
||||||
def test_upload_badFilename(package, root, testapp):
|
def test_upload_badFilename(package, root, testapp):
|
||||||
|
Loading…
Reference in New Issue
Block a user