Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Fix linting (#179)
Browse files Browse the repository at this point in the history
* summoning [skip ci] since another merge follows
  • Loading branch information
FabijanC authored Jul 14, 2022
1 parent 5a8dc4c commit c50e945
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
command: ./scripts/check_versions.sh
- run:
name: Lint
command: poetry run pylint starknet_devnet test
command: ./scripts/lint.sh
- run:
name: Compile test contracts
command: ./scripts/compile_contracts.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,13 @@ poetry run starknet-devnet
### Development - Run in debug mode

```text
./scripts/starknet-devnet-debug.sh
./scripts/starknet_devnet_debug.sh
```

### Development - Lint

```text
poetry run pylint starknet_devnet test
./scripts/lint.sh
```

### Development - Test
Expand Down
5 changes: 5 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

poetry run pylint $(git ls-files '*.py')
6 changes: 4 additions & 2 deletions test/support/assertions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Utilities for schema validation"""

import json
from os.path import join, dirname, abspath
from os.path import join, dirname
from jsonschema import validate, RefResolver


Expand All @@ -18,5 +20,5 @@ def _load_json_schema(filename):
relative_path = join("schemas", filename)
absolute_path = join(dirname(__file__), relative_path)

with open(absolute_path) as schema_file:
with open(absolute_path, encoding="utf-8") as schema_file:
return json.loads(schema_file.read())

0 comments on commit c50e945

Please sign in to comment.