Skip to content
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
5 changes: 4 additions & 1 deletion commodore/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ def clean(config: Config, verbose):
" / -F",
"--fetch-dependencies/--no-fetch-dependencies",
default=True,
help="Whether to fetch Jsonnet and Kapitan dependencies in local mode. By default dependencies are fetched.",
help=(
"Whether to fetch Jsonnet and Kapitan dependencies in local mode. "
+ "By default dependencies are fetched."
),
)
@click.option(
"-m",
Expand Down
5 changes: 3 additions & 2 deletions commodore/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ def global_git_repo_url(self) -> str:

def _extract_field(self, field: str, default) -> str:
"""
Extract `field` from the tenant and cluster data, preferring the value present in the cluster data over the
value in the tenant data. If field is not present in both tenant and cluster data, return `default`.
Extract `field` from the tenant and cluster data, preferring the value present in the
cluster data over the value in the tenant data. If field is not present in both tenant and
cluster data, return `default`.
"""
return self._cluster.get(field, self._tenant.get(field, default))

Expand Down
4 changes: 2 additions & 2 deletions commodore/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def _local_setup(config: Config, cluster_id):
if not config.fetch_dependencies:
click.echo(" > Will use existing Jsonnet and Kapitan dependencies")
click.echo(
" > Use --fetch-dependencies at least once if you're trying to enable a new component in local mode,"
+ " otherwise Kapitan will fail to find the component"
" > Use --fetch-dependencies at least once if you're trying to enable "
+ "a new component in local mode, otherwise Kapitan will fail to find the component"
)

file = config.inventory.target_file(config.inventory.bootstrap_target)
Expand Down
4 changes: 2 additions & 2 deletions commodore/component/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def render_jsonnetfile_json(self, component_params):
if jsonnetfile_jsonnet.is_file():
if jsonnetfile_json.name in self._repo.repo.tree():
click.secho(
f" > [WARN] Component {self.name} repo contains both jsonnetfile.json and jsonnetfile.jsonnet, "
+ "continuing with jsonnetfile.jsonnet",
f" > [WARN] Component {self.name} repo contains both jsonnetfile.json "
+ "and jsonnetfile.jsonnet, continuing with jsonnetfile.jsonnet",
fg="yellow",
)
# pylint: disable=c-extension-no-member
Expand Down
3 changes: 2 additions & 1 deletion commodore/dependency_mgmt/jsonnet_bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def jsonnet_dependencies(config: Config) -> Iterable:
}
)

# Defining the `lib` folder as a local dependency is just a cheap way to have a symlink to that folder.
# Defining the `lib` folder as a local dependency is just a cheap way to have a symlink to that
# folder.
dependencies.append(
{
"source": {
Expand Down
112 changes: 63 additions & 49 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ responses = "0.20.0"
black = "22.3.0"
pyfakefs = "4.5.6"
pytest-cov = "3.0.0"
pylint = "2.13.9"
pylint = "2.14.1"

[tool.poetry.scripts]
commodore = 'commodore.cli:main'
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ exclude = *.egg*,.git,.tox,venv
max-line-length = 120

[pylint]
[MASTER]
[pylint.main]
output-format = colorized
reports = no
disable = invalid-name, missing-function-docstring,missing-class-docstring,missing-module-docstring,fixme
min-public-methods = 1

[SIMILARITIES]
[pylint.similarities]
min-similarity-lines=10

[pytest]
Expand Down