Skip to content

Commit 5e84819

Browse files
committed
Updated ruff linter
1 parent 7278e53 commit 5e84819

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/ruff_linter.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,36 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18+
1819
- name: Set up Python 3.10
1920
uses: actions/setup-python@v3
2021
with:
2122
python-version: "3.10"
2223

23-
- name: Install Linter Ruff
24+
- name: Install uv
2425
run: |
2526
curl -LsSf https://astral.sh/uv/install.sh | sh
27+
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
2628
2729
- name: Create virtual environment and install dependencies
2830
run: |
31+
# Create a virtual environment
2932
uv venv
30-
source .venv/bin/activate
31-
python -m pip install --upgrade pip
32-
python -m pip install .[dev]
33-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
34-
python -m pip install ruff pytest
33+
uv pip install -e .
34+
if [ -f requirements.txt ]; then uv pip install -r requirements.txt; fi
35+
uv pip install ruff pytest
36+
37+
- name: Install system dependencies for X11
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y xvfb
3541
3642
- name: Run Ruff
3743
run: |
3844
source .venv/bin/activate
39-
ruff check .
45+
uv run ruff check .
4046
4147
- name: Run Tests
4248
run: |
4349
source .venv/bin/activate
44-
pytest tests/
50+
xvfb-run -a uv run pytest tests/

tests/utils/test_readable_time.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def setUp(self):
1212
self.MAX_MONTH = 12
1313
self.MIN_DAY = 1
1414
self.MAX_DAY = 31
15-
self.MIN_HOUR = 1
15+
self.MIN_HOUR = 0
1616
self.MAX_HOUR = 23
17-
self.MIN_MINUTE = 1
17+
self.MIN_MINUTE = 9
1818
self.MAX_MINUTE = 59
19-
self.MIN_SECOND = 1
19+
self.MIN_SECOND = 0
2020
self.MAX_SECOND = 59
2121

2222
def test_date_time_now_to_file_name_format(self):

0 commit comments

Comments
 (0)