Skip to content

No Emojis on PowerShell #3156

@adam-grant-hendry

Description

@adam-grant-hendry

Describe the bug

I've read Issue #1031, but my terminal supports emojis, yet black is not printing them for some reason:

image

To Reproduce

Simply run pre-commit run --all with the following configuration settings:

pyproject.toml Configuration

[tool.black]
line-length = 90
skip-string-normalization = true
target-version = ["py38"]
include = '.*\.pyi?$'
exclude = '\.eggs|\.git|\.mypy_cache|\.tox|\.venv|build|dist'

[tool.pycln]
all = true
include = '.*\.pyi?$'
extend_exclude = 'stubs/vtkmodules-stubs/all.pyi|stubs/vtkmodules-stubs/web/camera.pyi'

.pre-commit-config.yaml

minimum_pre_commit_version: "2.19.0"
fail_fast: true
repos:
  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.16.2
    hooks:
      - id: check-gitlab-ci
        name: (check-jsonschema) Check `.gitlab-ci.yml` formatted correctly

  - repo: local
    hooks:
      - id: pyupgrade
        name: (pyupgrade) Format source to latest python syntax
        language: system
        files: .*\.pyi?$
        entry: pyupgrade
        args: [
            "--py310-plus",
        ]

  - repo: local
    hooks:
      - id: pycln
        name: (pycln) Remove unused imports
        language: system
        files: .*\.pyi?$
        entry: pycln
        args: [
          "--config=pyproject.toml"
        ]

  - repo: local
    hooks:
      - id: black
        name: (black) Format source code
        language: system
        files: .*\.pyi?$
        entry: black

Expected behavior

Emoji's print

Environment

  • Black's version: 22.6.0
  • Pre-Commit's version: 2.19.0
  • Pycln's version: 2.0.1
  • OS and Python version: Windows 10 x64-bit
  • PowerShell: 7.2.5
  • VSCode: 1.68.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    S: needs reproNeeds a functional reproductionT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions