Skip to content

Commit

Permalink
Fix UnicodeError thrown in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FredHappyface committed Apr 6, 2022
1 parent 755773f commit 9f8a2db
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/FHPythonUtils/Blackt
rev: '2022.0.1'
rev: '2022.0.2'
hooks:
- id: blackt

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All major and minor version changes will be documented in this file. Details of
patch-level version changes can be found in [commit messages](../../commits/master).

## 2022.0.2 - 2022/04/06

- Fix `UnicodeError` thrown in pre-commit
- Update black to fix https://github.com/psf/black/issues/2964

## 2022.0.1 - 2022/01/28

- Fix `UnicodeEncodeError` thrown in pre-commit
Expand Down
2 changes: 1 addition & 1 deletion blackt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main():

try:
print(out.encode("utf-8").decode("unicode_escape")) # pylint: disable=no-member
except UnicodeEncodeError: # thrown in pre-commit
except UnicodeError: # thrown in pre-commit
print(out)
sys.exit(exitCode)

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "blackt"
license = "mit"
version = "2022.0.1"
version = "2022.0.2"
description = "Black but with tabs"
authors = ["FredHappyface"]
classifiers = [
Expand All @@ -21,7 +21,7 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6.2"
black = "<22,>=21.12b0"
black = "<23,>=22.3.0"

[tool.poetry.scripts]
blackt = 'blackt:main'
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
black<22,>=21.12b0
black<23,>=22.3.0

0 comments on commit 9f8a2db

Please sign in to comment.