Skip to content

Commit 555074f

Browse files
authored
ci: run linter on PRs (#874)
The linter was not running on PRs, resulting in failing checks after merging PRs.
1 parent 4db6939 commit 555074f

File tree

12 files changed

+20
-12
lines changed

12 files changed

+20
-12
lines changed

.github/workflows/code-quality.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: Test code quality
44

55
on:
66
push:
7+
branches:
8+
- dev
9+
- main
10+
pull_request:
711
branches:
812
- "*"
913

src/aleph/chains/avalanche.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
LOGGER = logging.getLogger("chains.avalanche")
1515
CHAIN_NAME = "AVAX"
16-
MESSAGE_TEMPLATE = b"\x1AAvalanche Signed Message:\n%b"
16+
MESSAGE_TEMPLATE = b"\x1aAvalanche Signed Message:\n%b"
1717

1818

1919
async def pack_message(message):

src/aleph/chains/nuls_aleph_sdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
LOGGER = logging.getLogger(__name__)
1414

15-
PLACE_HOLDER = b"\xFF\xFF\xFF\xFF"
15+
PLACE_HOLDER = b"\xff\xff\xff\xff"
1616
B58_DIGITS = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
1717
MESSAGE_TEMPLATE = "\x18NULS Signed Message:\n{}"
1818

src/aleph/db/accessors/peers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212

1313
def get_all_addresses_by_peer_type(
14-
session: DbSession, peer_type: PeerType, last_seen: Optional[dt.datetime] = None,
14+
session: DbSession,
15+
peer_type: PeerType,
16+
last_seen: Optional[dt.datetime] = None,
1517
) -> Sequence[str]:
1618
"""
1719
Fetches all peer addresses filtered by peer type and optionally by the last_seen

src/aleph/jobs/reconnect_ipfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
async def reconnect_ipfs_job(
21-
config: Config, session_factory: DbSessionFactory, ipfs_service: IpfsService
21+
config: Config, session_factory: DbSessionFactory, ipfs_service: IpfsService
2222
):
2323
from aleph.services.utils import get_IP
2424

src/aleph/services/p2p/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" While our own streamer libp2p protocol is still unstable, use direct
1+
"""While our own streamer libp2p protocol is still unstable, use direct
22
HTTP connection to standard rest API.
33
"""
44

src/aleph/services/p2p/jobs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
from aleph.db.accessors.peers import get_all_addresses_by_peer_type
1111
from aleph.db.models import PeerType
1212
from aleph.types.db_session import DbSessionFactory
13+
14+
from ..cache.node_cache import NodeCache
1315
from .http import api_get_request
1416
from .peers import connect_peer
15-
from ..cache.node_cache import NodeCache
1617

1718

1819
@dataclass

src/aleph/services/pricing_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
def build_pricing_model_from_aggregate(
23-
aggregate_content: Dict[Union[ProductPriceType, str], dict]
23+
aggregate_content: Dict[Union[ProductPriceType, str], dict],
2424
) -> Dict[ProductPriceType, ProductPricing]:
2525
"""
2626
Build a complete pricing model from an aggregate content dictionary.

src/aleph/storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Storage module for Aleph.
1+
"""Storage module for Aleph.
22
Basically manages the IPFS storage.
33
"""
44

src/aleph/toolkit/timestamp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def timestamp_to_datetime(timestamp: float) -> dt.datetime:
1414

1515

1616
def coerce_to_datetime(
17-
datetime_or_timestamp: Optional[Union[float, dt.datetime]]
17+
datetime_or_timestamp: Optional[Union[float, dt.datetime]],
1818
) -> Optional[dt.datetime]:
1919
# None for datetimes or 0 for timestamps results in returning None
2020
if datetime_or_timestamp is None or not datetime_or_timestamp:

0 commit comments

Comments
 (0)