From 8525cf12aa6ad0cd61893f0056d4b33034169894 Mon Sep 17 00:00:00 2001 From: Ian Simon Date: Fri, 24 May 2024 20:40:17 -0700 Subject: [PATCH] disable lint errors PiperOrigin-RevId: 637114636 --- note_seq/__init__.py | 2 +- note_seq/abc_parser.py | 2 +- note_seq/abc_parser_test.py | 2 +- note_seq/alignment/align_fine.py | 2 +- note_seq/alignment/align_fine_lib.py | 2 +- note_seq/audio_io.py | 2 +- note_seq/audio_io_test.py | 2 +- note_seq/chord_inference.py | 6 +++--- note_seq/chord_inference_test.py | 2 +- note_seq/chord_symbols_lib.py | 2 +- note_seq/chord_symbols_lib_test.py | 2 +- note_seq/chords_encoder_decoder.py | 2 +- note_seq/chords_encoder_decoder_test.py | 2 +- note_seq/chords_lib.py | 2 +- note_seq/chords_lib_test.py | 2 +- note_seq/constants.py | 2 +- note_seq/drums_encoder_decoder.py | 2 +- note_seq/drums_encoder_decoder_test.py | 2 +- note_seq/drums_lib.py | 2 +- note_seq/drums_lib_test.py | 2 +- note_seq/encoder_decoder.py | 2 +- note_seq/encoder_decoder_test.py | 2 +- note_seq/events_lib.py | 2 +- note_seq/events_lib_test.py | 2 +- note_seq/lead_sheets_lib.py | 2 +- note_seq/lead_sheets_lib_test.py | 2 +- note_seq/melodies_lib.py | 2 +- note_seq/melodies_lib_test.py | 2 +- note_seq/melody_encoder_decoder.py | 2 +- note_seq/melody_encoder_decoder_test.py | 2 +- note_seq/melody_inference.py | 2 +- note_seq/melody_inference_test.py | 2 +- note_seq/midi_io.py | 2 +- note_seq/midi_io_test.py | 2 +- note_seq/midi_synth.py | 2 +- note_seq/musicnet_io.py | 2 +- note_seq/musicnet_io_test.py | 2 +- note_seq/musicxml_parser.py | 2 +- note_seq/musicxml_parser_test.py | 4 ++-- note_seq/musicxml_reader.py | 2 +- note_seq/notebook_utils.py | 2 +- note_seq/performance_controls.py | 2 +- note_seq/performance_controls_test.py | 2 +- note_seq/performance_encoder_decoder.py | 2 +- note_seq/performance_encoder_decoder_test.py | 2 +- note_seq/performance_lib.py | 2 +- note_seq/performance_lib_test.py | 2 +- note_seq/pianoroll_encoder_decoder.py | 2 +- note_seq/pianoroll_encoder_decoder_test.py | 2 +- note_seq/pianoroll_lib.py | 2 +- note_seq/pianoroll_lib_test.py | 2 +- note_seq/protobuf/__init__.py | 2 +- note_seq/protobuf/compare.py | 2 +- note_seq/protobuf/generate_pb2_py.sh | 2 +- note_seq/protobuf/generator_pb2.py | 2 +- note_seq/protobuf/generator_pb2.pyi | 1 + note_seq/protobuf/install_protoc.sh | 2 +- note_seq/protobuf/music_pb2.py | 2 +- note_seq/protobuf/music_pb2.pyi | 1 + note_seq/sequences_lib.py | 2 +- note_seq/sequences_lib_test.py | 2 +- note_seq/testing_lib.py | 2 +- note_seq/version.py | 2 +- pylintrc | 8 +++++--- setup.py | 2 +- update_pip.sh | 2 +- 66 files changed, 73 insertions(+), 69 deletions(-) diff --git a/note_seq/__init__.py b/note_seq/__init__.py index 3f5d25d..7182c1a 100644 --- a/note_seq/__init__.py +++ b/note_seq/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/abc_parser.py b/note_seq/abc_parser.py index dc03c0c..1ba7f6b 100644 --- a/note_seq/abc_parser.py +++ b/note_seq/abc_parser.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/abc_parser_test.py b/note_seq/abc_parser_test.py index 0a6284f..0ddf941 100644 --- a/note_seq/abc_parser_test.py +++ b/note_seq/abc_parser_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/alignment/align_fine.py b/note_seq/alignment/align_fine.py index 06f4eea..affa1c3 100644 --- a/note_seq/alignment/align_fine.py +++ b/note_seq/alignment/align_fine.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/alignment/align_fine_lib.py b/note_seq/alignment/align_fine_lib.py index 7244f2c..84dabcd 100644 --- a/note_seq/alignment/align_fine_lib.py +++ b/note_seq/alignment/align_fine_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/audio_io.py b/note_seq/audio_io.py index 85bbf97..a0e149a 100644 --- a/note_seq/audio_io.py +++ b/note_seq/audio_io.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/audio_io_test.py b/note_seq/audio_io_test.py index dd28404..511097b 100644 --- a/note_seq/audio_io_test.py +++ b/note_seq/audio_io_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chord_inference.py b/note_seq/chord_inference.py index 436e944..0193e66 100644 --- a/note_seq/chord_inference.py +++ b/note_seq/chord_inference.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -374,7 +374,7 @@ def infer_chords_for_sequence(sequence, # observing those pitch vectors under each possible chord. note_pitch_vectors = sequence_note_pitch_vectors( sequence, - seconds_per_chord if chords_per_bar is not None else sorted_beat_times) + seconds_per_chord if chords_per_bar is not None else sorted_beat_times) # pylint: disable=possibly-used-before-assignment chord_frame_loglik = _chord_frame_log_likelihood( note_pitch_vectors, chord_note_concentration) @@ -432,7 +432,7 @@ def infer_chords_for_sequence(sequence, if chords_per_bar is not None: ta.quantized_step = frame * steps_per_chord else: - ta.quantized_step = 0 if frame == 0 else sorted_beat_steps[frame - 1] + ta.quantized_step = 0 if frame == 0 else sorted_beat_steps[frame - 1] # pylint: disable=used-before-assignment ta.text = figure ta.annotation_type = music_pb2.NoteSequence.TextAnnotation.CHORD_SYMBOL current_chord_name = figure diff --git a/note_seq/chord_inference_test.py b/note_seq/chord_inference_test.py index bf4f449..34bb651 100644 --- a/note_seq/chord_inference_test.py +++ b/note_seq/chord_inference_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chord_symbols_lib.py b/note_seq/chord_symbols_lib.py index e05346a..93e8e3f 100644 --- a/note_seq/chord_symbols_lib.py +++ b/note_seq/chord_symbols_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chord_symbols_lib_test.py b/note_seq/chord_symbols_lib_test.py index d56d6ef..89418a3 100644 --- a/note_seq/chord_symbols_lib_test.py +++ b/note_seq/chord_symbols_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_encoder_decoder.py b/note_seq/chords_encoder_decoder.py index 4967a5a..737640c 100644 --- a/note_seq/chords_encoder_decoder.py +++ b/note_seq/chords_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_encoder_decoder_test.py b/note_seq/chords_encoder_decoder_test.py index 6693d4f..8f2bb88 100644 --- a/note_seq/chords_encoder_decoder_test.py +++ b/note_seq/chords_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_lib.py b/note_seq/chords_lib.py index 147af9f..96d1199 100644 --- a/note_seq/chords_lib.py +++ b/note_seq/chords_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/chords_lib_test.py b/note_seq/chords_lib_test.py index 2bb4f7a..83b4ebf 100644 --- a/note_seq/chords_lib_test.py +++ b/note_seq/chords_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/constants.py b/note_seq/constants.py index af41f84..4d34996 100644 --- a/note_seq/constants.py +++ b/note_seq/constants.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_encoder_decoder.py b/note_seq/drums_encoder_decoder.py index 27b06b7..529d9ea 100644 --- a/note_seq/drums_encoder_decoder.py +++ b/note_seq/drums_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_encoder_decoder_test.py b/note_seq/drums_encoder_decoder_test.py index 858fd09..ad963d6 100644 --- a/note_seq/drums_encoder_decoder_test.py +++ b/note_seq/drums_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_lib.py b/note_seq/drums_lib.py index 03fdbff..98576ff 100644 --- a/note_seq/drums_lib.py +++ b/note_seq/drums_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/drums_lib_test.py b/note_seq/drums_lib_test.py index 458c076..f89aa0e 100644 --- a/note_seq/drums_lib_test.py +++ b/note_seq/drums_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/encoder_decoder.py b/note_seq/encoder_decoder.py index d78f8a7..1c4ea29 100644 --- a/note_seq/encoder_decoder.py +++ b/note_seq/encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/encoder_decoder_test.py b/note_seq/encoder_decoder_test.py index 34ae635..4fa8d08 100644 --- a/note_seq/encoder_decoder_test.py +++ b/note_seq/encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/events_lib.py b/note_seq/events_lib.py index 70051ea..6f2be0b 100644 --- a/note_seq/events_lib.py +++ b/note_seq/events_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/events_lib_test.py b/note_seq/events_lib_test.py index ce20fd7..873a114 100644 --- a/note_seq/events_lib_test.py +++ b/note_seq/events_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/lead_sheets_lib.py b/note_seq/lead_sheets_lib.py index e37959f..d2c56ec 100644 --- a/note_seq/lead_sheets_lib.py +++ b/note_seq/lead_sheets_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/lead_sheets_lib_test.py b/note_seq/lead_sheets_lib_test.py index b2afc3c..11e357a 100644 --- a/note_seq/lead_sheets_lib_test.py +++ b/note_seq/lead_sheets_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melodies_lib.py b/note_seq/melodies_lib.py index 3a4cb7a..f8059bb 100644 --- a/note_seq/melodies_lib.py +++ b/note_seq/melodies_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melodies_lib_test.py b/note_seq/melodies_lib_test.py index 155f652..3d40900 100644 --- a/note_seq/melodies_lib_test.py +++ b/note_seq/melodies_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_encoder_decoder.py b/note_seq/melody_encoder_decoder.py index 67d845e..626dcb0 100644 --- a/note_seq/melody_encoder_decoder.py +++ b/note_seq/melody_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_encoder_decoder_test.py b/note_seq/melody_encoder_decoder_test.py index 495a6c7..5148301 100644 --- a/note_seq/melody_encoder_decoder_test.py +++ b/note_seq/melody_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_inference.py b/note_seq/melody_inference.py index 70d3652..8306a36 100644 --- a/note_seq/melody_inference.py +++ b/note_seq/melody_inference.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/melody_inference_test.py b/note_seq/melody_inference_test.py index abb2723..89d8d9c 100644 --- a/note_seq/melody_inference_test.py +++ b/note_seq/melody_inference_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/midi_io.py b/note_seq/midi_io.py index 269f02c..2de94c9 100644 --- a/note_seq/midi_io.py +++ b/note_seq/midi_io.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/midi_io_test.py b/note_seq/midi_io_test.py index c1b9374..6be31b4 100644 --- a/note_seq/midi_io_test.py +++ b/note_seq/midi_io_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/midi_synth.py b/note_seq/midi_synth.py index a3867a3..023e520 100644 --- a/note_seq/midi_synth.py +++ b/note_seq/midi_synth.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicnet_io.py b/note_seq/musicnet_io.py index ea28eac..8f41bfa 100644 --- a/note_seq/musicnet_io.py +++ b/note_seq/musicnet_io.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicnet_io_test.py b/note_seq/musicnet_io_test.py index 94ebd39..877d8c9 100644 --- a/note_seq/musicnet_io_test.py +++ b/note_seq/musicnet_io_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicxml_parser.py b/note_seq/musicxml_parser.py index f6d0ec7..e39a035 100644 --- a/note_seq/musicxml_parser.py +++ b/note_seq/musicxml_parser.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/musicxml_parser_test.py b/note_seq/musicxml_parser_test.py index 02f46bd..aa6dd80 100644 --- a/note_seq/musicxml_parser_test.py +++ b/note_seq/musicxml_parser_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -159,7 +159,7 @@ def check_musicxml_and_sequence(self, musicxml, sequence_proto): music_proto_keys = [11, 6, 1, 8, 3, 10, 5, 0, 7, 2, 9, 4, 11, 6, 1] key = music_proto_keys[musicxml_key.key + 7] self.assertEqual(key, sequence_key.key) - self.assertEqual(mode, sequence_key.mode) + self.assertEqual(mode, sequence_key.mode) # pylint: disable=possibly-used-before-assignment self.assertAlmostEqual(musicxml_key.time_position, sequence_key.time) # Test tempos. diff --git a/note_seq/musicxml_reader.py b/note_seq/musicxml_reader.py index 013ff56..a60e75f 100644 --- a/note_seq/musicxml_reader.py +++ b/note_seq/musicxml_reader.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/notebook_utils.py b/note_seq/notebook_utils.py index 52ab9e1..03792d2 100644 --- a/note_seq/notebook_utils.py +++ b/note_seq/notebook_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_controls.py b/note_seq/performance_controls.py index d73f2fe..e10ad65 100644 --- a/note_seq/performance_controls.py +++ b/note_seq/performance_controls.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_controls_test.py b/note_seq/performance_controls_test.py index 36d1037..f217bd6 100644 --- a/note_seq/performance_controls_test.py +++ b/note_seq/performance_controls_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_encoder_decoder.py b/note_seq/performance_encoder_decoder.py index b670a4f..bef65fa 100644 --- a/note_seq/performance_encoder_decoder.py +++ b/note_seq/performance_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_encoder_decoder_test.py b/note_seq/performance_encoder_decoder_test.py index f5347f3..10f7bb9 100644 --- a/note_seq/performance_encoder_decoder_test.py +++ b/note_seq/performance_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_lib.py b/note_seq/performance_lib.py index a4b1e53..563db64 100644 --- a/note_seq/performance_lib.py +++ b/note_seq/performance_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/performance_lib_test.py b/note_seq/performance_lib_test.py index 02bca14..0bdd7cb 100644 --- a/note_seq/performance_lib_test.py +++ b/note_seq/performance_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_encoder_decoder.py b/note_seq/pianoroll_encoder_decoder.py index db04019..19a6e70 100644 --- a/note_seq/pianoroll_encoder_decoder.py +++ b/note_seq/pianoroll_encoder_decoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_encoder_decoder_test.py b/note_seq/pianoroll_encoder_decoder_test.py index 3ef8487..b64342b 100644 --- a/note_seq/pianoroll_encoder_decoder_test.py +++ b/note_seq/pianoroll_encoder_decoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_lib.py b/note_seq/pianoroll_lib.py index 56be941..10588ef 100644 --- a/note_seq/pianoroll_lib.py +++ b/note_seq/pianoroll_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/pianoroll_lib_test.py b/note_seq/pianoroll_lib_test.py index 4940d89..734762a 100644 --- a/note_seq/pianoroll_lib_test.py +++ b/note_seq/pianoroll_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/__init__.py b/note_seq/protobuf/__init__.py index c97725d..049364f 100644 --- a/note_seq/protobuf/__init__.py +++ b/note_seq/protobuf/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/compare.py b/note_seq/protobuf/compare.py index 9da68d9..8558f83 100644 --- a/note_seq/protobuf/compare.py +++ b/note_seq/protobuf/compare.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/generate_pb2_py.sh b/note_seq/protobuf/generate_pb2_py.sh index 31a8042..b7d26c8 100755 --- a/note_seq/protobuf/generate_pb2_py.sh +++ b/note_seq/protobuf/generate_pb2_py.sh @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/generator_pb2.py b/note_seq/protobuf/generator_pb2.py index 19b7a9f..10f507c 100644 --- a/note_seq/protobuf/generator_pb2.py +++ b/note_seq/protobuf/generator_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/generator_pb2.pyi b/note_seq/protobuf/generator_pb2.pyi index 7709427..8e9218f 100644 --- a/note_seq/protobuf/generator_pb2.pyi +++ b/note_seq/protobuf/generator_pb2.pyi @@ -1,3 +1,4 @@ +# pylint: skip-file from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/note_seq/protobuf/install_protoc.sh b/note_seq/protobuf/install_protoc.sh index 8dddb32..a0ce0b7 100755 --- a/note_seq/protobuf/install_protoc.sh +++ b/note_seq/protobuf/install_protoc.sh @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/music_pb2.py b/note_seq/protobuf/music_pb2.py index 9ca3ce7..c6d9f01 100644 --- a/note_seq/protobuf/music_pb2.py +++ b/note_seq/protobuf/music_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/protobuf/music_pb2.pyi b/note_seq/protobuf/music_pb2.pyi index 15d6f6b..4634c24 100644 --- a/note_seq/protobuf/music_pb2.pyi +++ b/note_seq/protobuf/music_pb2.pyi @@ -1,3 +1,4 @@ +# pylint: skip-file from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor diff --git a/note_seq/sequences_lib.py b/note_seq/sequences_lib.py index 2cb1a13..da7a95b 100644 --- a/note_seq/sequences_lib.py +++ b/note_seq/sequences_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/sequences_lib_test.py b/note_seq/sequences_lib_test.py index 386a0c8..ebee1ac 100644 --- a/note_seq/sequences_lib_test.py +++ b/note_seq/sequences_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/testing_lib.py b/note_seq/testing_lib.py index 7b753d7..9e5bd62 100644 --- a/note_seq/testing_lib.py +++ b/note_seq/testing_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/note_seq/version.py b/note_seq/version.py index ba107e2..d5d5b36 100644 --- a/note_seq/version.py +++ b/note_seq/version.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pylintrc b/pylintrc index 3473d86..e2ff422 100644 --- a/pylintrc +++ b/pylintrc @@ -68,6 +68,8 @@ disable=abstract-method, consider-using-f-string, # added consider-using-generator, # added consider-using-in, # added + consider-using-max-builtin, # added + consider-using-min-builtin, # added consider-using-with, # added cmp-builtin, cmp-method, @@ -439,6 +441,6 @@ valid-metaclass-classmethod-first-arg=mcs # Exceptions that will emit a warning when being caught. Defaults to # "Exception" -overgeneral-exceptions=StandardError, - Exception, - BaseException +overgeneral-exceptions=builtins.StandardError, + builtins.Exception, + builtins.BaseException diff --git a/setup.py b/setup.py index 0288cec..73f206f 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/update_pip.sh b/update_pip.sh index c4da20f..34b90a3 100644 --- a/update_pip.sh +++ b/update_pip.sh @@ -1,4 +1,4 @@ -# Copyright 2023 The Magenta Authors. +# Copyright 2024 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.