From 2f306dbe7bfb5b05385f1ea37dc3b6e0afd9ae84 Mon Sep 17 00:00:00 2001 From: 0xflotus <0xflotus@gmail.com> Date: Sun, 5 Jan 2025 00:37:13 +0100 Subject: [PATCH] chore: added ruff linter (#6) * chore: added ruff linter * Update test_rfc1924.py * Update test.yml --- .github/workflows/test.yml | 6 ++++++ rfc1924/tests/test_rfc1924.py | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df23688..8f1aa04 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,5 +10,11 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install pytest + - name: Lint + uses: astral-sh/ruff-action@v3 + with: + version: 0.8.6 + args: check + src: "./rfc1924" - name: Test with pytest run: python -m pytest --doctest-modules diff --git a/rfc1924/tests/test_rfc1924.py b/rfc1924/tests/test_rfc1924.py index e58e38b..bfbe3d0 100644 --- a/rfc1924/tests/test_rfc1924.py +++ b/rfc1924/tests/test_rfc1924.py @@ -1,5 +1,4 @@ -from rfc1924 import * -import pytest +from rfc1924 import encode, decode, savings def test_encode(): assert encode("2345:425:2ca1::567:5673:23b5") == "AN?6(i3Y+yVr74uX@J3P" @@ -8,4 +7,4 @@ def test_decode(): assert decode("AN?6(i3Y+yVr74uX@J3P") == "2345:425:2ca1::567:5673:23b5" def test_savings(): - assert (savings("2345:425:2ca1::567:5673:23b5") == 'You saved 28%') \ No newline at end of file + assert (savings("2345:425:2ca1::567:5673:23b5") == 'You saved 28%')