forked from extern/podman-compose
Force black formatting
Black removes the burden of manual code formatting and is by now considered the standard Python formatting tool. https://black.readthedocs.io/en/stable/ Format all Python code with black. GitHub linting action is updated to ensure all files are formatted with Black. Signed-off-by: Piotr Husiatyński <phusiatynski@gmail.com>
This commit is contained in:
parent
af10345483
commit
762318093c
2
.github/workflows/pylint.yml
vendored
2
.github/workflows/pylint.yml
vendored
@ -12,6 +12,7 @@ jobs:
|
||||
python-version: ["3.8", "3.9", "3.10"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: psf/black@stable
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
@ -26,4 +27,3 @@ jobs:
|
||||
python -m compileall podman_compose.py
|
||||
pylint podman_compose.py
|
||||
# pylint $(git ls-files '*.py')
|
||||
|
||||
|
1736
podman_compose.py
1736
podman_compose.py
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ import pytest
|
||||
|
||||
from podman_compose import parse_short_mount
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def multi_propagation_mount_str():
|
||||
return "/foo/bar:/baz:U,Z"
|
||||
|
30
setup.py
30
setup.py
@ -2,15 +2,15 @@ import os
|
||||
from setuptools import setup
|
||||
|
||||
try:
|
||||
readme = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
|
||||
readme = open(os.path.join(os.path.dirname(__file__), "README.md")).read()
|
||||
except:
|
||||
readme = ''
|
||||
readme = ""
|
||||
|
||||
setup(
|
||||
name='podman-compose',
|
||||
name="podman-compose",
|
||||
description="A script to run docker-compose.yml using podman",
|
||||
long_description=readme,
|
||||
long_description_content_type='text/markdown',
|
||||
long_description_content_type="text/markdown",
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
@ -23,21 +23,17 @@ setup(
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
||||
],
|
||||
keywords='podman, podman-compose',
|
||||
author='Muayyad Alsadi',
|
||||
author_email='alsadi@gmail.com',
|
||||
url='https://github.com/containers/podman-compose',
|
||||
py_modules=['podman_compose'],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'podman-compose = podman_compose:main'
|
||||
]
|
||||
},
|
||||
keywords="podman, podman-compose",
|
||||
author="Muayyad Alsadi",
|
||||
author_email="alsadi@gmail.com",
|
||||
url="https://github.com/containers/podman-compose",
|
||||
py_modules=["podman_compose"],
|
||||
entry_points={"console_scripts": ["podman-compose = podman_compose:main"]},
|
||||
include_package_data=True,
|
||||
license='GPL-2.0-only',
|
||||
license="GPL-2.0-only",
|
||||
install_requires=[
|
||||
'pyyaml',
|
||||
'python-dotenv',
|
||||
"pyyaml",
|
||||
"python-dotenv",
|
||||
],
|
||||
# test_suite='tests',
|
||||
# tests_require=[
|
||||
|
@ -6,3 +6,4 @@ coverage
|
||||
pytest-cov
|
||||
pytest
|
||||
tox
|
||||
black
|
||||
|
@ -2,6 +2,7 @@ import pytest
|
||||
|
||||
from podman_compose import parse_short_mount
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def multi_propagation_mount_str():
|
||||
return "/foo/bar:/baz:U,Z"
|
||||
|
@ -11,6 +11,7 @@ def capture(command):
|
||||
out, err = proc.communicate()
|
||||
return out, err, proc.returncode
|
||||
|
||||
|
||||
def test_podman_compose_extends_w_file_subdir():
|
||||
"""
|
||||
Test that podman-compose can execute podman-compose -f <file> up with extended File which
|
||||
@ -25,7 +26,7 @@ def test_podman_compose_extends_w_file_subdir():
|
||||
"-f",
|
||||
str(main_path.joinpath("tests", "extends_w_file_subdir", "docker-compose.yml")),
|
||||
"up",
|
||||
"-d"
|
||||
"-d",
|
||||
]
|
||||
|
||||
command_check_container = [
|
||||
@ -34,7 +35,7 @@ def test_podman_compose_extends_w_file_subdir():
|
||||
"ps",
|
||||
"--all",
|
||||
"--format",
|
||||
"\"{{.Image}}\""
|
||||
'"{{.Image}}"',
|
||||
]
|
||||
|
||||
command_down = [
|
||||
@ -42,7 +43,7 @@ def test_podman_compose_extends_w_file_subdir():
|
||||
"rmi",
|
||||
"--force",
|
||||
"localhost/subdir_test:me",
|
||||
"docker.io/library/bash"
|
||||
"docker.io/library/bash",
|
||||
]
|
||||
|
||||
out, err, returncode = capture(command_up)
|
||||
@ -57,4 +58,4 @@ def test_podman_compose_extends_w_file_subdir():
|
||||
# check container did not exists anymore
|
||||
out, err, returncode = capture(command_check_container)
|
||||
assert 0 == returncode
|
||||
assert out == b''
|
||||
assert out == b""
|
||||
|
Loading…
Reference in New Issue
Block a user