Darker

Latest version: v2.1.1

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

Scan your dependencies

Page 3 of 5

1.4.1

===================

Added
-----
- Run tests on CI against Black_ ``main`` branch to get an early warning of
incompatible changes which would break Darker.
- Determine the commit range to check automatically in the GitHub Action.
- Improve GitHub Action documentation.
- Add Nix CI builds on Linux and macOS.
- Add a YAML linting workflow to the Darker repository.
- Updated Mypy_ to version 0.931.
- Guard against breaking changes in Black_ by testing against its ``main`` branch
in the ``test-future`` GitHub Workflow.

Fixed
-----
- Consider ``.py.tmp`` as files which should be reformatted.
This enables VSCode Format On Save.
- Use the latest release of Darker instead of 1.3.2 in the GitHub Action.

1.4.0

===================

Added
-----
- Experimental GitHub Actions integration
- Consecutive lines of linter output are now separated by a blank line.
- Highlight linter output if Pygments is installed.
- Allow running Darker on plain directories in addition to Git repositories.

Fixed
-----
- ``regex`` module now always available for unit tests
- Compatibility with NixOS_. Keep ``$PATH`` intact so Git can be called.
- Updated tests to pass on new Pygments versions
- Compatibility with `Black 22.1`_
- Removed additional newline at the end of the file with the ``--stdout`` flag
compared to without.
- Handle isort file skip comment ``isort:file_skip`` without an exception.
- Fix compatibility with Pygments 2.11.2.

Removed
-------
- Drop support for Python 3.6 which has reached end of life.

1.3.2

===================

Added
-----
- Linter failures now result in an exit value of 1, regardless of whether ``--check``
was used or not. This makes linting in Darker compatible with ``pre-commit``.
- Declare Python 3.9 and 3.10 as supported in package metadata
- Run test build in a Python 3.10 environment on GitHub Actions
- Explanation in README about how to use ``args:`` in pre-commit configuration

Fixed
-----
- ``.py.<hash>.tmp`` files from VSCode are now correctly compared to corresponding
``.py`` files in earlier revisions of the Git reposiotry
- Honor exclusion patterns from Black_ configuration when choosing files to reformat.
This only applies when recursing directories specified on the command line, and only
affects Black_ reformatting, not ``isort`` or linters.
- ``--revision rev1...rev2`` now actually applies reformatting and filters linter output
to only lines modified compared to the common ancestor of ``rev1`` and ``rev2``
- Relative paths are now resolved correctly when using the ``--stdout`` option
- Downgrade to Flake8_ version 3.x for Pytest compatibility.
See `tholo/pytest-flake881`__

__ https://github.com/tholo/pytest-flake8/issues/81

1.3.1

===================

Added
-----
- Empty and all-whitespace files are now reformatted properly
- Darker now allows itself to modify files when called with ``pre-commit -o HEAD``, but
also emits a warning about this being an experimental feature
- Mention Black_'s possible new line range formatting support in README
- Darker can now be used in a plain directory tree in addition to Git repositories

Fixed
-----
- ``/foo $ darker --diff /bar/my-repo`` now works: the current working directory can be
in a different part of the directory hierarchy
- An incompatible ``isort`` version now causes a short user-friendly error message
- Improve bisect performance by not recomputing invariant data within bisect loop

1.3.0

===================

Added
-----
- Support for Black_'s ``--skip-magic-trailing-comma`` option
- ``darker --diff`` output is now identical to that of ``black --diff``
- The ``-d`` / ``--stdout`` option outputs the reformatted contents of the single Python
file provided on the command line.
- Terminate with an error if non-existing files or directories are passed on the command
line. This also improves the error from misquoted parameters like ``"--lint pylint"``.
- Allow Git test case to run slower when checking file timestamps. CI can be slow.
- Fix compatibility with Black_ >= 21.7b1.dev9
- Show a simple one-line error instead of full traceback on some unexpected failures
- Skip reformatting files set to be excluded by Black_ in configuration files

Fixed
-----
- Ensure a full revision range ``--revision <COMMIT_A>..<COMMIT_B>`` where
COMMIT_B is *not* ``:WORKTREE:`` works too.
- Hide fatal error from Git on stderr when ``git show`` doesn't find the file in rev1.
This isn't fatal from Darker's point of view since it's a newly created file.
- Use forward slash as the path separator when calling Git in Windows. At least
``git show`` and ``git cat-file`` fail when using backslashes.

1.2.4

===================

Added
-----
- Upgrade to and satisfy Mypy_ 0.910 by adding ``types-toml`` as a test dependency, and
``types-dataclasses`` as well if running on Python 3.6.
- Installation instructions in a Conda environment.

Fixed
-----
- Git-related commands in the test suite now ignore the user's ``~/.gitconfig``.
- Now works again even if ``isort`` isn't installed
- AST verification no longer erroneously fails when using ``--isort``
- Historical comparisons like ``darker --diff --revision=v1.0..v1.1`` now actually
compare the second revision and not the working tree files on disk.
- Ensure identical Black_ formatting on Unix and Windows by always passing Unix newlines
to Black_

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.