Skip to content

Commit

Permalink
Update GitHub Actions to build with Python 3.12.0-rc.3 and fix linter…
Browse files Browse the repository at this point in the history
… error

This occurs only with Py 12:

```
flake8 --ignore=E501,E126,W503 email_validator tests
email_validator/syntax.py:30:24: E231 missing whitespace after ':'
email_validator/syntax.py:32:24: E231 missing whitespace after ':'
```

See https://github.com/actions/python-versions/releases for the Python versions supported in GitHub Actions.
  • Loading branch information
JoshData committed Sep 26, 2023
1 parent 5abaa7b commit a025428
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha.5"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-rc.3"]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions email_validator/syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def safe_character_display(c):

# Construct a hex string in case the unicode name doesn't exist.
if ord(c) < 0xFFFF:
h = f"U+{ord(c):04x}".upper()
h = f"U+{ord(c): 04x}".upper()
else:
h = f"U+{ord(c):08x}".upper()
h = f"U+{ord(c): 08x}".upper()

# Return the character name or, if it has no name, the hex string.
return unicodedata.name(c, h)
Expand Down

0 comments on commit a025428

Please sign in to comment.