Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into project-creation-ui-improvements
  • Loading branch information
romeonicholas committed Nov 2, 2023
2 parents 9175522 + 83d28d7 commit 0d0a0c2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
4 changes: 3 additions & 1 deletion backend/capellacollab/cli/ws.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: Apache-2.0

# pylint: disable=bad-builtin

from __future__ import annotations

import contextlib
Expand All @@ -11,7 +13,7 @@
import typing as t

import typer
import websocket # type: ignore[import]
import websocket
from kubernetes import client, config, stream

app = typer.Typer()
Expand Down
2 changes: 2 additions & 0 deletions backend/capellacollab/config/diff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: Apache-2.0

# pylint: disable=bad-builtin

import pathlib

import deepdiff
Expand Down
2 changes: 0 additions & 2 deletions backend/capellacollab/projects/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ def _delete_all_pipelines_for_project(
pipelines: list[backups_models.DatabaseBackup] = []
for model in project.models:
pipelines.extend(backups_crud.get_pipelines_for_tool_model(db, model))
print(project.models)
print(pipelines)
for pipeline in pipelines:
backups_core.delete_pipeline(db, pipeline, username, True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ def get_last_pipeline_runs(
headers = None
if self.git_model.password:
headers = self.__get_headers(self.git_model.password)
print(
f"{self.git_instance.api_url}/repos/{project_id}/actions/runs?branch={parse.quote(self.git_model.revision, safe='')}&per_page=20"
)
response = requests.get(
f"{self.git_instance.api_url}/repos/{project_id}/actions/runs?branch={parse.quote(self.git_model.revision, safe='')}&per_page=20",
headers=headers,
Expand Down
6 changes: 4 additions & 2 deletions backend/capellacollab/sessions/operators/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,9 @@ def print_file_tree_as_json():
import pathlib
import sys

print("Using CLI arguments: " + str(sys.argv[1:]), file=sys.stderr)
print( # pylint: disable=bad-builtin
"Using CLI arguments: " + str(sys.argv[1:]), file=sys.stderr
)

def get_files(dir: pathlib.Path, show_hidden: bool):
file = {
Expand Down Expand Up @@ -1068,7 +1070,7 @@ def get_files(dir: pathlib.Path, show_hidden: bool):

return file

print(
print( # pylint: disable=bad-builtin
json.dumps(
get_files(
pathlib.Path(sys.argv[1]), json.loads(sys.argv[2])
Expand Down
4 changes: 3 additions & 1 deletion backend/capellacollab/settings/modelsources/git/askpass.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
import sys

if __name__ == "__main__":
print(os.environ["GIT_" + sys.argv[1].split()[0].upper()])
print( # pylint: disable=bad-builtin
os.environ["GIT_" + sys.argv[1].split()[0].upper()]
)
raise SystemExit(0)
5 changes: 5 additions & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ module = [
"alembic.*",
"jwt.*",
"argon2.*",
"websocket.*"
]
ignore_missing_imports = true

Expand All @@ -151,6 +152,9 @@ add-ignore = [
"D213", # Multi-line docstring summary should start at the second line
]

[tool.pylint]
bad-functions = ["print"]

[tool.pylint.messages_control]
disable = [
"broad-except",
Expand Down Expand Up @@ -221,6 +225,7 @@ extension-pkg-whitelist = "pydantic" # https://github.com/pydantic/pydantic/issu

[tool.pylint.master]
init-import = "yes"
load-plugins = "pylint.extensions.bad_builtin"

[tool.pylint.similarities]
min-similarity-lines = 6
Expand Down

0 comments on commit 0d0a0c2

Please sign in to comment.