Slyp

Latest version: v0.6.1

Safety actively analyzes 623677 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.6.1

- Enable autofixing of some concatenated strings which combine f-strings with
simple strings, as long as no extra escaping is needed
- Autofixing can be disabled with comments containing `slyp: disable`,
`slyp: disable=format`, or `fmt: off`. Inverse comments, `slyp: enable` and
`fmt: on` can be used to re-enable autofixing.

0.6.0

- Unexpected errors encountered when parsing files are now reported as failures, rather
than causing `slyp` to abort
- Replace E110 with autofixer behavior, which rewrites the return of a known-`None`
variable immediately after testing it to return `None` instead
- Replace W102 with autofixer behavior, which parenthesizes multiline
concatenated strings in dict elements
- Replace W103 with autofixer behavior, which parenthesizes multiline
concatenated strings in tuple, list, and set literals if there is more than
one element
- Add the `--only` flag, enabling `--only=lint` or `--only=fix` to run only
the linting or fixing
- Add basic support for reading data from stdin, in which case
- `--only` must be used
- if `--only=fix`, then the resulting file is always written to stdout
- Implement an additional check for unnecessary string concatenation, E101

0.5.0

- Replace the W101 lint with autofixer behavior, which will insert the
necessary parentheses
- Improve the way that files are handled to read only once from disk per file
- `slyp` now processes files in parallel and produces its output at the end of
its run (with some simple sorting)

0.4.1

- Fix passing file caching to correctly record successes after a failure
- The cache implementation has been improved to cache by file contents rather
than path, allowing duplicate files to share a cache entry

0.4.0

- Various performance improvements, especially for fixing
- `slyp` will now cache results for files which pass all checks in
`.slyp_cache`, thus avoiding rechecking files which pass and have
not changed

- this behavior can be disabled with `--no-cache`
- the cache is maintained independently for each possible set of
`--enable/--disable` options passed to `slyp`
- projects which fully pass `slyp` checking should experience the greatest
improvement -- as great as 50x faster on sizable production codebases with
a populated cache

0.3.0

- Fix the handling of parenthesized lambdas in the fixer. The innermost
parentheses arounda lambda are now preserved.
- Minor speed enhancements.
- Fix the handling of autofixing in certain expressions when there is no
whitespace between a hard keyword and a parenthesis, inserting spaces when
necessary.
- Fix unnecessarily parenthesized `with` and `from ... import ...` statements.
- Preserve parentheses immediately under unary operations, as they may aid
readability.
- Remove W120. It is automatically fixed by the latest `black` versions.
- In restricted cases, the fixer will now automatically join implicitly
concatenated strings when there is no newline. This autofix covers some cases
of E100.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.