Skip to content

Add pyupgrade-docs to pre-commit - #8366

Closed
verhovsky wants to merge 1 commit into
pytest-dev:mainfrom
verhovsky:master
Closed

Add pyupgrade-docs to pre-commit#8366
verhovsky wants to merge 1 commit into
pytest-dev:mainfrom
verhovsky:master

Conversation

@verhovsky

Copy link
Copy Markdown
Contributor

a follow up to #5705

since pytest supports only Python 3.6+, we can use f-strings in the documentation

@nicoddemus

Copy link
Copy Markdown
Member

LGTM, thanks a lot for that and writing https://github.com/verhovsky/pyupgrade-docs. 👍

Could you also add that to our pre-commit configuration? Thanks!

@verhovsky

Copy link
Copy Markdown
Contributor Author

@nicoddemus done.

thanks for writing/maintaining pytest, it's one of my favorite libraries!

@verhovsky verhovsky changed the title run pyupgrade-docs Add pyupgrade-docs to pre-commit Feb 24, 2021

@nicoddemus nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

(Note to squash this before we merge it)

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just making sure you saw this @verhovsky (since you're not watching the repo): verhovsky/pyupgrade-docs#3

@verhovsky

verhovsky commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

@asottile I pinned pyupgrade's minor version to 2.10.* and released it as pyupgrade-docs v0.2.4. I hope that works for you.

@asottile I pinned pyupgrade to 2.10.0 and released it as pyupgrade-docs v0.2.5. I hope that works.

@verhovsky
verhovsky requested a review from asottile February 25, 2021 16:50
Base automatically changed from master to main March 9, 2021 20:40

@nicoddemus nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @verhovsky!

@asottile anything else needs to be done here?

@asottile

Copy link
Copy Markdown
Member

Thanks @verhovsky!

@asottile anything else needs to be done here?

yeah we probably shouldn't use the tool since it integrates in an incompatible and unsupported way (and likely will either break or be stuck on an old version)

@nicoddemus

Copy link
Copy Markdown
Member

@asottile thanks!

@verhovsky thanks anyway for the PR! Perhaps once the issues (which I'm not familiar with TBH) are fixed, you can open another PR? Thanks!

@nicoddemus nicoddemus closed this Mar 20, 2021
@RonnyPfannschmidt

Copy link
Copy Markdown
Member

@asottile any opinion on allowing pyupgrade to be invoked as a python function? i'm under the impression they just don't want to take a "i has no api" and i see providing a explicit minimal api as opportunity to make tooling easier

@asottile

Copy link
Copy Markdown
Member

no I don't want to provide an api because it paints me into a corner and prevents me from adding features. the only supported api is the entrypoint

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

@asottile i was thinking along the lines of exposing a "limited" api in the sense of having only a parse_args and a fix_content(args, original_content) with a explicit note that the type/strucutre of the parsed args is open

@asottile

Copy link
Copy Markdown
Member

no thanks, they might as well use the entrypoint at that point

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

@asottile i see, in that case it may be necessary to document that, also stdio replacement is still a pain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants