scout_apm_python icon indicating copy to clipboard operation
scout_apm_python copied to clipboard

Add typing information

Open wagdez opened this issue 5 years ago • 1 comments

We currently ignore typing of scout_apm in our project import scout_apm.api # type: ignore it would be nice to have typing information

wagdez avatar Oct 19 '20 06:10 wagdez

Hi @wagdez !

I agree, it would be nice to ship type hints for the public API. We're a little constrained on that since we still support Python 2.7, since so many customers use it. Although it's possible to ship type stub files alongside Python 2.7 code, there's at least the unicode/str mess to address.

To be honest we'd need to do some more research to figure out the approach there - personally I've only worked with type hints in application code bases, from Python 3.7+. If you can point to any resources on maintaining type hints on Python 2.7+ projects that'd be useful.

Thanks,

Adam

adamchainz avatar Oct 19 '20 08:10 adamchainz