Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
kumvijaya authored Sep 6, 2024
1 parent 5a6c38d commit 7a29e41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ruff-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
python-version: '3.11'

- name: Lint
uses: chartboost/ruff-action@v1
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
with:
args: check
changed-files: 'true'

- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
with:
args: format --diff
changed-files: true
changed-files: 'true'
7 changes: 7 additions & 0 deletions src/tests/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from typing import List

Check failure on line 1 in src/tests/test.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (UP035)

src/tests/test.py:1:1: UP035 `typing.List` is deprecated, use `list` instead

import os

Check failure on line 3 in src/tests/test.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (F401)

src/tests/test.py:3:8: F401 `os` imported but unused

def sum_even_numbers(numbers: List[int]) -> int:

Check failure on line 5 in src/tests/test.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (I001)

src/tests/test.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 5 in src/tests/test.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (UP006)

src/tests/test.py:5:31: UP006 Use `list` instead of `List` for type annotation
"""Given a list of integers, return the sum of all even numbers in the list."""

Check failure on line 6 in src/tests/test.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E501)

src/tests/test.py:6:81: E501 Line too long (83 > 80)
return sum(num for num in numbers if num % 2 == 0)

0 comments on commit 7a29e41

Please sign in to comment.