chore(pre-commit): Add pyupgrade and pycln hooks (#24197)

This commit is contained in:
John Bodley
2023-06-01 12:01:10 -07:00
committed by GitHub
parent 7d7ce63970
commit a4d5d7c6b9
448 changed files with 3084 additions and 3305 deletions

View File

@@ -112,7 +112,7 @@ class TestSqlLabApi(SupersetTestCase):
@mock.patch("superset.sqllab.commands.results.results_backend_use_msgpack", False)
def test_execute_required_params(self):
self.login()
client_id = "{}".format(random.getrandbits(64))[:10]
client_id = f"{random.getrandbits(64)}"[:10]
data = {"client_id": client_id}
rv = self.client.post(
@@ -157,7 +157,7 @@ class TestSqlLabApi(SupersetTestCase):
core.results_backend.get.return_value = {}
self.login()
client_id = "{}".format(random.getrandbits(64))[:10]
client_id = f"{random.getrandbits(64)}"[:10]
data = {"sql": "SELECT 1", "database_id": 1, "client_id": client_id}
rv = self.client.post(

View File

@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from unittest import mock, skip
from unittest import mock
from unittest.mock import Mock, patch
import pandas as pd