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

fix: typing for file opened for writing with click #403

Merged
merged 2 commits into from
Apr 30, 2023

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Apr 30, 2023

click opens files for writing lazily, meaning that a file opened for writing is not immediately an io.TextIOWrapper but a click.utils.LazyFile for the purpose of typing: https://click.palletsprojects.com/en/8.1.x/api/#click.File. This was flagged by typeguard version 4.0.0rc4 (which will be adopted after full release via #391).

* fix typing for file opened for writing with click in command line interface

@codecov
Copy link

codecov bot commented Apr 30, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (787c577) 100.00% compared to head (4b39b04) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #403   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2078      2078           
  Branches       334       334           
=========================================
  Hits          2078      2078           
Impacted Files Coverage Δ
src/cabinetry/cli/__init__.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-held alexander-held merged commit 1572423 into master Apr 30, 2023
@alexander-held alexander-held deleted the fix/cli-file-type branch April 30, 2023 15:17
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.

1 participant