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

Drop Python 3.4 support and add mypy #13

Open
luk3yx opened this issue Apr 6, 2019 · 4 comments
Open

Drop Python 3.4 support and add mypy #13

luk3yx opened this issue Apr 6, 2019 · 4 comments

Comments

@luk3yx
Copy link
Owner

luk3yx commented Apr 6, 2019

From faeece4#commitcomment-33058422:

If you really want to prevent a lot of simple bugs, I recommend using type annotations with mypy, but this will probably require dropping support for Python <= 3.5. mypy can be annoying at first, but here is a sample config file for it to prevent its noise.

Resources:

luk3yx referenced this issue Apr 6, 2019
 • Use time.sleep() instead of sleep()
 • Use errno.EWOULDBLOCK instead of 11 on line 321.
@impredicative
Copy link

impredicative commented Apr 6, 2019

Apart from the config file, there are two ways that I personally know of and use to disable any irrelevant mypy messages:

@luk3yx
Copy link
Owner Author

luk3yx commented Apr 6, 2019

For future reference, Ubuntu 14.04 / Linux Mint 17 machines (that should really be upgraded to a newer distro) can be updated with ppa:deadsnakes/ppa.

@luk3yx luk3yx pinned this issue Apr 6, 2019
@luk3yx
Copy link
Owner Author

luk3yx commented May 15, 2019

Currently, there are two ways of checking other mypy code against miniirc:

  • Using miniirc.pyi (if I can somehow distribute this in the same PyPI package I will).
  • Using miniirc_extras.AbstractIRC. This only works for IRC objects and not for other functions (such as Handler and CmdHandler).

@luk3yx
Copy link
Owner Author

luk3yx commented Jan 15, 2020

Python 3.4 support will be dropped if/when I release miniirc v2.1.0.

I probably won't be adding mypy in miniirc itself until the minimum supported version is Python 3.6.

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

No branches or pull requests

2 participants