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

fix: Resolve errors in pre-commit hooks (ruff, mypy) #43

Closed
wants to merge 9 commits into from
34 changes: 17 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ repos:
hooks:
- id: black

# - repo: https://github.com/charliermarsh/ruff-pre-commit
# # Ruff version.
# rev: 'v0.1.8'
# hooks:
# - id: ruff
# args: [--fix,--exclude=example]
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.1.8'
hooks:
- id: ruff
args: [--fix,--exclude=example]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 'v1.7.1'
# hooks:
# - id: mypy
# exclude: |
# (?x)(
# tests|
# examples
# )
# disable_error_codes: ["attr-defined"]
# additional_dependencies: [types-requests==2.31.0.1]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.7.1'
hooks:
- id: mypy
exclude: |
(?x)(
tests|
examples
)
disable_error_codes: ["attr-defined"]
additional_dependencies: [types-requests==2.31.0.1]
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ select = [
"NPY", # NumPy-specific rules
"RUF", # Ruff-specific rules
]
ignore = ["ANN101", "ANN102", "UP006"]
ignore = ["ANN101", "ANN102", "UP006" , "E501"]
unfixable = ["B"] # Avoid trying to fix flake8-bugbear violations.
target-version = "py39" # Assume Python 3.9.
extend-exclude = ["tests", "examples"]
Expand Down
6 changes: 6 additions & 0 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ DBSYNC_USER=
DBSYNC_PASS=
DBSYNC_HOST=
DBSYNC_PORT=
DBSYNC_DB_NAME=

# Blockfrost project ID
PROJECT_ID=
NETWORK=
WALLET_MNEMONIC=
4 changes: 4 additions & 0 deletions src/cardex/backend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""This module provides the backend functionality for Cardex.

It includes interactions with the blockchain and other external services.
"""
1 change: 1 addition & 0 deletions src/cardex/backend/blockfrost.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""This module handles interactions with the Blockfrost API."""
Loading