Enable mypy by default.

Mark all modules that currently have issues as mypy-unclean.
looper
Ben Niemann 2018-03-24 15:28:19 +01:00
parent df3f2588fb
commit a1a798b905
101 changed files with 217 additions and 15 deletions

View File

@ -1,5 +1,23 @@
# -*- org-tags-column: -98 -*-
* SampleTrack: crash when rendering :CRASH:
Traceback (most recent call last):
File "/home/pink/noisicaa/build/noisicaa/core/ipc.py", line 254, in handle_command
result = await handler(*args, **kwargs)
File "/home/pink/noisicaa/build/noisicaa/music/project_process.py", line 354, in handle_command
result = self.project.dispatch_command(target, cmd)
File "/home/pink/noisicaa/build/noisicaa/music/project.py", line 773, in dispatch_command
result = super().dispatch_command(obj_id, cmd)
File "/home/pink/noisicaa/build/noisicaa/music/project.py", line 498, in dispatch_command
result = cmd.apply(obj)
File "/home/pink/noisicaa/build/noisicaa/music/commands.py", line 237, in apply
result = self.run(obj)
File "/home/pink/noisicaa/build/noisicaa/music/sample_track.py", line 131, in run
tmap = audioproc.TimeMapper()
File "time_mapper.pyx", line 27, in noisicaa.audioproc.public.time_mapper.PyTimeMapper.__init__
TypeError: __init__() takes exactly 1 positional argument (0 given)
* Redesign settings handling :FR:
- requirements:
- all settings should be overrideable with flags
@ -209,6 +227,11 @@ Probably related to unittest.UITestCase
- pick some file and clean it up.
- until grep finds no more files.
* clean up mypy issues in mypy-unclean files :CLEANUP:TESTING:
- grep -r mypy-unclean noisicaa/
- pick some file and clean it up.
- until grep finds no more files.
* Exlore pytest as a better unittest framework :RESEARCH:TESTING:
- https://docs.pytest.org/en/latest/
- supports parallel test execution with pytest-xdist
@ -581,8 +604,6 @@ Is there some cross-compiler/-platform header to provide this functionality?
- adding manual .pyi files for every .pyx is cumbersome...
- any way to automate that?
- require type annotations
- enable mypy by default
- mark files as mypy-unclean
* Get pycheck working :RESEARCH:TESTING:
- seems much faster than mypy

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from noisicaa import core

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import functools

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisidev import unittest_engine_mixins
from noisidev import unittest_engine_utils

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import async_generator

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import os

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import asyncio
import concurrent.futures
import functools

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import asyncio
import logging
import mmap

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import contextlib
from noisidev import unittest_mixins

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import textwrap
from noisidev import unittest

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import math
from noisidev import unittest

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import os
import os.path

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisidev import unittest_mixins
from noisidev import unittest_engine_mixins

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import os
import os.path

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import os
import os.path

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import math
import os
import os.path

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import os
import os.path

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisidev import unittest_mixins
from noisidev import unittest_engine_mixins

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisidev import unittest_mixins
from noisidev import unittest_engine_mixins

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import os
import os.path

View File

@ -18,6 +18,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from noisidev import unittest

View File

@ -20,6 +20,9 @@
#
# @end:license
# This file triggers https://github.com/JukkaL/mypy/issues/730
# mypy: skip-file
import os.path
import numpy

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from . import lv2
from . import sratom

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import argparse

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import threading

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import argparse
import asyncio
import functools

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import re
import fractions

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import struct

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from noisicaa import core

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import enum
import urllib.parse
from typing import Callable

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import os

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import time

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import sys
import logging.handlers
from logging import * # pylint: disable=W0614,W0401

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from noisidev import unittest

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import functools

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import contextlib

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
from noisidev import unittest

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisidev import demo_project
from noisicaa import audioproc

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from noisicaa import core

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import io

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import re

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import asyncio
import logging
import uuid

View File

@ -20,6 +20,9 @@
#
# @end:license
# This file triggers https://github.com/JukkaL/mypy/issues/730
# mypy: skip-file
import asyncio
import contextlib
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import asyncio
import logging

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import base64

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
from fractions import Fraction

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import fractions

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import asyncio

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import asyncio

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
from fractions import Fraction

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import os.path
from noisidev import unittest

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import functools

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisidev import demo_project
from noisicaa.node_db.private import db as node_db

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import copy
import logging
import uuid

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import json

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
# Still need to figure out how to pass around the app reference, disable

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import functools
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
# Still need to figure out how to pass around the app reference, disable

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import os.path
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
from PyQt5.QtCore import Qt
from PyQt5 import QtWidgets, QtGui

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from PyQt5.QtWidgets import QGraphicsItem

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import os.path
from PyQt5 import QtGui

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
# Still need to figure out how to pass around the app reference, disable
# message "Access to a protected member .. of a client class"
# pylint: disable=W0212

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import random

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import asyncio

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import math
import time

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
import os.path

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import fractions

View File

@ -7,6 +7,7 @@
# Ignore formatting of 3rd party code for now.
# pylint: skip-file
# mypy: skip-file
from colorsys import rgb_to_hls, hls_to_rgb
from PyQt5.QtGui import QPainter

View File

@ -14,6 +14,7 @@
# Ignore formatting of 3rd party code for now.
# pylint: skip-file
# mypy: skip-file
import sys
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import asyncio
import enum
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
logger = logging.getLogger(__name__)

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
class ManagedWindowMixin(object):
def __init__(self, session_prefix, **kwargs):

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
# Still need to figure out how to pass around the app reference, disable
# message "Access to a protected member .. of a client class"
# pylint: disable=W0212

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import functools
import uuid

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import io
import logging
import os.path

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
from fractions import Fraction

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisicaa.ui import uitest_utils
from noisicaa.ui import model
from noisicaa.ui import tools

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import logging
from PyQt5.QtCore import Qt

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
from noisidev import unittest
from noisicaa.ui import uitest_utils
from noisicaa.ui import model

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import fractions
import logging

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import fractions
import functools
import logging

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
import logging

View File

@ -20,6 +20,7 @@
#
# @end:license
# TODO: mypy-unclean
# TODO: pylint-unclean
from noisidev import unittest

View File

@ -20,6 +20,8 @@
#
# @end:license
# TODO: mypy-unclean
import contextlib
from fractions import Fraction
from unittest import mock