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

Implement isatty() to make the CaptureOutput compatible with Django requirements #704

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

carlio
Copy link
Member

@carlio carlio commented Nov 19, 2024

Description

When using prospector (with pylint) on a Django project, Django runs into a problem testing whether the sysout/stderr is a TTY, but prospector wraps that in CaptureOutput.

Please ignore that I can't spell "bugfix" in the branch name 🙄

Related Issue

Fixes #703

Motivation and Context

This PR implements that particular test for the case of prospector+Django

How Has This Been Tested?

I had this problem on my own local project, and this code fixed it - it was a simple missing implementation on the wrapper class.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change requires a change to the dependencies
  • I have updated the dependencies accordingly
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…es, so the capture output stream needs to minic this behaviour for cases where prospector is being used with Django
@carlio carlio force-pushed the bugfiz/703-isatty-django branch from e31c8b2 to 16af5ba Compare November 19, 2024 12:36
@carlio carlio requested a review from sbrunner November 19, 2024 12:38
@carlio carlio marked this pull request as ready for review November 19, 2024 12:38
Copy link
Collaborator

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Wouldn't have noticed the spelling in the branch name.. if you didn't point it out 😄

@carlio carlio merged commit 27c00b0 into master Nov 19, 2024
5 checks passed
@carlio carlio deleted the bugfiz/703-isatty-django branch November 19, 2024 14:06
@sbrunner sbrunner added this to the 1.13.3 milestone Nov 19, 2024
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.

[BUG] Prospector fails pylint error - 1.13.x
3 participants