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

chore(deps-dev): bump black, bump flake8, remove unused dev-dependencies #742

Merged
merged 16 commits into from
Nov 11, 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
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx configuration for xrpl-py."""

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down
138 changes: 78 additions & 60 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ include = ["LICENSE"]
packages = [{ include = "xrpl" }]

[tool.poetry.dependencies]
python = "^3.8"
python = ">=3.8.1,<4.0"
base58 = "^2.1.0"
ECPy = "^1.2.5"
typing-extensions = "^4.2.0"
Expand All @@ -34,21 +34,19 @@ types-Deprecated = "^1.2.9"
pycryptodome = "^3.16.0"

[tool.poetry.dev-dependencies]
flake8 = "^4.0.1"
black = "23.3.0"
flake8 = "^7.0.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title should be updated with this as well

black = "24.8.0"
flake8-black = "^0.3.6"
flake8-docstrings = "^1.7.0"
mypy = "^1"
isort = "^5.11.5"
flake8-isort = "^6.0.0"
flake8-annotations = "2.7.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the rationale for the removal in the description of the PR.
flake8-annotations depends on an older version of flake8. The solution is to upgrade flake8-annotations to a higher version.

But I couldn't find any usages of this dependency. Where is it used?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't used directly, it's used by flake8 to check function annotations: https://github.com/sco1/flake8-annotations?tab=readme-ov-file#table-of-warnings

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. updated in 563897f

flake8-annotations = "^3.1.1"
flake8-absolute-import = "^1.0"
darglint = "^1.5.8"
sphinx-rtd-theme = "^3.0.0"
aiounittest = "^1.4.0"
coverage = "^7.2.7"
Jinja2 = "^3.1.4"
MarkupSafe = "2.1.5"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the rationale in the description of the PR.

I couldn't find any usages of this dependency. Where is it used?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a dependency for Jinja2. I'm not sure why Jinja2 is included though tbh, maybe it was previously a dependency for something.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jinja2 is also not needed. I'm happy to remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If nothing complains about it, sure

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed in 563897f

Sphinx = "^7.1.2"
poethepoet = "^0.29.0"

Expand Down
1 change: 1 addition & 0 deletions snippets/get_transaction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example of how we can see a transaction that was validated on the ledger"""

from xrpl.clients import JsonRpcClient
from xrpl.models import Ledger, Tx

Expand Down
1 change: 1 addition & 0 deletions snippets/partial_payment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example of how to handle partial payments"""

from xrpl.clients import JsonRpcClient
from xrpl.models import (
AccountLines,
Expand Down
1 change: 1 addition & 0 deletions snippets/set_regular_key.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example of how we can setting a regular key"""

from xrpl.account import get_balance
from xrpl.clients import JsonRpcClient
from xrpl.models import Payment, SetRegularKey
Expand Down
1 change: 1 addition & 0 deletions snippets/submit_payment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example of how to send a transaction and see its validation response"""

from xrpl.account import get_balance
from xrpl.clients import JsonRpcClient
from xrpl.models import Payment, Tx
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/binarycodec/types/test_serialized_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TestSerializedType(TestCase):
def fixture_test(self, fixture: ValueTest):
"""Run the appropriate test for given fixture case."""
serialized_type: SerializedType = TYPE_MAP[fixture.type]
if type(fixture.test_json) == dict:
if isinstance(fixture.test_json, dict):
json_value = fixture.test_json
else:
json_value = str(fixture.test_json)
Expand Down
1 change: 1 addition & 0 deletions xrpl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""High-level XRPL exports."""

from xrpl import account, clients, core, ledger, models, transaction, utils, wallet
from xrpl.constants import CryptoAlgorithm, XRPLException

Expand Down
1 change: 1 addition & 0 deletions xrpl/account/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods for interacting with XRPL accounts."""

from xrpl.account.main import (
does_account_exist,
get_account_root,
Expand Down
1 change: 1 addition & 0 deletions xrpl/account/transaction_history.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""High-level methods to obtain information about account transaction history."""

import asyncio

from xrpl.asyncio.account import transaction_history
Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""High-level XRPL exports for async support."""

from xrpl.asyncio import account, clients, ledger, transaction, wallet

__all__ = ["account", "clients", "ledger", "transaction", "wallet"]
1 change: 1 addition & 0 deletions xrpl/asyncio/account/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Async methods for interacting with XRPL accounts."""

from xrpl.asyncio.account.main import (
does_account_exist,
get_account_root,
Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/account/transaction_history.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""High-level methods to obtain information about account transaction history."""

from xrpl.asyncio.clients import Client, XRPLRequestFailureException
from xrpl.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address
from xrpl.models.requests import AccountTx
Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/clients/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Asynchronous network clients for interacting with the XRPL."""

from xrpl.asyncio.clients.async_json_rpc_client import AsyncJsonRpcClient
from xrpl.asyncio.clients.async_websocket_client import AsyncWebsocketClient
from xrpl.asyncio.clients.client import Client
Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/clients/async_json_rpc_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""An async client for interacting with the rippled JSON RPC."""

from xrpl.asyncio.clients.async_client import AsyncClient
from xrpl.asyncio.clients.json_rpc_base import JsonRpcBase

Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/ledger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Async methods for obtaining information about the status of the XRP Ledger."""

from xrpl.asyncio.ledger.main import (
get_fee,
get_latest_open_ledger_sequence,
Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/wallet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Async methods for working with XRPL wallets."""

from xrpl.asyncio.wallet.wallet_generation import (
XRPLFaucetException,
generate_faucet_wallet,
Expand Down
1 change: 1 addition & 0 deletions xrpl/asyncio/wallet/wallet_generation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Handles wallet generation from a faucet."""

import asyncio
from typing import Optional
from urllib.parse import urlparse, urlunparse
Expand Down
1 change: 1 addition & 0 deletions xrpl/clients/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Synchronous network clients for interacting with the XRPL."""

from xrpl.asyncio.clients.client import Client
from xrpl.asyncio.clients.exceptions import XRPLRequestFailureException
from xrpl.asyncio.clients.utils import (
Expand Down
1 change: 1 addition & 0 deletions xrpl/clients/json_rpc_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A sync client for interacting with the rippled JSON RPC."""

from xrpl.asyncio.clients.json_rpc_base import JsonRpcBase
from xrpl.clients.sync_client import SyncClient

Expand Down
1 change: 1 addition & 0 deletions xrpl/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Collection of public constants for XRPL."""

import re
from decimal import Context
from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions xrpl/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core codec functions for interacting with the XRPL."""

from xrpl.core import addresscodec, binarycodec, keypairs

__all__ = ["addresscodec", "binarycodec", "keypairs"]
Loading