Skip to content

Commit

Permalink
Minor changes for current linter versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming committed Jan 20, 2024
1 parent e1a80c5 commit 2417861
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
%YAML 1.2
---
requires_ansible: ">=2.12.0"
18 changes: 9 additions & 9 deletions src/plugins/modules/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ def default(self):
def user_meta_from_api(self, user_meta, api_meta_item):
user_meta[self.meta] = api_meta_item[0] == "1"

def set(self, value, api_client): # noqa: A003
def set(self, value, api_client):
if value:
api_client.zonemetadata.modifyMetadata(
metadata_kind=self.api_kind,
Expand Down Expand Up @@ -799,7 +799,7 @@ def default(self):
def user_meta_from_api(self, user_meta, api_meta_item):
user_meta[self.meta] = True

def set(self, value, api_client): # noqa: A003
def set(self, value, api_client):
if value:
api_client.zonemetadata.modifyMetadata(
metadata_kind=self.api_kind,
Expand Down Expand Up @@ -827,7 +827,7 @@ def default(self):
def user_meta_from_api(self, user_meta, api_meta_item):
user_meta[self.meta] = api_meta_item[0] == "1"

def set(self, value, api_client): # noqa: A003
def set(self, value, api_client):
if value is not None:
if value:
api_client.zonemetadata.modifyMetadata(
Expand Down Expand Up @@ -867,7 +867,7 @@ def default(self):
def user_meta_from_api(self, user_meta, api_meta_item):
user_meta[self.meta] = api_meta_item

def set(self, value, api_client): # noqa: A003
def set(self, value, api_client):
if len(value) != 0:
api_client.zonemetadata.modifyMetadata(
metadata_kind=self.api_kind,
Expand Down Expand Up @@ -895,7 +895,7 @@ def default(self):
def user_meta_from_api(self, user_meta, api_meta_item):
user_meta[self.meta] = api_meta_item[0]

def set(self, value, api_client): # noqa: A003
def set(self, value, api_client):
if value:
api_client.zonemetadata.modifyMetadata(
metadata_kind=self.api_kind,
Expand Down Expand Up @@ -991,7 +991,7 @@ def default(self):
def user_meta_from_api(self, user_meta, zone_meta_item):
user_meta[self.meta] = zone_meta_item == "1"

def set(self, value, zone_struct): # noqa: A003
def set(self, value, zone_struct):
if value:
zone_struct[self.zone_kind] = "1"

Expand All @@ -1010,7 +1010,7 @@ def default(self):
def user_meta_from_api(self, user_meta, zone_meta_item):
user_meta[self.meta] = zone_meta_item == "1"

def set(self, value, zone_struct): # noqa: A003
def set(self, value, zone_struct):
if value is not None:
if value:
zone_struct[self.zone_kind] = "1"
Expand All @@ -1035,7 +1035,7 @@ def default(self):
def user_meta_from_api(self, user_meta, zone_meta_item):
user_meta[self.meta] = zone_meta_item

def set(self, value, zone_struct): # noqa: A003
def set(self, value, zone_struct):
if value != []:
zone_struct[self.zone_kind] = value

Expand All @@ -1051,7 +1051,7 @@ def default(self):
def user_meta_from_api(self, user_meta, zone_meta_item):
user_meta[self.meta] = zone_meta_item

def set(self, value, zone_struct): # noqa: A003
def set(self, value, zone_struct):
if value != "":
zone_struct[self.zone_kind] = value

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ commands_pre=
commands=
black --preview src
ruff check --fix src
ansible-lint --write all --strict --profile production -v
ansible-lint --fix all --strict --profile production -v

[testenv:py{38,39,310,311,312}-ci-action]
deps=
Expand Down
1 change: 0 additions & 1 deletion workflow-support/test-tsigkey.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
%YAML 1.2
---
- hosts: localhost
connection: local
Expand Down
1 change: 0 additions & 1 deletion workflow-support/test-zone-issue-136.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
%YAML 1.2
---
- hosts: localhost
connection: local
Expand Down
1 change: 0 additions & 1 deletion workflow-support/test-zone-rrset.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
%YAML 1.2
---
- hosts: localhost
connection: local
Expand Down
1 change: 0 additions & 1 deletion workflow-support/test-zone.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
%YAML 1.2
---
- hosts: localhost
connection: local
Expand Down

0 comments on commit 2417861

Please sign in to comment.