suaaa7 / samplecode-for-qiita

Repository to upload code related to Qiita articles
0 stars 0 forks source link

Python CI with flake8 and mypy #13

Closed suaaa7 closed 4 years ago

suaaa7 commented 4 years ago

https://www.youtube.com/watch?v=G1lDk_WKXvY

image

suaaa7 commented 4 years ago
class Sample:
    def __init__(self, x):
        self.x = x
        self.y = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

    def _check_string(self, target):
        return isinstance(target, str)

sample = Sample('sample')
# Access non-public method from outside of class
sample._check_string(120)
suaaa7 commented 4 years ago
.PHONY: all-check
all-check: flake8 mypy test
suaaa7 commented 4 years ago

Python Config

機械学習のconfigを可読性高く設定する方法 https://qiita.com/typecprint/items/4a1f6fae8c527b953c29 Python3.7からは「Data Classes」がクラス定義のスタンダードになるかもしれない https://qiita.com/tag1216/items/13b032348c893667862a PythonでYAMLの内容を自動補完する https://qiita.com/nkriskeeic/items/08151195aac4a1db491a

suaaa7 commented 4 years ago

flake8 動作確認 https://qiita.com/suaaa7/items/ec8a0f943c286eea1fd6