forked from extern/podman-compose
Fixes #663 - Fixes linting/pylint errors
Signed-off-by: BugFest <bugfest.dev@pm.me>
This commit is contained in:
parent
2df11674c4
commit
016c97fd1e
@ -7,6 +7,6 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD [ "python", "-m", "App.web" ]
|
||||
CMD [ "python", "-m", "app.web" ]
|
||||
EXPOSE 8080
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# pylint: disable=import-error
|
||||
# pylint: disable=unused-import
|
||||
import os
|
||||
import asyncio # noqa: F401
|
||||
|
||||
@ -14,13 +16,13 @@ routes = web.RouteTableDef()
|
||||
|
||||
|
||||
@routes.get("/")
|
||||
async def hello(request):
|
||||
async def hello(request): # pylint: disable=unused-argument
|
||||
counter = await redis.incr("mycounter")
|
||||
return web.Response(text=f"counter={counter}")
|
||||
|
||||
|
||||
@routes.get("/hello.json")
|
||||
async def hello_json(request):
|
||||
async def hello_json(request): # pylint: disable=unused-argument
|
||||
counter = await redis.incr("mycounter")
|
||||
data = {"counter": counter}
|
||||
return web.json_response(data)
|
@ -30,7 +30,7 @@ import shlex
|
||||
try:
|
||||
from shlex import quote as cmd_quote
|
||||
except ImportError:
|
||||
from pipes import quote as cmd_quote
|
||||
from pipes import quote as cmd_quote # pylint: disable=deprecated-module
|
||||
|
||||
# import fnmatch
|
||||
# fnmatch.fnmatchcase(env, "*_HOST")
|
||||
@ -54,7 +54,11 @@ def is_dict(dict_object):
|
||||
|
||||
|
||||
def is_list(list_object):
|
||||
return not is_str(list_object) and not is_dict(list_object) and hasattr(list_object, "__iter__")
|
||||
return (
|
||||
not is_str(list_object)
|
||||
and not is_dict(list_object)
|
||||
and hasattr(list_object, "__iter__")
|
||||
)
|
||||
|
||||
|
||||
# identity filter
|
||||
|
@ -1,3 +1,4 @@
|
||||
# pylint: disable=redefined-outer-name
|
||||
import pytest
|
||||
|
||||
from podman_compose import parse_short_mount
|
||||
|
10
setup.py
10
setup.py
@ -2,14 +2,16 @@ import os
|
||||
from setuptools import setup
|
||||
|
||||
try:
|
||||
readme = open(os.path.join(os.path.dirname(__file__), "README.md")).read()
|
||||
except: # noqa: E722
|
||||
readme = ""
|
||||
README = open(
|
||||
os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"
|
||||
).read()
|
||||
except: # noqa: E722 # pylint: disable=bare-except
|
||||
README = ""
|
||||
|
||||
setup(
|
||||
name="podman-compose",
|
||||
description="A script to run docker-compose.yml using podman",
|
||||
long_description=readme,
|
||||
long_description=README,
|
||||
long_description_content_type="text/markdown",
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
|
@ -46,16 +46,16 @@ def test_podman_compose_extends_w_file_subdir():
|
||||
"docker.io/library/busybox",
|
||||
]
|
||||
|
||||
out, err, returncode = capture(command_up)
|
||||
out, _, returncode = capture(command_up)
|
||||
assert 0 == returncode
|
||||
# check container was created and exists
|
||||
out, err, returncode = capture(command_check_container)
|
||||
out, _, returncode = capture(command_check_container)
|
||||
assert 0 == returncode
|
||||
assert out == b'"localhost/subdir_test:me"\n'
|
||||
out, err, returncode = capture(command_down)
|
||||
out, _, returncode = capture(command_down)
|
||||
# cleanup test image(tags)
|
||||
assert 0 == returncode
|
||||
# check container did not exists anymore
|
||||
out, err, returncode = capture(command_check_container)
|
||||
out, _, returncode = capture(command_check_container)
|
||||
assert 0 == returncode
|
||||
assert out == b""
|
||||
|
Loading…
Reference in New Issue
Block a user