Skip to content

add ParserError to type stub#174

Merged
akrherz merged 3 commits into
python-metar:mainfrom
MatthewFlamm:type-fixes
Jun 15, 2023
Merged

add ParserError to type stub#174
akrherz merged 3 commits into
python-metar:mainfrom
MatthewFlamm:type-fixes

Conversation

@MatthewFlamm

Copy link
Copy Markdown
Contributor

ParserError is missing from type stubs and it causes errors in downstream type checking. See MatthewFlamm/pynws#109.

I don't see any type checking on your CI, but it passes a mypy check when run locally.

@codecov-commenter

codecov-commenter commented Jun 10, 2023

Copy link
Copy Markdown

Codecov Report

Merging #174 (03cd35b) into main (dc582d2) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##             main     #174   +/-   ##
=======================================
  Coverage   88.52%   88.52%           
=======================================
  Files           4        4           
  Lines        1046     1046           
=======================================
  Hits          926      926           
  Misses        120      120           

@akrherz

akrherz commented Jun 10, 2023

Copy link
Copy Markdown
Collaborator

Thank you. Are you able to add a CI check here for us as well?

@MatthewFlamm

Copy link
Copy Markdown
Contributor Author

Thank you. Are you able to add a CI check here for us as well?

I can do that. I see the current pytest is done through conda and directly coding in installing dependencies in the workflow. If I create a requirements-typing.txt and pin mypy version there, you could use dependabot to control updates. Or keep it simple and just install the latest?

@akrherz

akrherz commented Jun 10, 2023

Copy link
Copy Markdown
Collaborator

Or keep it simple and just install the latest?

I think you are more knowledgeable and defer to your judgement for what is best.

@MatthewFlamm

MatthewFlamm commented Jun 10, 2023

Copy link
Copy Markdown
Contributor Author

Added. Im not super familiar with type stubs, but I believe these are only used to signal to downstream applications. I'm not sure that you get the benefit (and pain) of type checking the code inside this package. This is outside the scope of this PR, just wanted to point this out for consideration.

Edit: even if what I said above is true, the benefit of adding the CI check for mypy is that at least the type stubs are internally consistent and valid.

@akrherz

akrherz commented Jun 10, 2023

Copy link
Copy Markdown
Collaborator

pinging @gamecss on this for input

@ghost

ghost commented Jun 10, 2023

Copy link
Copy Markdown

Sorry :)

@ghost

ghost commented Jun 15, 2023

Copy link
Copy Markdown

Sorry, I don't know if I'm going to say something, but why not merge?

@akrherz akrherz merged commit 8d18917 into python-metar:main Jun 15, 2023
@MatthewFlamm MatthewFlamm deleted the type-fixes branch June 15, 2023 16:40
@akrherz akrherz added this to the 1.11.0 milestone Jul 5, 2023
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.

3 participants