Skip to content

Instantly share code, notes, and snippets.

@macintoshpie
Created December 14, 2021 23:18
Show Gist options
  • Save macintoshpie/a3f217e8834c462e55dcc61ccfe554d0 to your computer and use it in GitHub Desktop.
Save macintoshpie/a3f217e8834c462e55dcc61ccfe554d0 to your computer and use it in GitHub Desktop.
Run mypy on SEED at e479496bf01adfcb875b2b20fc347912f52748b7
bash-5.1# mypy --install-types --non-interactive ./seed
Installing missing stub packages:
/usr/bin/python -m pip install types-Markdown types-PyYAML types-mock types-python-dateutil types-pytz types-requests
Collecting types-Markdown
Downloading types_Markdown-3.3.9-py3-none-any.whl (16 kB)
Collecting types-PyYAML
Downloading types_PyYAML-6.0.1-py3-none-any.whl (13 kB)
Collecting types-mock
Downloading types_mock-4.0.4-py3-none-any.whl (4.1 kB)
Collecting types-python-dateutil
Downloading types_python_dateutil-2.8.3-py3-none-any.whl (7.6 kB)
Collecting types-pytz
Downloading types_pytz-2021.3.3-py3-none-any.whl (3.2 kB)
Collecting types-requests
Downloading types_requests-2.26.1-py3-none-any.whl (22 kB)
Installing collected packages: types-requests, types-PyYAML, types-pytz, types-python-dateutil, types-mock, types-Markdown
Successfully installed types-Markdown-3.3.9 types-PyYAML-6.0.1 types-mock-4.0.4 types-python-dateutil-2.8.3 types-pytz-2021.3.3 types-requests-2.26.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
seed/utils/api_schema.py:10: error: Need type annotation for "overwrite_params" (hint: "overwrite_params: List[<type>] = ...")
seed/migrations/0146_merge_20210622_2054.py:13: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0145_merge_20210621_0716.py:13: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0144_merge_20210615_1322.py:13: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0142_merge_20210611_0610.py:13: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0136_merge_20210120_0944.py:13: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0108_merge_20190716_1038.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0087_merge_20180123_1033.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0081_merge_20180109_0747.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0074_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0070_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0034_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0033_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0029_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0024_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0022_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0019_merge.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0015_merge.py:14: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/migrations/0009_merge.py:14: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/lib/superperms/orgs/migrations/0005_merge_20180110_1156.py:15: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/lib/superperms/orgs/migrations/0001_initial.py:9: error: Need type annotation for "dependencies" (hint: "dependencies: List[<type>] = ...")
seed/landing/migrations/0005_merge.py:13: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/data_importer/migrations/0003_merge.py:14: error: Need type annotation for "operations" (hint: "operations: List[<type>] = ...")
seed/data_importer/__init__.py:12: error: "Type[_DummyThread]" has no attribute "_Thread__stop"
seed/validators.py:30: error: Incompatible types in assignment (expression has type "str", base class "PasswordBaseCharacterQuantityValidator" defined the type as "None")
seed/validators.py:35: error: Incompatible types in assignment (expression has type "str", base class "PasswordBaseCharacterQuantityValidator" defined the type as "None")
seed/validators.py:40: error: Incompatible types in assignment (expression has type "str", base class "PasswordBaseCharacterQuantityValidator" defined the type as "None")
config/settings/common.py:134: error: Incompatible types in assignment (expression has type Tuple[str, str, ... <25 more items>], variable has type Tuple[str, str, ... <18 more items>])
seed/views/portfoliomanager.py:23: error: Module "urllib" has no attribute "quote"
seed/views/v3/portfolio_manager.py:29: error: Module "urllib" has no attribute "quote"
seed/data_importer/models.py:15: error: Module "urllib" has no attribute "unquote"
seed/data_importer/models.py:541: error: Too many arguments
seed/models/meters.py:67: error: Need type annotation for "type_lookup" (hint: "type_lookup: Dict[<type>, <type>] = ...")
seed/models/meters.py:67: error: Argument 1 to "dict" has incompatible type "Generator[reversed[object], None, None]"; expected "Iterable[Tuple[<nothing>, <nothing>]]"
seed/models/__init__.py:15: error: Incompatible import of "copy" (imported name has type Module, local name has type "Callable[[_T], _T]")
seed/models/__init__.py:17: error: Incompatible import of "copy" (imported name has type Module, local name has type "Callable[[_T], _T]")
seed/tests/api/test_seed_host_api.py:94: error: Incompatible types in assignment (expression has type "str", variable has type "bytes")
seed/views/reports.py:38: error: Unsupported dynamic base class "DecoratorMixin"
seed/views/labels.py:40: error: Unsupported dynamic base class "DecoratorMixin"
seed/utils/viewsets.py:59: error: Unsupported dynamic base class "DecoratorMixin"
seed/utils/viewsets.py:74: error: Unsupported dynamic base class "DecoratorMixin"
seed/tests/util.py:132: error: Need type annotation for "GET" (hint: "GET: Dict[<type>, <type>] = ...")
seed/tests/util.py:132: error: Need type annotation for "POST" (hint: "POST: Dict[<type>, <type>] = ...")
seed/tests/test_analysis_pipelines.py:621: error: Argument 1 to "skip" has incompatible type "Callable[[TestBsyncrPipeline], Any]"; expected "str"
seed/views/scenarios.py:24: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgReadOnlyModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/notes.py:41: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/columns.py:54: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/column_mappings.py:52: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/v3/property_scenarios.py:29: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgReadOnlyModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/v3/notes.py:41: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgReadOnlyModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/v3/labels.py:84: error: Unsupported dynamic base class "DecoratorMixin"
seed/views/v3/labels.py:103: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgReadOnlyModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/views/v3/columns.py:57: error: Incompatible types in assignment (expression has type "Tuple[Any, Any]", base class "SEEDOrgReadOnlyModelViewSet" defined the type as "Tuple[Any, Any, Any]")
seed/serializers/properties.py:342: error: Need type annotation for "validators" (hint: "validators: List[<type>] = ...")
seed/views/projects.py:67: error: Unsupported dynamic base class "DecoratorMixin"
seed/views/v3/building_files.py:30: error: Incompatible types in assignment (expression has type "Tuple[Any]", base class "SEEDOrgReadOnlyModelViewSet" defined the type as "Tuple[Any, Any, Any]")
Found 56 errors in 48 files (checked 601 source files)
@nllong
Copy link

nllong commented Dec 15, 2021

I think the most value will come from the integration with VSCode / PyCharm...

@macintoshpie
Copy link
Author

Totes, this is interesting though, points out some old/outdated code we should probably strip out

@nllong
Copy link

nllong commented Dec 15, 2021

indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment