Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the test cases to prevent non-ascii characters in yaml files #2461

Open
ravench opened this issue Nov 5, 2024 · 0 comments
Open

Update the test cases to prevent non-ascii characters in yaml files #2461

ravench opened this issue Nov 5, 2024 · 0 comments
Assignees

Comments

@ravench
Copy link
Contributor

ravench commented Nov 5, 2024

NetBox appears to not be able to handle non-ascii characters.
This causes issues when importing devices or modules that contain non-ascii characters.
Those are usually dashes (long, short, ect) and symbols like (r) or (tm).

In a shell, the files at issue can be found using grep:

LC_ALL=C  grep -l "[\x80-\xFF]" ./**/*.yaml 

There should be a test for this. There seems to be no applicable test in pre-commit-hooks and no flag for yamlfmt or yamllint, so handling this in a own hook or in pytest seems to be necessary.

Unfortunately, I don't understand pytest well enough to write my own tests, therefore this is an issue and not a pull request.

@ravench ravench changed the title Update the test cases to disallow non-ascii characters in yaml files Update the test cases to prevent non-ascii characters in yaml files Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants