No it isn't. The accepted stub syntax is an ellipses (...).
A competent type checker like pyright will error on this code.
Function with declared return type "int" must return value on all code paths
Type "None" cannot be assigned to type "int"
And if you need more proof that pycharm is useless as a type checker: def foo(b) -> int:
if b:
return 1
A classic error where you forget to return a value from all paths and pycharm is silent.