Skip to content

Commit

Permalink
See issue #76: Building out a better CPP example
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshjoshi committed Aug 1, 2022
1 parent 06399da commit feb7df2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
24 changes: 12 additions & 12 deletions helloansible/BUILD.pants
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ansible_sources(
name="libansible",
sources=["**/*"],
)
#ansible_sources(
# name="libansible",
# sources=["**/*"],
#)

ansible_deployment(
name="helloansible",
dependencies=[":libansible"],
playbook="playbook.yml",
# inventory="", # TODO: Could this be setup like the Docker registries? in pants.toml
# tags="", # TODO: Might need a different name to not overlap
# timeout="",
)
#ansible_deployment(
# name="helloansible",
# dependencies=[":libansible"],
# playbook="playbook.yml",
# # inventory="", # TODO: Could this be setup like the Docker registries? in pants.toml
# # tags="", # TODO: Might need a different name to not overlap
# # timeout="",
#)
3 changes: 2 additions & 1 deletion pants-plugins/experimental/ansible/goals/tailor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def test_find_extended_name() -> None:


def test_find_alternate_extension() -> None:
"""the `.ansible` extension helps with syntax highlighters as `.yml` often isn't picked up"""
"""the `.ansible` extension helps with syntax highlighters as `.yml` often
isn't picked up."""
files = (("src/ansible", "playbook.ansible"),)
pts = run_tailor(files, tuple())
assert pts == (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""A formatter and linter forAnsible playbooks, roles and collections.
See https://ansible-lint.readthedocs.io/en/latest/ for details"""
See https://ansible-lint.readthedocs.io/en/latest/ for details
"""

from __future__ import annotations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class AnsibleLint(PythonToolBase):
# default_lockfile_url = git_url(default_lockfile_path)

def config_request(self, dirs: Iterable[str]) -> ConfigFilesRequest:
"""Refer to https://ansible-lint.readthedocs.io/en/latest/configuring/#configuration-file for how Ansible Lint discovers configurations"""
"""Refer to https://ansible-
lint.readthedocs.io/en/latest/configuring/#configuration-file for how
Ansible Lint discovers configurations."""
config_files = (
".ansible-lint",
".config/ansible-lint.yml",
Expand Down
3 changes: 2 additions & 1 deletion pants-plugins/experimental/swift/goals/tailor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class PutativeSwiftTargetsRequest(PutativeTargetsRequest):


def classify_source_files(paths: Iterable[str]) -> dict[type[Target], set[str]]:
"""Returns a dict of target type -> files that belong to targets of that type."""
"""Returns a dict of target type -> files that belong to targets of that
type."""
sources_files = set(paths)
return {SwiftSourcesGeneratorTarget: sources_files}

Expand Down
5 changes: 3 additions & 2 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ backend_packages = [
"pants.backend.python",
"pants.backend.python.lint.bandit",
"pants.backend.python.lint.black",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
#"pants.backend.python.typecheck.mypy",
"pants.backend.python.typecheck.mypy",
"pants.backend.experimental.python.lint.autoflake",
"pants.backend.experimental.python.lint.pyupgrade",
"pants.backend.experimental.python.packaging.pyoxidizer",
Expand All @@ -27,7 +28,7 @@ backend_packages = [
#"experimental.mypyc",
#"experimental.ansible",
#"experimental.ansible.lint.ansible_lint",
#"experimental.swift",
"experimental.swift",
]

[source]
Expand Down

0 comments on commit feb7df2

Please sign in to comment.