Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add typing to Worker module

オープン
#37 コメント 0 件 リアクション 1 件 担当者 2 名 GitHub で見る

@JuanTecedor がすでに取り組んでいます。

2026年6月20日 から。

  • #38 @JuanTecedor による — オープン

評価

この issue はまだ評価されていません。

説明

enhancement

Currently, all cortexutils is missing typing, but we should start with the worker module as it is the root of the inheritance.

This makes writing analyzers with any static type checker very tedious.

One example of a noisy/hard function to type is any that uses error with conditional branching:

from cortexutils.analyzer import Analyzer

class ExampleAnalyzer(Analyzer):
    ...

    def preprocess_url(self, url: str) -> str:
        if not url.startswith("http"):
            self.error(f"Invalid URL: {url}")
        else:
            processed_url = url.lower()
            return processed_url
cortexutils/example.py:5: error: Missing return statement  [return]
Found 1 error in 1 file (checked 6 source files)

Current workaround is to add # type: ignore[return], which is not ideal as it invalidates most of the type safety.

主要言語
Python
スター
8
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TheHive-Project/cortexutils のほかの issue

TheHive-Project/cortexutils の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。