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

Changes from ruff #267

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: forbid-crlf
- id: remove-crlf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -15,7 +15,7 @@ repos:
exclude: helm/
args: [ --unsafe ]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.7.4"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
3 changes: 0 additions & 3 deletions mocket/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import os
import select
import socket
import ssl
from datetime import datetime, timedelta
from json.decoder import JSONDecodeError
from types import TracebackType
from typing import Any, Type
Expand All @@ -25,7 +23,6 @@
Address,
ReadableBuffer,
WriteableBuffer,
_PeerCertRetDictType,
_RetAddress,
)
from mocket.utils import hexdump, hexload
Expand Down
12 changes: 11 additions & 1 deletion mocket/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mocket.io import MocketSocketIO as MocketSocketCore

# NOTE this is here for backwards-compat to keep old import-paths working
from mocket.mode import MocketMode as MocketMode
from mocket.mode import MocketMode

SSL_PROTOCOL = ssl.PROTOCOL_TLSv1_2

Expand Down Expand Up @@ -42,3 +42,13 @@ def get_mocketize(wrapper_: Callable) -> Callable:
wrapper_,
kwsyntax=True,
)


__all__ = (
"MocketSocketCore",
"MocketMode",
"SSL_PROTOCOL",
"hexdump",
"hexload",
"get_mocketize",
)