diff --git a/.pylintrc b/.pylintrc index 75f38fc..068101b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,2 +1,5 @@ [MAIN] load-plugins=pylint.extensions.docparams + +[MESSAGES CONTROL] +disable=too-many-arguments diff --git a/phone_sensors/api.py b/phone_sensors/api.py index c7606cb..fa0bf57 100644 --- a/phone_sensors/api.py +++ b/phone_sensors/api.py @@ -69,8 +69,6 @@ async def upload( file_path = Path(tempfile.gettempdir()) / file_name with open(file_path, "wb") as file: file.write(audio_data) - audio = AudioSegment.from_wav(file_path) - audio.export(file_path, format="wav") + AudioSegment.from_wav(file_path).export(file_path, format="wav") - job_id = submit_analyze_audio_job(redis_conn, file_path, status) - return job_id + return submit_analyze_audio_job(redis_conn, file_path, status) diff --git a/phone_sensors/cli.py b/phone_sensors/cli.py index 8f1594e..1f70ab6 100644 --- a/phone_sensors/cli.py +++ b/phone_sensors/cli.py @@ -13,6 +13,7 @@ def main(): + """CLI entry point.""" settings = get_settings() rich.print(settings) engine = create_engine(str(settings.postgres_dsn)) diff --git a/phone_sensors/utils.py b/phone_sensors/utils.py index dda57b5..63d0b5a 100644 --- a/phone_sensors/utils.py +++ b/phone_sensors/utils.py @@ -1,3 +1,5 @@ +"""Utility functions""" + from geoalchemy2 import WKBElement from geoalchemy2.shape import from_shape, to_shape from shapely import Point