Skip to content

Commit 2b44195

Browse files
authored
Merge pull request #180 from maxmind/greg/eng-1922
Switch to Ruff for linting and formatting
2 parents 759f92c + c21d096 commit 2b44195

File tree

12 files changed

+286
-458
lines changed

12 files changed

+286
-458
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ MANIFEST
6767
.project
6868
.pydevproject
6969
.python-version
70-
pylint.txt
7170
*.swp
72-
violations.pyflakes.txt
7371

7472
/t.py
7573
/test*.py

minfraud/errors.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Typed errors thrown by this library."""
22

3-
from typing import Optional
3+
from __future__ import annotations
44

55

66
class MinFraudError(RuntimeError):
@@ -22,21 +22,21 @@ class HTTPError(MinFraudError):
2222
:py:exc:`MinFraudError` and adds attributes of its own.
2323
"""
2424

25-
http_status: Optional[int]
25+
http_status: int | None
2626
"""The HTTP status code returned"""
2727

28-
uri: Optional[str]
28+
uri: str | None
2929
"""The URI queried"""
3030

31-
decoded_content: Optional[str]
31+
decoded_content: str | None
3232
"""The decoded response content"""
3333

3434
def __init__(
3535
self,
3636
message: str,
37-
http_status: Optional[int] = None,
38-
uri: Optional[str] = None,
39-
decoded_content: Optional[str] = None,
37+
http_status: int | None = None,
38+
uri: str | None = None,
39+
decoded_content: str | None = None,
4040
) -> None:
4141
"""Initialize an HTTPError instance."""
4242
super().__init__(message)

0 commit comments

Comments
 (0)