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

chore: add py.typed file #419

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore: add py.typed file #419

wants to merge 1 commit into from

Conversation

Goldziher
Copy link

This PR adds the missing py.typed file. Without this file the library is considered untyped by type checkers.

Copy link

@midhunprahash-ui midhunprahash-ui left a comment

Choose a reason for hiding this comment

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

from setuptools import setup, find_packages

setup(
name="your_package_name", # Replace with your package's name
version="0.1", # Adjust the version number
license="MIT",
packages=find_packages(),
package_data={
'crawl4ai': [
'js_snippet/*.js',
'py.typed' # Make sure py.typed is included
],
},
classifiers=[
"Development Status :: 3 - Alpha",
# Add other classifiers as necessary
],
)

Copy link

@midhunprahash-ui midhunprahash-ui left a comment

Choose a reason for hiding this comment

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

To correctly add a py.typed file to your package, you need to ensure the py.typed file is included in the package_data in your setup.py. However, the syntax in your snippet has a small issue. The dictionary keys in the package_data section should be unique, and you accidentally included the same key 'crawl4ai' twice.

@Goldziher
Copy link
Author

To correctly add a py.typed file to your package, you need to ensure the py.typed file is included in the package_data in your setup.py. However, the syntax in your snippet has a small issue. The dictionary keys in the package_data section should be unique, and you accidentally included the same key 'crawl4ai' twice.

I think you are mistaken. The key is there only once. What you are seeing is a git diff showing before and after.

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