diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2958376..c526547 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,19 +43,16 @@ jobs: python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Checkout repository + uses: actions/checkout@v4 - name: Install uv - uses: yezz123/setup-uv@v4 + uses: astral-sh/setup-uv@v3 + - name: Set up Python ${{ matrix.python-version }} + run: uv python install ${{ matrix.python-version }} - name: Dependencies - run: | - uv sync --no-cache + run: uv sync --no-cache - name: Lint - run: | - uv run poe lint + run: uv run poe lint - name: Tests env: GOOGLEDRIVEFS_TEST_CLIENT_ID: ${{ secrets.GOOGLEDRIVEFS_TEST_CLIENT_ID }} @@ -64,7 +61,7 @@ jobs: NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} if: ${{needs.secrets.outputs.valid}} == 'true' run: | - if python --version | grep -q 'Python 3.13' ; then + if uv run python --version | grep -q 'Python 3.13' ; then uv run poe test fi - name: Coverage diff --git a/pyproject.toml b/pyproject.toml index db68f58..3f04fd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,13 +49,32 @@ coverage xml [tool.ruff] line-length = 200 -lint.ignore = ["ANN", "D", "DTZ", "EM102", "ERA001", "FBT002", "FIX", "G004", "I", "N", "PT009", "PT027", "PT013", "PTH", "S101", "TCH003", "TD", "TRY003", "W191"] +lint.ignore = [ + "ANN", # Requires annotations + "D", # Requires various docstrings + "DTZ", # flake8-datetimez + "EM102", # Disallows f-strings in exceptions + "ERA001", # Disallows commented out code + "FBT002", # Disallows boolean positional arguments + "FIX", # Disallows FIXME-type comments + "G004", # Disallows using f-strings in log strings + "I", # False positive isort complaints + "N", # PEP8 naming rules + "PT009", # Use of unittest assertions - but they come from the `fs` package + "PT013", # Requires pytest to be imported in a specific way + "PT027", # Use of unittest assertions - but they come from the `fs` package + "PTH", # Requires use of pathlib + "S101", # Disallows use of assert + "TD", # Requires a particular formatting of TODO comments + "TRY003", # Disallows long exception messages + "W191", # Disallows tab indentation + ] lint.select = ["ALL"] -target-version = "py38" [tool.ruff.lint.extend-per-file-ignores] -"__init__.py" = ["F401"] -"tests/*" = ["ANN201", "D103", "INP001", "PT006"] +"__init__.py" = [ + "F401", # Unused import + ] [tool.ruff.lint.flake8-quotes] inline-quotes = "single"