Skip to content

Commit

Permalink
Added __qualname__ symbol to classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
msfterictraut committed May 23, 2019
1 parent 55f837e commit 7e3b1a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/analyzer/semanticAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@ export class ClassScopeAnalyzer extends SemanticAnalyzer {
this._addSymbolToPermanentScope('__dict__', AnyType.create());
this._addSymbolToPermanentScope('__doc__', ScopeUtils.getBuiltInObject(this._currentScope, 'str'));
this._addSymbolToPermanentScope('__name__', ScopeUtils.getBuiltInObject(this._currentScope, 'str'));
if (this._fileInfo.executionEnvironment.pythonVersion >= PythonVersion.V33) {
this._addSymbolToPermanentScope('__qualname__', ScopeUtils.getBuiltInObject(this._currentScope, 'str'));
}
}
}

Expand Down

0 comments on commit 7e3b1a6

Please sign in to comment.