ansys / ansys/pre-commit-hooks

add-license-headers is changing special characters

Open
#143 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
1
Avg merge
4h 21m
Merged PRs (30d)
9

Description

The hook is incorrectly writing special characters with fileinput when using python 3.9

https://github.com/ansys/pyadditive/blob/main/src/ansys/additive/core/microstructure.py

![image](https://github.com/ansys/pre-commit-hooks/assets/58492561/e5ed05f6-733b-4f65-92a5-abf77d125d88)

Contributor guide

Open the contributing guide

Research direction

Start with the add-license-headers hook and reproduce the character-changing behavior using the linked src/ansys/additive/core/microstructure.py file under Python 3.9. Compare its output before and after the hook runs; done means special characters are preserved, with regression coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.