-
Notifications
You must be signed in to change notification settings - Fork 11
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 type hints #150
Fix type hints #150
Conversation
Signed-off-by: Samuel Giffard <[email protected]>
58f1fc3
to
f595f12
Compare
This contains the following changes: - `SizeLimitedFile` uses common conventions, types and defaults. - `_fileobj_name` -> `_obj_name`, as it's not related to files. - `rohmufile.write_file` only requires `HasRead` for the input file. - `HasRead`, `HasWrite` use Python conventions, types and defaults. - `FileLike` uses Python conventions, types and defaults. - New `HasName`. Signed-off-by: Samuel Giffard <[email protected]>
Signed-off-by: Samuel Giffard <[email protected]>
f595f12
to
0931939
Compare
Codecov Report
@@ Coverage Diff @@
## main #150 +/- ##
==========================================
+ Coverage 66.76% 66.77% +0.01%
==========================================
Files 35 35
Lines 3899 3904 +5
==========================================
+ Hits 2603 2607 +4
- Misses 1296 1297 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these whitespace changes are required by other projects, there should be autoformat step to ensure future rohmu changes also fullfill these requirements. (And ideally also provides autofixed formatting if available.)
You're right, an autoformat would be great. They are not required for the current problem this PR is fixing. If you like I can drop this particular commit that removes the spaces. To be noted that the standard is without the space and that many tools will show a lot of alerts when that space is there.
|
Please see my comment, and tell me if you wish me to remove this "ignore" commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is fine to include it too. I don't mind the change, I just want to avoid hidden dependencies on stricter validation in other projects.
This fixes some type hint issues that are preventing downstream projects from passing CI.
This contains the following changes:
SizeLimitedFile
uses common conventions, types and defaults._fileobj_name
->_obj_name
, as it's not related to files.rohmufile.write_file
only requiresHasRead
for the input file.HasRead
,HasWrite
use Python conventions, types and defaults.FileLike
uses Python conventions, types and defaults.HasName
.Why this way