Python-Type-Challenges
Python-Type-Challenges copied to clipboard
Support test_code to add pyright-config comment
New feature
support test_code to add pyright-config as below.
## End of test code ##
# pyright: analyzeUnannotatedFunctions=false
Bug fix
disable user to modify pyright-config.
~~How can I fix the test?~~
I should rewrite the test to make it pass
Could you describe what problems you're trying to solve, and what other ways you have considered (if any)? Thanks.
Could you describe what problems you're trying to solve, and what other ways you have considered (if any)? Thanks.
class MyClass:
def __init__(self, x: int) -> None:
self.x = x
# TODO: Fix the type hints of `copy` to make it type check
def copy(self):
copied_object = MyClass(x=self.x)
return copied_object
It can pass the challenge unexpectedly without return_value annoating
and you said Enabling strict mode would break other challenges in #89, the PR can solve it.
Thanks for the PR.
Surely there's value in enabling the configs, however it also brings more complexity. At this point, I don't think it's worth adding it just to fix a tiny problem.
With that said, in the future it might become more useful, so I'll keep this open and re-evaluate when the time comes. Hope you can understand.