From c4ace8c932f0e8b9e5357bfa531cc1579932f10d Mon Sep 17 00:00:00 2001 From: tnm Date: Tue, 17 Dec 2024 15:40:27 -0800 Subject: [PATCH] Last pieces for new CI --- .github/workflows/ci.yml | 12 ++++++------ cased/commands/init.py | 2 +- pyproject.toml | 12 +++++------- requirements.txt | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 587f1a2..0a5e19a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,29 +11,29 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' - + - name: Install uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh echo "$HOME/.cargo/bin" >> $GITHUB_PATH - + - name: Create venv and install dependencies run: | uv venv . .venv/bin/activate uv pip install -r requirements.txt uv pip install pre-commit - + - name: Copy pre-commit config run: | cp .ci-pre-commit-config.yaml .pre-commit-config.yaml - + - name: Run pre-commit run: | . .venv/bin/activate - pre-commit run --all-files \ No newline at end of file + pre-commit run --all-files diff --git a/cased/commands/init.py b/cased/commands/init.py index 6735fab..acf3d69 100644 --- a/cased/commands/init.py +++ b/cased/commands/init.py @@ -88,7 +88,7 @@ def get_deployment_info(): def check_for_docker(config): def find_dockerfile(start_path="."): - for root, dirs, files in os.walk(start_path): + for root, _, files in os.walk(start_path): if "Dockerfile" in files: return os.path.join(root, "Dockerfile") return None diff --git a/pyproject.toml b/pyproject.toml index 056eec4..ad0f2f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,12 +52,10 @@ cased = "cased.cli:main" [tool.ruff] line-length = 88 target-version = "py312" - -[tool.ruff.lint] select = [ - "E", # pycodestyle errors - "W", # pycodestyle warnings - "F", # pyflakes - "I", # isort - "B", # flake8-bugbear + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + "B", # flake8-bugbear ] diff --git a/requirements.txt b/requirements.txt index 72b3575..0984a03 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,4 +33,4 @@ six==1.16.0 urllib3==2.2.3 virtualenv==20.26.6 wcwidth==0.2.13 -xmod==1.8.1 \ No newline at end of file +xmod==1.8.1