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 type hints to code #393

Open
xandfury opened this issue Aug 12, 2018 · 4 comments

Comments

@xandfury
Copy link
Collaborator

commented Aug 12, 2018

Now that we have migrated to python 3.5, we should also look at adding type hints to our code (some 3.5+ sweet stuff right there)
Depending on editor you use, this could save us from making errors related to python's dynamic typing.

Example:

def add_protocol(protocol_name: str,
data_fs_subdir: str,
vfs_dst_path: str,
src_path=None,
owner_uid: Optional[int] = 0,
group_gid: Optional[int] = 0,
perms: Optional[oct] = 0o755) -> Tuple:

@llucifer97

This comment has been minimized.

Copy link

commented Oct 15, 2018

hi @xandfury I would like to take up this issue.can you tell more about this issue like where should I start from. I am new to open source community.

@xandfury

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 16, 2018

@llucifer97 That's very nice to hear 🙂

I would suggest you to start reading about types and type hints as a primer. Next, go through conpot's source code and add those hints to objects - cross verify if necessary 😉 . Finally, add mypy or pydantic to tox, integrating type checking to our CI.

This should get you started 😉.

In not so later stages, we would to auto-generate our documentation using automodule feature. Something on lines of -

.. automodule:: conpot.core
    :members: fs
@aman566

This comment has been minimized.

Copy link

commented Jan 14, 2019

@xandfury I can work on this issue. If no one has started then I can do. Please assign it to me .

@glaslos

This comment has been minimized.

Copy link
Member

commented Jan 14, 2019

@aman566 feel free to work on this 👍

@amanjiofficial amanjiofficial referenced a pull request that will close this issue Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.