Commit ef9d5014 authored by Jakub Ružička's avatar Jakub Ružička
Browse files

style: clean flake8 warnings

parent d50bc7a8
......@@ -11,8 +11,6 @@ Options:
"""
from docopt import docopt
from sh import git
import sys
from cznicinfo import infocore
from cznicinfo import infoquery
......
......@@ -11,7 +11,7 @@ from cznicinfo import infoprint
def run_command(*args, **kwargs):
cargs = docopt(__doc__)
docopt(__doc__)
info = infocore.get_info()
infoprint.pretty_list_projects(info['projects'])
......
......@@ -18,7 +18,7 @@ Options:
* %(repology_url)s - URL to repology versions page
--format <fmt> Python format string to print project with.
Default: '%(path_with_namespace)s: %(name)s'
"""
""" # noqa
import json
import requests
......@@ -31,7 +31,9 @@ from cznicinfo import repology
GITLAB_INSTANCE = "https://gitlab.nic.cz"
CHOICE_PARAMS = {
'order_by': ['id', 'name', 'path', 'created_at', 'updated_at', 'last_activity_at'],
'order_by': [
'id', 'name', 'path', 'created_at', 'updated_at', 'last_activity_at'
],
'sort': ['asc', 'desc'],
}
......@@ -112,7 +114,8 @@ def run_command(*args, **kwargs):
if filter_repology:
if not repology.repology_project_exists(project['path']):
continue
project['repology_url'] = repology.get_repology_versions_url(project['path'])
project['repology_url'] = repology.get_repology_versions_url(
project['path'])
print_project(project, fmt=cargs['--format'])
return 0
......@@ -13,4 +13,3 @@ def repology_project_exists(project):
url = REPOLOGY_INFORMATION_URL % {'name': project}
r = requests.get(url)
return r.ok
#!/usr/bin/env python
import re
import setuptools
import sys
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment