Skip to content

Do not initialize intercepts when loading from interactive shell#2

Merged
exking merged 1 commit intomasterfrom
dev
Apr 28, 2018
Merged

Do not initialize intercepts when loading from interactive shell#2
exking merged 1 commit intomasterfrom
dev

Conversation

@firstone
Copy link
Copy Markdown
Collaborator

stdin/err intercepts should not be initialized when loading interactive shell. Otherwise, you cannot load module and issue help command, or just about do anything else in the shell, since output is intercepted.

I'd go a step further and never do it implicitly, instead doing it in Controller class but that might cause some incompatibility.

Rest of the changes are pep8 related minor fixes. They didn't break anything but created lots of linter noise.

@Goose66
Copy link
Copy Markdown

Goose66 commented Apr 15, 2018

When will someone run a Polyglot nodeserver from the shell?

@firstone
Copy link
Copy Markdown
Collaborator Author

Most likely never, which is why it doesn't make sense to initialize logging / intercepts when loaded from it. This is the point of the change.

If you meant to ask why use this module in interactive shell to start with, the answer is - it's usually much easier to start/test initial development and the fastest way to get documentation without having to lookup project on github and diving into code or looking for other documentation.

Copy link
Copy Markdown
Contributor

@exking exking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, definitely would make PyCharm happy

@exking exking merged commit c14a853 into master Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants