Darker

Latest version: v2.1.1

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

Scan your dependencies

Page 1 of 5

2.1.1

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

Added
-----
- In the Darker configuration file under ``[tool.darker]``, the Black configuration
options ``skip_string_normalization`` and ``skip_magic_trailing_comma`` have been
deprecated and will be removed in Darker 3.0. A deprecation warning is now displayed
if they are still used.

Removed
-------
- The ``release_tools/update_contributors.py`` script was moved to the
``darkgray-dev-tools`` repository.

Fixed
-----
- A dash (``-``) is now allowed as the single source filename when using the
``--stdout`` option. This makes the option compatible with the
`new Black extension for VSCode`__.
- Badge links in the README on GitHub.
- Handling of relative paths and running from elsewhere than repository root.

__ https://github.com/microsoft/vscode-black-formatter

2.1.0

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

Added
-----
- Mark the Darker package as annotated with type hints.
- Update to ``ioggstream/bandit-report-artifactsv1.7.4`` in CI.
- Support for Python 3.12 in the package metadata and the CI build.
- Update to Black 24.2.x and isort 5.13.x in pre-commit configuration.
- Test against Flynt ``master`` branch in the CI build.
- Update to Darkgraylib 1.1.1 to get fixes for README formatting.
- Improved "How does it work?" section in the README.
- README section on limitations and work-arounds.

Removed
-------
- ``bump_version.py`` is now in the separate ``darkgray-dev-tools`` repository.
- Skip tests on Python 3.13-dev in Windows and macOS. C extension builds are failing,
this exclusion is to be removed when Python 3.13 has been removed.

Fixed
-----
- Bump-version pre-commit hook pattern: ``rev: vX.Y.Z`` instead of ``X.Y.Z``.
- Escape pipe symbols (``|``) in the README to avoid RestructuredText rendering issues.
- Compatibility with Flynt 0.78.0 and newer.

2.0.0

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

Added
-----
- The command ``darker --config=check-darker.toml`` now runs Flake8_, Mypy_,
pydocstyle_, Pylint_ and Ruff_ on modified lines in Python files. Those tools are
included in the ``[test]`` extra.
- The minimum Ruff_ version is now 0.0.292. Its configuration in ``pyproject.toml`` has
been updated accordingly.
- The contribution guide now gives better instructions for reformatting and linting.
- Separate GitHub workflow for checking code formatting and import sorting.
- Also check the action, release tools and ``setup.py`` in the build workflows.
- Require Darkgraylib 1.0.x and Graylint 1.0.x.
- Update 3rd party GitHub actions to avoid using deprecated NodeJS versions.
- CI build now shows a diff between output of ``darker --help`` and its output as
included ``README.rst`` in case the two differ.

Removed
-------
- Drop support for Python 3.7 which has reached end of life.
- ``shlex_join`` compatibility wrapper for Python 3.7 and earlier.
- Move linting support to Graylint_ but keep the ``-L``/``--lint`` option for now.
- Move code used by both Darker and Graylint_ into the Darkgraylib_ library.
- Don't run pytest-darker_ in the CI build. It's lagging quite a bit behind.

Fixed
-----
- `Black 24.2.0`_ compatibility by using the new `darkgraylib.files.find_project_root`
instead of the implementation in Black.
- `Black 24.2.1`_ compatibility by detecting the new `black.parsing.ASTSafetyError` instead
of `AssertionError` when Black>=24.2.1 is in use.
- Make sure NixOS_ builds have good SSL certificates installed.
- Work around some situations where Windows errors due to a too long Git command line.

1.7.3

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

Added
-----
- Limit Black_ to versions before 24.2 until the incompatibility is resolved.
- Stop testing on Python 3.7. Note: dropping support to be done in a separate PR.

Fixed
-----
- Typos in README.
- Usage of the Black_ ``gen_python_files(gitignore_dict=...)`` parameter.
- ``show_capture`` option in Pytest configuration.
- Ignore some linter messages by recent versions of linters used in CI builds.
- Fix compatibility with Pygments 2.4.0 and 2.17.2 in unit tests.
- Update `actions/checkoutv3` to `actions/checkoutv4` in CI builds.

1.7.2

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

Added
-----
- Add a ``News`` link on the PyPI page.
- Allow ``-`` as the single source filename when using the ``--stdin-filename`` option.
This makes the option compatible with Black_.
- Upgrade NixOS_ tests to use Python 3.11 on both Linux and macOS.
- Move ``git_repo`` fixture to ``darkgraylib``.
- In CI builds, show a diff of changed ``--help`` output if ``README.rst`` is outdated.

Fixed
-----
- Revert running ``commit-range`` from the repository itself. This broke the GitHub
action.
- Python 3.12 compatibility in multi-line string scanning.
- Python 3.12 compatibility for the GitHub Action.
- Use the original repository working directory name as the name of the temporary
directory for getting the linter baseline. This avoids issues with Mypy_ when there's
an ``__init__.py`` in the repository root.
- Upgrade ``install-nix-action`` to version 22 in CI to fix an issue with macOS.
- Allow ``--target-version=py312`` since newest Black_ supports it.
- Allow a comment in milestone titles in the ``bump_version`` script.

1.7.1

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

Added
-----
- Prefix GitHub milestones with ``Darker`` for clarity since we'll have two additional
related repositories soon in the same project.

Fixed
-----
- Use ``git worktree`` to create a repository checkout for baseline linting. This avoids
issues with the previous ``git clone`` and ``git checkout`` based approach.
- Disallow Flynt version 0.78 and newer to avoid an internal API incompatibility.
- In CI builds, run the ``commit-range`` action from the current checkout instead of
pointing to a release tag. This fixes workflows when in a release branch.
- Linting fixes: Use ``stacklevel=2`` in ``warnings.warn()`` calls as suggested by
Flake8_; skip Bandit check for virtualenv creation in the GitHub Action;
use ``ignore[method-assign]`` as suggested by Mypy_.
- Configuration options spelled with hyphens in ``pyproject.toml``
(e.g. ``line-length = 88``) are now supported.
- In debug log output mode, configuration options are now always spelled with hyphens
instead of underscores.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.