python-openapi / openapi-spec-validator

OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.
Apache License 2.0
329 stars 61 forks source link

Bump flynt from 0.78 to 1.0.0 #245

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flynt from 0.78 to 1.0.0.

Changelog

Sourced from flynt's changelog.

v.1.0.0

Drop support for python 3.7.

Moved % and .format expression identification to ast instead of legacy token state machine.

This has led to small changes in formatting of output code, e.g. type of quotes in ambiguous cases might have changed. Example: 'first part {}'"second part {}".format(one, two) used to result in " quotes, and now results in ', as in f'first part {one}second part {two}'. I think it's a minor change in the output. At the same time it's a huge simplification of the source code that should help maintain and develop this project in the future.

v.0.77

[Contributed by Aarni Koskela] --transform-joins (-tj) will transform string join operations on static operands to an f-string.

[Contributed by Aarni Koskela] Fix handling of escaped unicode characters (#55 and #104).

[Contributed by Aarni Koskela] Add flags to disable percent statement / .format statement transformations: --no-tp, --no-transform-percent and --no-tf, --no-transform-format.

v.0.71

Added support to configuration via file. For per-project configuration, use pyproject.toml file, [tool.flynt] section. for global config, use ~/.config/flynt.toml file.

v0.70

[Contributed by Ryan Barrett] Aggressive mode enables transforming expressions where same variable is used twice, e.g. """a = '%(?)s %(?)s' % {'?': var}""" to """a = f'{var} {var}'"""

v.0.47

  • added the changelog.
  • added -a / --aggressive flag to enable risky (with behaviour potentially different from original) transformations. This currently includes "%5" % var -> f"{var:5}" transformation. Demo of unsafe behavior:
print( "|%5s|%5d|%5d|" % ('111', 999_999, 77)  )
print( "|%5d|%5d|%5d|" % (111, 999_999, 77)  )

print( "|{:5s}|{:5}|{:5}|".format('111', 999_999, 77) ) print( f"|{111:5}|{999_999:5}|{77:5}|" )

""" output: </tr></table>

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
codecov[bot] commented 1 year ago

Codecov Report

Merging #245 (0dcfaf2) into master (7c7c175) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #245   +/-   ##
=======================================
  Coverage   92.72%   92.72%           
=======================================
  Files          13       13           
  Lines         426      426           
  Branches       66       66           
=======================================
  Hits          395      395           
  Misses         21       21           
  Partials       10       10