Skip to content

Fix Filters documentation - #570

Closed
revolter wants to merge 4 commits into
python-telegram-bot:masterfrom
revolter:patch-2
Closed

Fix Filters documentation#570
revolter wants to merge 4 commits into
python-telegram-bot:masterfrom
revolter:patch-2

Conversation

@revolter

Copy link
Copy Markdown
Contributor

No description provided.

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

Thank you :) Do you want to add yourself to AUTHORS.rst before I merge?

@jh0ker jh0ker added ⚙️ documentation affected functionality: documentation 📋 pending-merge work status: pending-merge 📋 pending-reply work status: pending-reply labels Apr 25, 2017
@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

Actually, this fails on the flake8 pre-commit hook. To quote @bomjacob:

I think that's the original reason I had for not including those MessageEntity in the first place, since the docs can't show it properly if you break it into two lines either...

If you can solve this without exceeding the maximum line length of 99 characters while still producing a nice-looking doc page, that would be great.

@jh0ker jh0ker removed the 📋 pending-merge work status: pending-merge label Apr 25, 2017
@Eldinnie

Eldinnie commented Apr 25, 2017 via email

Copy link
Copy Markdown
Member

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

@Eldinnie That sounds reasonable to me

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

To make sure it doesn't show up in the rendered HTML page, it should also be prepended with .. (rst comment). Not sure if this works inline though.

@revolter

Copy link
Copy Markdown
Contributor Author

Yeah, that's some pretty hard line to break. Are you up to add the comment yourself? As it allows edits from maintainers.

@Eldinnie

Copy link
Copy Markdown
Member

yes so to be complete: append the line that's too long with .. # noqa: E501 to make it pass flake8's test but not show up in the docs.

Ignore long line for flake
@revolter

Copy link
Copy Markdown
Contributor Author

I don't get what's wrong this time, coveralls is showing all errors, not only those added by this PR :-?

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

You can ignore the coveralls check for changes like this, it sometimes fucks up

@revolter

Copy link
Copy Markdown
Contributor Author

Done

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

image
Sadly, it does not seem to work :/

@revolter

Copy link
Copy Markdown
Contributor Author

Where is that screenshot from?

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

I cloned your repo/branch and built the documentation

@revolter

Copy link
Copy Markdown
Contributor Author

With Sphinx?

@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

Yes. python setup.py build_sphinx

@Eldinnie

Copy link
Copy Markdown
Member

@jh0ker autodoc maybe ignores it... dunno how to make it ignored in the docs

@revolter

Copy link
Copy Markdown
Contributor Author

Would this:

        >>> (
        >>>     Filters.text & (
        >>>         Filters.entity(MessageEntity.URL) | Filters.entity(MessageEntity.TEXT_LINK)
        >>>     )
        >>> )

be acceptable? I think it also helps the readability by separating those 3 ending parenthesis.

@jh0ker jh0ker removed the 📋 pending-reply work status: pending-reply label Apr 25, 2017
@jh0ker

jh0ker commented Apr 25, 2017

Copy link
Copy Markdown
Member

I think that is a reasonable compromise. Please use ... instead of >>> to denote the continued expression over multiple lines

@revolter

Copy link
Copy Markdown
Contributor Author

I didn't know the exact syntax, I added now the commit.

@revolter

Copy link
Copy Markdown
Contributor Author

Why are there so many unhashable type: 'list' errors in Travis?

@Eldinnie

Copy link
Copy Markdown
Member

@revolter see #579

@Eldinnie

Copy link
Copy Markdown
Member

I overhauled filters docs in #728 so closing this one.

@Eldinnie Eldinnie closed this Jul 19, 2017
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ documentation affected functionality: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants