Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aalexfvk committed Aug 7, 2023
1 parent 2b398c7 commit 61f9c0a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 46 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ jobs:
- "23.5.3.24"
- "latest"
env:
CLICKHOUSE_VERSION=${{ matrix.clickhouse }}
CLICKHOUSE_VERSION=${{ matrix.clickhouse }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.target.python }}
cache: poetry
- run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry config virtualenvs.in-project true
poetry install --no-root
- run: make unit_tests

- run: make integration_tests

- name: publish test report
uses: mikepenz/action-junit-report@v3
if: always()
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SHELL := bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules

PYTHON ?= python3.6
PYTHON ?= python3
PREFIX ?= /opt/yandex/ch-tools
OUTPUT_DIR ?= out

Expand Down Expand Up @@ -65,7 +65,7 @@ $(INSTALL_DEPS_MARKER): check-poetry venv pyproject.toml
.PHONY: lint
lint: install-dependencies
poetry run black --check --diff ch_tools tests
poetry run isort --recursive --diff ch_tools tests
poetry run isort --diff ch_tools tests


.PHONY: unit-tests
Expand Down
5 changes: 3 additions & 2 deletions ch_tools/chadmin/chadmin_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import warnings
from typing import Any, List

warnings.filterwarnings(action="ignore", message="Python 3.6 is no longer supported")

import cloup # noqa: E402

from ch_tools.chadmin.cli.chs3_backup_group import chs3_backup_group # noqa: E402
Expand Down Expand Up @@ -54,6 +52,9 @@
from ch_tools.common.cli.context_settings import CONTEXT_SETTINGS # noqa: E402
from ch_tools.common.cli.parameters import TimeSpanParamType # noqa: E402

warnings.filterwarnings(action="ignore", message="Python 3.6 is no longer supported")


LOG_FILE = "/var/log/chadmin/chadmin.log"


Expand Down
5 changes: 3 additions & 2 deletions ch_tools/monrun_checks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import warnings
from functools import wraps

warnings.filterwarnings(action="ignore", message="Python 3.6 is no longer supported")

import click # noqa: E402

from ch_tools.common.result import Status # noqa: E402
Expand All @@ -32,6 +30,9 @@
from ch_tools.monrun_checks.ext_ip_dns import ext_ip_dns_command # noqa: E402
from ch_tools.monrun_checks.status import status_command # noqa: E402

warnings.filterwarnings(action="ignore", message="Python 3.6 is no longer supported")


LOG_FILE = "/var/log/clickhouse-monitoring/clickhouse-monitoring.log"
DEFAULT_USER = "monitor"

Expand Down
54 changes: 20 additions & 34 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ include = ["resources/"]
# requires-python = ">=3.6.2"

[tool.poetry.dependencies]
python = ">=3.6.2"
python = "^3.6.2"
boto3 = "*"
click = "*"
cloup = "*"
Expand All @@ -107,7 +107,7 @@ typing-extensions = "*"
[tool.poetry.dev-dependencies]
flit = "*"
black = "*"
isort = {version = "*", extras = ["pyproject"]}
isort = {version = "^5.0.0", extras = ["pyproject"]}
mypy = "*"
types-pyyaml = "*"
types-requests = "*"
Expand Down

0 comments on commit 61f9c0a

Please sign in to comment.