Skip to content

Conversation

@hirokiky
Copy link
Member

クラスで実装されていた古い Lint の削除です。
内部的にのみ使っていたクラスなので今後不要になります。モジュールとしてのAPIを考えると複数あると美しくないため、関数に統一します。使われるべき外部向けの関数としては、 lint()api.lint_create() とします。

@hirokiky hirokiky requested a review from nnsnodnb November 15, 2024 03:05
shodo/lint.py Outdated
@@ -1,4 +1,5 @@
import time
from enum import Enum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from datetime import datetime の下にお願いします!

status = LintStatus.PROCESSING.value
pause = 0.25
while status == Lint.STATUS_PROCESSING:
while status == LintStatus.PROCESSING:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これだと1ループ目で False になって抜けちゃいますね。

Suggested change
while status == LintStatus.PROCESSING:
while status == LintStatus.PROCESSING.value:

下の

if status == LintStatus.FAILED.value:

のところもお願いします。

もしくは LintResultResponse を生成するタイミングで status: strstatus: LintStatus に変更して .value で比較しなくても良いようにするのも良いかと思います

@hirokiky hirokiky merged commit e21180e into main Nov 15, 2024
6 checks passed
@hirokiky hirokiky deleted the improve/remove-old-function branch November 15, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants