FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make IOBase a context manager by jaroel · Pull Request #649 · RustPython/RustPython · GitHub

Repository navigation

Make IOBase a context manager - #649

Merged
rmliddle merged 1 commit into
RustPython:masterfrom
jaroel:context-manager-open
Mar 10, 2019
Merged

rmliddle merged 1 commit into
RustPython:masterfrom
jaroel:context-manager-open

Conversation

jaroel commented Mar 10, 2019

Copy link
Copy Markdown
Contributor

This allows the following:

with open('README.md') as fp:
    fp.read()

This does not close the file, as there's no close method yet. See #547 .

Fixes #648

jaroel changed the title Make open a context manager Make IOBase a context manager Mar 10, 2019

Copy link
Copy Markdown

Codecov Report

Merging #649 into master will increase coverage by 0.05%.
The diff coverage is 42.1%.

@@            Coverage Diff             @@
##           master     #649      +/-   ##
==========================================
+ Coverage   40.81%   40.86%   +0.05%     
==========================================
  Files          76       76              
  Lines       17345    17358      +13     
  Branches     4474     4484      +10     
==========================================
+ Hits         7079     7093      +14     
+ Misses       8366     8358       -8     
- Partials     1900     1907       +7
Impacted Files Coverage Δ
vm/src/stdlib/io.rs 29.58% <42.1%> (+2.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 010969f...8f6257b. Read the comment docs.

rmliddle merged commit f57d2e2 into RustPython:master Mar 10, 2019
jaroel deleted the context-manager-open branch March 10, 2019 02:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Builtin IOBase should be a context manager

3 participants


Back | FazBrowse Home | New Git URL