Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Ruff Code Quality Check

on:
push:
branches: [ main, master, develop, feature/** ]
pull_request:
branches: [ main, master, develop ]

on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -30,3 +25,11 @@ jobs:
- name: Install Ruff
run: |
pip install ruff

- name: Run Ruff check
run: |
ruff check . --output-format=github

- name: Check code formatting
run: |
ruff format --check . --diff
11 changes: 5 additions & 6 deletions src/hw_2_3_euclid_algorithm/hw_2_3_euclid_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ def extended_gcd(a, b):
return [gcd, x, y]


a = int(input('Введите первое число: '))
b = int(input('Введите второе число: '))
a = int(input("Введите первое число: "))
b = int(input("Введите второе число: "))

gcd, x, y = extended_gcd(a, b)
print(f'НОД({a}, {b}) = {gcd}')
print(f'Коэффициенты: x = {x}, y = {y}')
print(f'Проверка: ({a})*({x}) + ({b})*({y}) = {a * x + b * y}')

print(f"НОД({a}, {b}) = {gcd}")
print(f"Коэффициенты: x = {x}, y = {y}")
print(f"Проверка: ({a})*({x}) + ({b})*({y}) = {a * x + b * y}")
3 changes: 2 additions & 1 deletion src/hw_3-2_sort/hw_3-2_sort.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
numbers = [1, 2, 3, 9, 3, 8, 478, 7]


def bubble_sort(nums):
# значение для запуска цикла
swap = True
Expand All @@ -14,6 +15,6 @@ def bubble_sort(nums):
# перезапускаем цикл, для ещё одной проверки
swap = True


bubble_sort(numbers)
print(numbers)