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

Add stubs for Scrapy #8759

Closed
xlurio opened this issue Sep 17, 2022 · 12 comments
Closed

Add stubs for Scrapy #8759

xlurio opened this issue Sep 17, 2022 · 12 comments
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed

Comments

@xlurio
Copy link

xlurio commented Sep 17, 2022

Apparently there are no type stubs for Scrapy and I always have to write it on my own. Can we start to build one?

@AlexWaygood AlexWaygood added the stubs: request OUTDATED! Request to add stubs for a new package to typeshed label Sep 17, 2022
@AlexWaygood
Copy link
Member

AlexWaygood commented Sep 17, 2022

Hi! We're unlikely to add stubs for Scrapy ourselves, but we'd probably accept stubs for Scrapy if you'd like to submit a PR! There's instructions in CONTRIBUTING.md for how to go about doing that. If anything's unclear, feel free to ask :)

@AlexWaygood AlexWaygood changed the title No type stubs for Scrapy Add stubs for Scrapy Sep 17, 2022
@xlurio
Copy link
Author

xlurio commented Sep 17, 2022

Yeah, I just wanted to create an issue before the PR so to avoid problems.
Thank you for the answer! I'll make a pull request soon enough!

@srittau
Copy link
Collaborator

srittau commented Sep 18, 2022

I'm closing this issue as per our policy about stub requests, but new stub contributions are very welcome!

@srittau srittau closed this as completed Sep 18, 2022
@afeld
Copy link

afeld commented Oct 24, 2022

Issue around adding type hints to Scrapy: scrapy/scrapy#4041

@AlexanderHott
Copy link

Is anyone work on this yet? If not, I think I could start.

@AlexWaygood
Copy link
Member

Is anyone work on this yet?

Not that I know of. @xlurio?

@xlurio
Copy link
Author

xlurio commented Nov 7, 2022

Is anyone work on this yet?

Not that I know of. @xlurio?

I am, but still at 5%.

@AlexanderHott
Copy link

@xlurio I'd love to help, should I make PRs to your forked repo?

@xlurio
Copy link
Author

xlurio commented Nov 8, 2022

@xlurio I'd love to help, should I make PRs to your forked repo?

Yes, please!

@guyarad
Copy link

guyarad commented May 8, 2024

@xlurio @AlexanderHott hey guys, was it abandoned?

@xlurio
Copy link
Author

xlurio commented May 8, 2024

yeah... I didn't had time anymore to work on it @guyarad

@AlexanderHott
Copy link

It was a lot more work than I expected when I look into it. You would have to type the underlying parsing libraries that use xpath and css selectors, which I didn't want to get into. I don't have a use for scrapy right now, so I'm not working on it.

If you wanted to give it a shot, you should probably start with the publicly exposed dependencies that scrapy uses as return types and parameter types. As far as I rememeber, it uses parsel https://github.com/scrapy/scrapy/blob/master/scrapy/selector/unified.py#L7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed
Projects
None yet
Development

No branches or pull requests

6 participants