-
-
Notifications
You must be signed in to change notification settings - Fork 143
remove cache options #158
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
remove cache options #158
Conversation
I don't think it is called with |
So I assume that is effectively the same as deleting the cache (but it it less code on our side to achieve it) |
Yes, but I don't see that we are running with |
That seems to be the case on main: pandas-stubs/scripts/test/run.py Line 7 in 9072b15
|
Ah, good. So you're right that we don't need the option! |
pyproject.toml
Outdated
@@ -166,7 +145,7 @@ enable_error_code = "ignore-without-code" # same as in pandas | |||
allow_untyped_globals = false | |||
allow_redefinition = false | |||
local_partial_types = false | |||
implicit_reexport = false # pyright behaves the same | |||
implicit_reexport = true |
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.
Could re-enable this option again as mypy 0.971 seems to need npt = numpy.typing
in either case
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.
Given that you had to change the npt
reference because of mypy
0.971, can you bump the version in pyproject.toml
?
@@ -14,7 +13,7 @@ def pyright_src(): | |||
|
|||
|
|||
def pytest(): | |||
cmd = ["pytest"] | |||
cmd = ["pytest", "--cache-clear"] |
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.
double checking that not clearing the cache will always work.
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.
Locally, I do not need to clear the cache. Happy to remove it. The CI will anyways have a clean plate every time it runs.
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.
So I see. Now your proposal is to always clear the cache. I think that's a good idea. Equivalent to what will happen with mypy
where we always use --no-incremental
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.
I would be fine with keeping the pytest cache - just wanted to match the behavior of mypy.
|
||
def clean_pytest_cache(): | ||
if Path(".mypy_cache").exists(): | ||
shutil.rmtree(".pytest_cache") |
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.
the test was wrong here, so the -c
never worked!
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.
hahaha :) I didn't notice that when I removed it :)
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.
Thanks @twoertwein
mypy is already called with
--no-incremental
which disables the cache. I simply added the corresponding flag for pytest, to remove this flag.