Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant __name__ check in multiple files #4222

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class LeafListener(MockListener):
>>

WalkListener(s) ::= <<
if __name__ is not None and "." in __name__:
if "." in __name__:
from .TListener import TListener
else:
from TListener import TListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ else:
ListenerFile(file, header, namedActions) ::= <<
<fileHeader(file.grammarFileName, file.ANTLRVersion)>
from antlr4 import *
if __name__ is not None and "." in __name__:
if "." in __name__:
from .<file.parserName> import <file.parserName>
else:
from <file.parserName> import <file.parserName>
Expand All @@ -92,7 +92,7 @@ del <file.parserName>
VisitorFile(file, header, namedActions) ::= <<
<fileHeader(file.grammarFileName, file.ANTLRVersion)>
from antlr4 import *
if __name__ is not None and "." in __name__:
if "." in __name__:
from .<file.parserName> import <file.parserName>
else:
from <file.parserName> import <file.parserName>
Expand Down Expand Up @@ -123,7 +123,7 @@ Parser(parser, funcs, atn, sempredFuncs, superClass) ::= <<

Parser_(parser, funcs, atn, sempredFuncs, ctor, superClass) ::= <<
<if(superClass)>
if __name__ is not None and "." in __name__:
if "." in __name__:
from .<superClass> import <superClass>
else:
from <superClass> import <superClass>
Expand Down Expand Up @@ -773,7 +773,7 @@ else:

Lexer(lexer, atn, actionFuncs, sempredFuncs, superClass) ::= <<
<if(superClass)>
if __name__ is not None and "." in __name__:
if "." in __name__:
from .<superClass> import <superClass>
else:
from <superClass> import <superClass>
Expand Down