Skip to content

Fix datetime-import for validators#109

Merged
Jonas-Kirchhoff merged 2 commits intomainfrom
Jonas-Kirchhoff-fix_validators
Oct 27, 2025
Merged

Fix datetime-import for validators#109
Jonas-Kirchhoff merged 2 commits intomainfrom
Jonas-Kirchhoff-fix_validators

Conversation

@Jonas-Kirchhoff
Copy link

For some reason, the global from datetime import datetime in validators.py yields an error when running trudag publish --validate.

  • moved import to function check_issues
  • added missing brackets
  • changed validator name for JLS-11 to the correct name

Verified that no error occurs (anymore) by running trudag test-publish --validate

For some reason, the global from datetime import datetime does not work.
Instead, import datetime within validator check_issues.
Additionally, the return in an erroneous case was wrong, since the error was not put into an array.
@Jonas-Kirchhoff Jonas-Kirchhoff marked this pull request as ready for review October 27, 2025 10:40
@github-actions github-actions bot added the S label Oct 27, 2025
@coveralls
Copy link

Coverage Status

coverage: 99.186%. remained the same
when pulling 67390a6 on Jonas-Kirchhoff-fix_validators
into 97fe849 on main.

@Jonas-Kirchhoff Jonas-Kirchhoff merged commit df40344 into main Oct 27, 2025
83 checks passed
@Erikhu1 Erikhu1 deleted the Jonas-Kirchhoff-fix_validators branch November 4, 2025 15:16
Erikhu1 pushed a commit that referenced this pull request Nov 14, 2025
* fix check_issues

For some reason, the global from datetime import datetime does not work.
Instead, import datetime within validator check_issues.
Additionally, the return in an erroneous case was wrong, since the error was not put into an array.

* fix name of validator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants