You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The case insensitivity means that an unintentional alias is created for the Job class since psi/j/Job.py and psi/j/job.py seemingly both exist.
(.venv-vscode-focal) fluxuser@1f7fe27de5f4:/workspaces/psi-j-python$ make typecheck
mypy --config-file=.mypy --strict src tests
src/psi/j/Job.py:117: error: Argument 1 to "cancel" of "JobExecutor" has incompatible type "psi.j.Job.Job"; expected "psi.j.job.Job"
(.venv-vscode-focal) fluxuser@1f7fe27de5f4:/workspaces/psi-j-python$ mypy --version
mypy 0.910
The impact here is that mypy checks will fail on any mac that has a case insensitive filesystem and windows machines. I also suspect that runtime can be impacted by this (e.g., import psi.j.Job - should that import the "Job.py" file or the Job class exposed by psi.j).
The text was updated successfully, but these errors were encountered:
Two solutions that I'm aware of would be to either rename the Job class or rename psi/j/job.py to something else, maybe psi/j/job_class.py. If we rename the file, you can still import/reference the Job class as psi.j.Job since the psi/j/init.py exports it.
There appear to be issues in general with python imports and mypy when running on code that is on case-insensitive file systems. Since the type correctness of the psi/j code can be verified on other systems, I do not believe that we gain much by adding workarounds to actual bugs (or regressions; see python/mypy#1961) in mypy.
The case insensitivity means that an unintentional alias is created for the
Job
class sincepsi/j/Job.py
andpsi/j/job.py
seemingly both exist.The impact here is that mypy checks will fail on any mac that has a case insensitive filesystem and windows machines. I also suspect that runtime can be impacted by this (e.g.,
import psi.j.Job
- should that import the "Job.py" file or the Job class exposed bypsi.j
).The text was updated successfully, but these errors were encountered: