Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
packaging
cznicinfo
Commits
ef9d5014
Commit
ef9d5014
authored
Nov 02, 2020
by
Jakub Ružička
Browse files
style: clean flake8 warnings
parent
d50bc7a8
Changes
5
Hide whitespace changes
Inline
Side-by-side
cznicinfo/commands/clone.py
View file @
ef9d5014
...
...
@@ -11,8 +11,6 @@ Options:
"""
from
docopt
import
docopt
from
sh
import
git
import
sys
from
cznicinfo
import
infocore
from
cznicinfo
import
infoquery
...
...
cznicinfo/commands/list.py
View file @
ef9d5014
...
...
@@ -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'
])
...
...
cznicinfo/commands/list_upstream.py
View file @
ef9d5014
...
...
@@ -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
cznicinfo/repology.py
View file @
ef9d5014
...
...
@@ -13,4 +13,3 @@ def repology_project_exists(project):
url
=
REPOLOGY_INFORMATION_URL
%
{
'name'
:
project
}
r
=
requests
.
get
(
url
)
return
r
.
ok
setup.py
View file @
ef9d5014
#!/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`.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment