Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Jun 15, 2024
1 parent fba89ba commit 3efb818
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout
Expand All @@ -32,7 +32,7 @@ jobs:
run: ./test/cli_example.sh

- name: Coveralls
if: matrix.python-version == '3.11'
if: matrix.python-version == '3.12'
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 4 additions & 9 deletions dxf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@
_ociv1_index_mimetype,
))}

if sys.version_info < (3, 0):
_binary_type = str
else:
_binary_type = bytes
# pylint: disable=redefined-builtin
long = int
_binary_type = bytes
long = int # pylint: disable=redefined-builtin

# Note: From Python 3.11 onwards we can use typing.Self instead of these
T = TypeVar('T', bound='DXFBase')
Expand Down Expand Up @@ -141,8 +137,7 @@ def __iter__(self) -> Iterator[str]:
while self._path:
response = self._meth('get', self._path, **self._kwargs)
self._kwargs = {}
for v in response.json()[self._header] or []:
yield v
yield from (response.json()[self._header] or [])
nxt = response.links.get('next')
self._path = nxt['url'] if nxt else None

Expand Down Expand Up @@ -933,7 +928,7 @@ def _verify_manifest(content,
for sig in signatures:
jwstoken = jws.JWS()
jwstoken.deserialize(json.dumps({
'payload': payload64,
'payload': payload64, # pylint: disable=possibly-used-before-assignment
'protected': sig['protected64'],
'signature': sig['signature']
}), sig['key'], sig['alg'])
Expand Down

0 comments on commit 3efb818

Please sign in to comment.