diff --git a/.github/workflows/test-pub.yml b/.github/workflows/test-pub.yml index 6205426..577fef8 100644 --- a/.github/workflows/test-pub.yml +++ b/.github/workflows/test-pub.yml @@ -3,7 +3,7 @@ name: Test, Build and Publish on: push: paths: - - "src/yacs_stubgen/**" + - "src/**" - "poetry.lock" - ".github/workflows/test-pub.yml" diff --git a/pyproject.toml b/pyproject.toml index 0203fd2..0399f7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "yacs-stubgen" -version = "0.2.0" +version = "0.2.1" description = "Generate stub file for yacs config." authors = ["JamzumSum "] license = "MIT" diff --git a/src/genstub.py b/src/genstub.py index 63131cd..2c633f9 100644 --- a/src/genstub.py +++ b/src/genstub.py @@ -33,7 +33,7 @@ def inspect_module(mod_path: Path, ROOT: Path): cfg = v varname = k elif isinstance(v, type): - if issubclass(v, CfgNode): + if k != "CN" and issubclass(v, CfgNode): clsname = k if clsname and varname: break