Skip to content

Commit b2a122b

Browse files
authored
fix: minor pre commit typo; mypy tweaks for algosdk (#87)
1 parent a1788fb commit b2a122b

File tree

8 files changed

+32
-8
lines changed

8 files changed

+32
-8
lines changed

examples/generators/production_python_smart_contract_python/.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
require_serial: false
2323
additional_dependencies: [ ]
2424
minimum_pre_commit_version: '0'
25-
files: '^(src|tests)/'
25+
files: '^(smart_contracts|tests)/'
2626

2727

2828
- id: mypy
@@ -34,7 +34,7 @@ repos:
3434
require_serial: true
3535
additional_dependencies: [ ]
3636
minimum_pre_commit_version: '2.9.2'
37-
files: '^(src|tests)/'
37+
files: '^(smart_contracts|tests)/'
3838

3939
# # Uncomment to enable TEAL static analysis using Tealer package
4040
# - id: tealer

examples/generators/production_python_smart_contract_python/pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ disallow_any_unimported = true
6262
disallow_any_expr = true
6363
disallow_any_decorated = true
6464
disallow_any_explicit = true
65+
untyped_calls_exclude = ["algosdk"]
66+
# Remove if you prefer to use mypy's default behavior against
67+
# untyped algosdk types
68+
[[tool.mypy.overrides]]
69+
module = "tests.*"
70+
disallow_any_expr = false

examples/generators/production_python_smart_contract_typescript/.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
require_serial: false
2323
additional_dependencies: [ ]
2424
minimum_pre_commit_version: '0'
25-
files: '^(src|tests)/'
25+
files: '^(smart_contracts|tests)/'
2626

2727

2828
- id: mypy
@@ -34,7 +34,7 @@ repos:
3434
require_serial: true
3535
additional_dependencies: [ ]
3636
minimum_pre_commit_version: '2.9.2'
37-
files: '^(src|tests)/'
37+
files: '^(smart_contracts|tests)/'
3838

3939
# # Uncomment to enable TEAL static analysis using Tealer package
4040
# - id: tealer

examples/generators/production_python_smart_contract_typescript/pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,9 @@ disallow_any_unimported = true
5656
disallow_any_expr = true
5757
disallow_any_decorated = true
5858
disallow_any_explicit = true
59+
untyped_calls_exclude = ["algosdk"]
60+
# Remove if you prefer to use mypy's default behavior against
61+
# untyped algosdk types
62+
[[tool.mypy.overrides]]
63+
module = "tests.*"
64+
disallow_any_expr = false

examples/production_python/.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
require_serial: false
2323
additional_dependencies: [ ]
2424
minimum_pre_commit_version: '0'
25-
files: '^(src|tests)/'
25+
files: '^(smart_contracts|tests)/'
2626

2727

2828
- id: mypy
@@ -34,7 +34,7 @@ repos:
3434
require_serial: true
3535
additional_dependencies: [ ]
3636
minimum_pre_commit_version: '2.9.2'
37-
files: '^(src|tests)/'
37+
files: '^(smart_contracts|tests)/'
3838

3939
# # Uncomment to enable TEAL static analysis using Tealer package
4040
# - id: tealer

examples/production_python/pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ disallow_any_unimported = true
6262
disallow_any_expr = true
6363
disallow_any_decorated = true
6464
disallow_any_explicit = true
65+
untyped_calls_exclude = ["algosdk"]
66+
# Remove if you prefer to use mypy's default behavior against
67+
# untyped algosdk types
68+
[[tool.mypy.overrides]]
69+
module = "tests.*"
70+
disallow_any_expr = false

template_content/pyproject.toml.jinja

+6
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,10 @@ disallow_any_unimported = true
8181
disallow_any_expr = true
8282
disallow_any_decorated = true
8383
disallow_any_explicit = true
84+
untyped_calls_exclude = ["algosdk"]
85+
# Remove if you prefer to use mypy's default behavior against
86+
# untyped algosdk types
87+
[[tool.mypy.overrides]]
88+
module = "tests.*"
89+
disallow_any_expr = false
8490
{% endif -%}

template_content/{% if use_pre_commit %}.pre-commit-config.yaml{% endif %}.jinja

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
require_serial: false
2323
additional_dependencies: [ ]
2424
minimum_pre_commit_version: '0'
25-
files: '^(src|tests)/'
25+
files: '^(smart_contracts|tests)/'
2626
{% endif %}
2727
{% if use_python_mypy %}
2828
- id: mypy
@@ -34,7 +34,7 @@ repos:
3434
require_serial: true
3535
additional_dependencies: [ ]
3636
minimum_pre_commit_version: '2.9.2'
37-
files: '^(src|tests)/'
37+
files: '^(smart_contracts|tests)/'
3838
{% endif %}
3939
# # Uncomment to enable TEAL static analysis using Tealer package
4040
# - id: tealer

0 commit comments

Comments
 (0)