Skip to content

Commit

Permalink
use mypy mirror and fix mypy suggestions in data_compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
prakaa committed Jul 25, 2023
1 parent becf69e commit 0099a4f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ repos:

# Runs mypy
# Uses local environment as opposed to mypy-mirror to enable access to dependencies
- repo: local
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy
name: mypy
language: system
entry: poetry run mypy
# name: mypy
# language: system
# entry: poetry run mypy
# excludes checking files in docs
exclude: ^(docs/)
types: [python]
additional_dependencies:
- attrs
- types-python-dateutil
- types-requests
22 changes: 11 additions & 11 deletions src/nemseer/data_compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,17 @@ def from_Query(cls, query: Query) -> "DataCompiler":
if table in raw_tables:
tables = _enumerate_tables(tables, table, enumerate_to)
return cls(
run_start=query.run_start,
run_end=query.run_end,
forecasted_start=query.forecasted_start,
forecasted_end=query.forecasted_end,
forecast_type=query.forecast_type,
metadata=query.metadata,
raw_cache=query.raw_cache,
processed_cache=query.processed_cache,
processed_queries=query.processed_queries,
raw_tables=raw_tables,
compiled_data=None,
query.run_start,
query.run_end,
query.forecasted_start,
query.forecasted_end,
query.forecast_type,
query.metadata,
query.raw_cache,
query.processed_cache,
query.processed_queries,
raw_tables,
None,
)

def invalid_or_corrupted_files(self) -> List[str]:
Expand Down

0 comments on commit 0099a4f

Please sign in to comment.