Skip to content

Commit

Permalink
Fix up CI issues (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
jborean93 authored Mar 6, 2023
1 parent 8c29f46 commit bfea572
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.11.5
hooks:
- id: isort

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.0.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
asyncssh
black == 22.10.0
black == 23.1.0
build
gssapi ; sys_platform != 'win32'
krb5 ; sys_platform != 'win32'
httpx[socks]
isort == 5.10.1
mypy == 0.991
isort == 5.11.5
mypy == 1.0.1
pre-commit
psutil
pytest
Expand Down
1 change: 0 additions & 1 deletion src/psrp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ def _get_pwsh_script(
block_comment = False
new_lines = []
for line in script.splitlines():

line = line.strip()
if block_comment:
block_comment = not line.endswith("#>")
Expand Down
5 changes: 2 additions & 3 deletions src/psrp/_io/wsman.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ def __post_init__(
object.__setattr__(self, "connection_uri", server)
scheme = raw_url.scheme
else:

try:
address = ipaddress.IPv6Address(server)
except ipaddress.AddressValueError:
Expand Down Expand Up @@ -435,7 +434,7 @@ async def _handle_async_auth(
) -> httpx.Response:
headers = request.headers.copy()
stream: t.Union[bytes, httpx.AsyncByteStream, httpx.SyncByteStream] = request.stream
ext = request.extensions.copy()
ext = t.cast(dict, request.extensions).copy()
if "trace" in ext:
trace_func = functools.partial(self.trace, trace=ext["trace"])
ext["trace"] = trace_func
Expand Down Expand Up @@ -729,7 +728,7 @@ def _handle_sync_auth(
) -> httpx.Response:
headers = request.headers.copy()
stream: t.Union[bytes, httpx.AsyncByteStream, httpx.SyncByteStream] = request.stream
ext = request.extensions.copy()
ext = t.cast(dict, request.extensions).copy()
if "trace" in ext:
trace_func = functools.partial(self.trace, trace=ext["trace"])
ext["trace"] = trace_func
Expand Down
1 change: 0 additions & 1 deletion src/pypsrp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def get_pwsh_script(name: str) -> str:
block_comment = False
new_lines = []
for line in script.splitlines():

line = line.strip()
if block_comment:
block_comment = not line.endswith("#>")
Expand Down
1 change: 0 additions & 1 deletion src/pypsrp/encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class WinRMEncryption(object):

SIXTEEN_KB = 16384
MIME_BOUNDARY = "--Encrypted Boundary"
CREDSSP = "application/HTTP-CredSSP-session-encrypted"
Expand Down
4 changes: 0 additions & 4 deletions tests/tests_pypsrp/test_complex_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def test_enum_invalid_value(self):


class TestHostInfo(object):

HOST_XML = """<Obj RefId="0">
<MS>
<Obj N="_hostDefaultData" RefId="1">
Expand Down Expand Up @@ -239,7 +238,6 @@ def test_to_string_multiple_values(self):


class TestPipeline(object):

PIPE_SINGLE = """<Obj RefId="0">
<MS>
<B N="IsNested">false</B>
Expand Down Expand Up @@ -772,7 +770,6 @@ def test_to_string_null(self):


class TestBufferCell(object):

BUFFER_CELL = """<Obj RefId="0">
<Props>
<C N="character">65</C>
Expand Down Expand Up @@ -822,7 +819,6 @@ def test_parse_buffer_cell(self):


class TestArray(object):

SINGLE_ARRAY = """<Obj RefId="0">
<MS>
<Obj N="mae" RefId="1">
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_pypsrp/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def gen_rsa_keypair(public_exponent, key_size, backend):

public_numbers = rsa.RSAPublicNumbers(e, n)
numbers = rsa.RSAPrivateNumbers(p, q, d, dmp1, dmq1, iqmp, public_numbers)
key = default_backend().load_rsa_private_numbers(numbers)
key = numbers.private_key()

return key

Expand Down
2 changes: 1 addition & 1 deletion tests/tests_pypsrp/test_powershell.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def gen_rsa_keypair(public_exponent, key_size, backend):

public_numbers = rsa.RSAPublicNumbers(e, n)
numbers = rsa.RSAPrivateNumbers(p, q, d, dmp1, dmq1, iqmp, public_numbers)
key = default_backend().load_rsa_private_numbers(numbers)
key = numbers.private_key()

return key

Expand Down

0 comments on commit bfea572

Please sign in to comment.