Skip to content

Commit

Permalink
Merge pull request #2683 from Textualize/fileno
Browse files Browse the repository at this point in the history
fix for fileno
  • Loading branch information
willmcgugan committed Dec 2, 2022
2 parents 9c0f164 + c3a2450 commit 73c58a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Handling of broken `fileno` made more robust. Fixes https://github.com/Textualize/rich/issues/2645
- Fixed missing `fileno` on FileProxy

### Added

Expand Down
3 changes: 3 additions & 0 deletions rich/file_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ def flush(self) -> None:
if output:
self.__console.print(output)
del self.__buffer[:]

def fileno(self) -> int:
return self.__file.fileno()

0 comments on commit 73c58a3

Please sign in to comment.