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

dateparser: Remove redundant import of _typeshed.Self #8041

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

AlexWaygood
Copy link
Member

It doesn't exist at runtime:

>>> import dateparser.date
>>> dateparser.date.Self
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'dateparser.date' has no attribute 'Self'

...and it's not used in the stub either.

I'm not sure why stubtest didn't pick it up. My stubtest patch over at python/mypy#12214 does pick it up (and I'm not sure why that is, either... but it's a true positive!)

It doesn't exist at runtime:

```python
>>> import dateparser.date
>>> dateparser.date.Self
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'dateparser.date' has no attribute 'Self'
```

...and it's not used in the stub either.

I'm not sure why stubtest didn't pick it up. My stubtest patch over at python/mypy#12214 _does_ pick it up (and I'm not sure why that is, either... but it's a true positive!)
@AlexWaygood
Copy link
Member Author

@hauntsaninja, this is the only hit in the third-party stubs that was picked up by my python/mypy#12214 stubtest patch. The patch has little impact if stubtest is run with --ignore-missing-stub :)

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks, I can look into why this isn't getting caught

@AlexWaygood AlexWaygood merged commit 45b9e60 into master Jun 8, 2022
@AlexWaygood AlexWaygood deleted the AlexWaygood-patch-1 branch June 8, 2022 20:02
@hauntsaninja
Copy link
Collaborator

@AlexWaygood I got around to looking into this. Turns out I fixed it in python/mypy#12851

@AlexWaygood
Copy link
Member Author

@AlexWaygood I got around to looking into this. Turns out I fixed it in python/mypy#12851

Heh, that makes sense!

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.

2 participants