praw-dev / praw

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.
http://praw.readthedocs.io/
BSD 2-Clause "Simplified" License
3.47k stars 456 forks source link

CommentForest: replace_more typing #1932

Closed timendum closed 1 year ago

timendum commented 1 year ago

Feature Summary and Justification

Just a small change in the CommentForest.replace_more method: limit can be None, as per documentation.

A small question: Praw has typing annotation but it's not published annotated, is that intended?

LilSpazJoekp commented 1 year ago

Praw has typing annotation but it's not published annotated, is that intended?

Could you elaborate?

timendum commented 1 year ago

@LilSpazJoekp

I am by no means an expert in the field, but I've found this informatio.

Also, when I import praw as a dependency, mypy doesn't find any type for praw.

module is installed, but missing library stubs or py.typed marker

LilSpazJoekp commented 1 year ago

Seems simple enough to implement. If you'd like you could open a separate MR for this.

timendum commented 1 year ago

@LilSpazJoekp

To publish the type hinting, we must find a solution for attributes, otherwise there will be errors on any submission.title like, because attributes are coming from Reddit and mypy (or others) reports error.

LilSpazJoekp commented 1 year ago

Not sure how that's possible. Most attribute are dynamic.