theochem / iodata

Python library for reading, writing, and converting computational chemistry file formats and generating input files.
https://iodata.readthedocs.io/
GNU Lesser General Public License v3.0
131 stars 46 forks source link

Fix typecheck: TextIOBase instead of TextIO #368

Closed tovrstra closed 2 months ago

tovrstra commented 2 months ago

This fixes one aspect of #367, includes test.

As far as I understand, type hints should still use TextIO from the typing module, so I'm not changing these.

Summary by Sourcery

This pull request fixes a type checking issue by replacing TextIO with TextIOBase in the _interpret_file_lineno function and adds a new test to verify the handling of mixed pure Cartesian data.

deepsource-io[bot] commented 2 months ago

Here's the code health analysis summary for commits 22475e1..d3fbc2b. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.
sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request addresses a type checking issue by replacing TextIO with TextIOBase in the iodata/utils.py file. Additionally, a new test function test_mixed_pure_cartesian has been added to iodata/test/test_molden.py to validate the handling of mixed pure Cartesian data.

File-Level Changes

Files Changes
iodata/test/test_molden.py
iodata/utils.py
Added a new test case in test_molden.py and fixed type checking by replacing TextIO with TextIOBase in utils.py.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
tovrstra commented 2 months ago

Thanks for checking, Paul!