Skip to content

Commit

Permalink
fix(script)!: 'CN' is choosed as the cls_name
Browse files Browse the repository at this point in the history
  • Loading branch information
JamzumSum committed Oct 3, 2022
1 parent af881c3 commit 533c122
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test, Build and Publish
on:
push:
paths:
- "src/yacs_stubgen/**"
- "src/**"
- "poetry.lock"
- ".github/workflows/test-pub.yml"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <zzzzss990315@gmail.com>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/genstub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 533c122

Please sign in to comment.