Skip to content

Commit

Permalink
Merge pull request #34 from aheui/apply-lint
Browse files Browse the repository at this point in the history
apply flake8 suggestions
  • Loading branch information
youknowone committed Mar 31, 2024
2 parents 04e3460 + 0453053 commit f745b1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.5
python-version: 3.11
- run: pip install --upgrade pip aheui
- run: bash test.sh --disable logo
env:
Expand Down
8 changes: 7 additions & 1 deletion _tools/aheuilize/aheuilize.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import math


def divide(a):
b = int(a / 2)
if a % 2 == 1:
return [b, b + 1]
return [b, b]


def factorization(a):
primes = []
factor = 2
Expand All @@ -18,6 +20,7 @@ def factorization(a):
a = int(a / factor)
return primes


def compress_factors(a):
is_first_2 = True
is_first_3 = True
Expand Down Expand Up @@ -47,6 +50,7 @@ def compress_factors(a):
result.append(3)
return result


def is_prime(a):
sqrt = int(math.sqrt(a))
if a < 2:
Expand All @@ -56,6 +60,7 @@ def is_prime(a):
i += 1
return sqrt + 1 == i


def number2Aheui(a):
cnt = -1
result = ""
Expand All @@ -78,8 +83,9 @@ def number2Aheui(a):
result += "따"
return result


def trace2Aheui(a):
result = ""
for i in range(len(a)):
result += number2Aheui(ord(a[i]))+"맣"
result += number2Aheui(ord(a[i])) + "맣"
return result

0 comments on commit f745b1d

Please sign in to comment.