Skip to content

Commit

Permalink
doc(readme): fix some glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
JamzumSum committed Oct 3, 2022
1 parent 0892235 commit af881c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ it as `filename.pyi` (that's why a path is required). Now supporting IDE will de
file and is able to type-check and intellisense your code.

However, the stub file does nothing with actual code executing. If you import the generated
class (default as "AutoClass"), an `ImportError` will be raised. This time you can add an variable
(aka. type alias) refers to `CfgNode` in the config file. We will override the type of this alias
to our generated class ("AutoClass"). Thus you can import the "AutoClass" normally and intuitively,
while the type alias is treated as "AutoClass" by IDE but is actually a `CfgNode` type.
class (default as "AutoConfig"), an `ImportError` will be raised. This time you can add a variable
(aka. type alias) refers to `CfgNode` in the `*.py` file. We will override the type of this alias
to our generated class ("AutoConfig") in the stub file. Thus you can import the "AutoConfig"
normally and intuitively, while the type alias is treated as "AutoConfig" by IDE but is actually a `CfgNode` type.

</details>

Expand Down

0 comments on commit af881c3

Please sign in to comment.