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.76 to 0.78 #224

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flynt from 0.76 to 0.78.

Changelog

Sourced from flynt's changelog.

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: | 111|999999| 77| | 111|999999| 77| |111 |999999| 77| << behavior differs when printing a string | 111|999999| 77| """

  • %d format specifier is transformed only in --aggressive mode, and will result in "%d" % var -> f"{int(var)}". See ikamensh/flynt#59.

  • added short versions to other flags:

--line-length, -l
</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 #224 (ec24924) into master (1a32d3b) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          13       13           
  Lines         432      432           
  Branches       66       66           
=======================================
  Hits          400      400           
  Misses         22       22           
  Partials       10       10