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 linting with mypy + precommit? #10945

Merged
merged 6 commits into from
Feb 18, 2024
Merged

fix linting with mypy + precommit? #10945

merged 6 commits into from
Feb 18, 2024

Conversation

logan-markewich
Copy link
Collaborator

@logan-markewich logan-markewich commented Feb 18, 2024

The current pre-commit config was missing errors in mypy (I purposely tried to make typing errors, and they weren't detected)

From my local testing, this seems to have fixed the issue (and also identified some issues in core!)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 18, 2024
@@ -113,11 +113,11 @@ def tokenizer(self) -> Callable[[str], List[Any]]:
"""Get the tokenizer."""
import llama_index.core

if llama_index.global_tokenizer is None:
if llama_index.core.global_tokenizer is None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could've sworn we've fixed this before. I remember doing search for global_tokenizer specifically. Maybe got overwritten?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might have gotten overwritten at some point lol

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of moving parts lately

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol yah that's for sure. Oh well -- we do our best!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 18, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 18, 2024
@logan-markewich logan-markewich enabled auto-merge (squash) February 18, 2024 18:55
@logan-markewich logan-markewich merged commit b8d58f5 into main Feb 18, 2024
8 checks passed
@logan-markewich logan-markewich deleted the logan/fix_linting branch February 18, 2024 19:32
Dominastorm pushed a commit to uptrain-ai/llama_index that referenced this pull request Feb 28, 2024
anoopshrma pushed a commit to anoopshrma/llama_index that referenced this pull request Mar 2, 2024
Izukimat pushed a commit to Izukimat/llama_index that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants