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: type errors resulting from new mypy #2161

Merged
merged 1 commit into from Nov 19, 2022

Conversation

aucampia
Copy link
Member

@aucampia aucampia commented Nov 18, 2022

Summary of changes

New mypy version is reporting new errors.

In the long run we need to switch to poetry so we can better control this.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Added tests for any changes that have a runtime impact.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

This PR has no runtime changes:

$ PYLOGGING_LEVEL=INFO task run -- git difftool -y -x $(readlink -f devtools/diffrtpy.py) upstream/main | tee /var/tmp/compact.diff
task: [run] 
VIRTUAL_ENV="/home/iwana/sw/d/github.com/iafork/rdflib.reviews/.venv" PATH="/home/iwana/sw/d/github.com/iafork/rdflib.reviews/.venv/bin${PATH:+:${PATH}}" git difftool -y -x /home/iwana/sw/d/github.com/iafork/rdflib.reviews/devtools/diffrtpy.py upstream/main


2022-11-18T20:58:59.054 640638 139738907522880 030:WARNING  root         diffrtpy:40:clean_python failed to strip type hints from /tmp/git-blob-KQRDVq/algebra.py, falling back to using with type hints
2022-11-18T20:58:59.681 640638 139738907522880 030:WARNING  root         diffrtpy:40:clean_python failed to strip type hints from rdflib/plugins/sparql/algebra.py, falling back to using with type hints
--- a/setup.cfg
+++ b/setup.cfg
@@ -55,10 +55,11 @@
 warn_unused_configs = True
 ignore_missing_imports = True
 disallow_subclassing_any = False
 warn_unreachable = True
 warn_unused_ignores = True
+no_implicit_optional = False
 
 # This is here to exclude the setup.py files in test plugins because these
 # confuse mypy as mypy think they are the same module.
 exclude = (?x)(
     ^.*test/plugins/.*/setup.py$

New mypy version is reporting new errors.

In the long run we need to switch to poetry so we can better control
this.
@aucampia aucampia requested a review from a team November 18, 2022 21:01
@aucampia aucampia mentioned this pull request Nov 18, 2022
4 tasks
@aucampia
Copy link
Member Author

Merging as this has no changes that could affect users.

@aucampia aucampia merged commit e68cfe4 into RDFLib:main Nov 19, 2022
@aucampia aucampia deleted the iwana-20221118T2144-fix_type_errors branch April 9, 2023 15:04
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.

None yet

1 participant