Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: normalize syntax #41

Merged
merged 4 commits into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ local PipelineLinting = {
'ansible-later',
],
},
{
name: 'python-format',
image: 'python:3.9',
environment: {
PY_COLORS: 1,
},
commands: [
'pip install -qq yapf',
'yapf -dr ./',
],
},
{
name: 'python-flake8',
image: 'python:3.9',
environment: {
PY_COLORS: 1,
},
commands: [
'pip install -qq flake8',
'flake8',
],
},
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
Expand Down
18 changes: 17 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ steps:
commands:
- ansible-later

- name: python-format
image: python:3.9
commands:
- pip install -qq yapf
- yapf -dr ./
environment:
PY_COLORS: 1

- name: python-flake8
image: python:3.9
commands:
- pip install -qq flake8
- flake8
environment:
PY_COLORS: 1

trigger:
ref:
- refs/heads/master
Expand Down Expand Up @@ -249,6 +265,6 @@ depends_on:

---
kind: signature
hmac: bda18f436f7c8341f5643a98b33a52d8dabae8b1457af7dd88dd4ff803598001
hmac: ad2844c351441d3032a582c95478229a2e5fc49e5240bfc065d52030cb22ae84

...
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

3 changes: 2 additions & 1 deletion library/oc_app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/python
# Standards: 0.1
# Standards: 0.2
# -*- coding: utf-8 -*-

# Copyright: (c) 2019, Robert Kaussow <mail@geeklabor.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function

__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}
Expand Down
3 changes: 2 additions & 1 deletion library/oc_config.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/python
# Standards: 0.1
# Standards: 0.2
# -*- coding: utf-8 -*-

# Copyright: (c) 2019, Robert Kaussow <mail@geeklabor.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function

__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}
Expand Down
16 changes: 11 additions & 5 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Standards: 0.1
# Standards: 0.2
---
galaxy_info:
# @meta name:value: owncloud
author: Robert Kaussow
author: "ownCloud DevOps <devops@owncloud.com>"
namespace: owncloud
role_name: owncloud
# @meta description:value: >
# [![Source Code](https://img.shields.io/badge/github-source%20code-blue?logo=github&logoColor=white)](https://github.com/owncloud-ansible/owncloud)
# [![Build Status](https://drone.owncloud.com/api/badges/owncloud-ansible/owncloud/status.svg)](https://drone.owncloud.com/owncloud-ansible/owncloud)
Expand All @@ -18,17 +20,21 @@ galaxy_info:
# @end
description: Ansible role to setup an ownCloud server
license: Apache-2.0
min_ansible_version: 2.8
min_ansible_version: 2.10
platforms:
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: EL
versions:
- 7
- 8
- name: opensuse
versions:
- 15.2
galaxy_tags:
- owncloud
- storage
- sharing

dependencies: []
4 changes: 2 additions & 2 deletions molecule/centos7/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")


def test_owncloud_running_services(host):
Expand Down
4 changes: 2 additions & 2 deletions molecule/centos8/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")


def test_owncloud_running_services(host):
Expand Down
4 changes: 2 additions & 2 deletions molecule/opensuse15/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")


def test_owncloud_running_services(host):
Expand Down
4 changes: 2 additions & 2 deletions molecule/ubuntu1804/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")


def test_owncloud_running_services(host):
Expand Down
12 changes: 5 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[isort]
default_section = THIRDPARTY
known_first_party = ansiblelater
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
force_single_line = true
line_length = 99
skip_glob = **/.env*,**/env/*,**/docs/*,**/inventory/*,**/modules/*
[flake8]
ignore = D100, D101, D102, D103, D105, D107, E402, W503
max-line-length = 99
inline-quotes = double
exclude = .git,.tox,__pycache__,build,dist,tests,*.pyc,*.egg-info,.cache,.eggs,env*

[yapf]
based_on_style = google
Expand Down