DEV Community

Discussion on: One Easy Way to Improve Your Ruby Security

Collapse
 
lyfolos profile image
Muhammed H. Alkan

There is was in Python a long time ago.

Mypy is for the checking (optionally) statically typed code in Python. (It's official)

Typing is the stdlib for adding data types like List, Tuple, Unions etc. to check with mypy.

Pytype is young, but nice. It can recognize the data types without inferences and check it like in mypy.

Collapse
 
rhymes profile image
rhymes

Thanks Muhammed, mypy is interesting, rubocop though is not about type checking.

It checks the code against a style guide, for things like syntax, layout, rails specific rules, performance and security tips and so on. Being a plugin system it can do a lot (and in some cases does too much :D)

The most similar tool I can think of is flake8 with its extensions.

Thread Thread
 
lyfolos profile image
Muhammed H. Alkan

Ah, I haven't readed the post correctly, thanks. But flake8 is still so good.