Skip to content

Commit e10cd32

Browse files
committed
No need to inherit from "object"
Remove a Python 2 compatibility construct.
1 parent 9379f4e commit e10cd32

7 files changed

Lines changed: 7 additions & 6 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Internal
55
--------
66

77
* Add limited typechecking to CI.
8+
* Remove some Python 2 compatibility code.
89

910

1011
1.35.0 (2025/07/18)

mycli/completion_refresher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from mycli.sqlexecute import ServerSpecies, SQLExecute
99

1010

11-
class CompletionRefresher(object):
11+
class CompletionRefresher:
1212
refreshers = OrderedDict()
1313

1414
def __init__(self):

mycli/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class PasswordFileError(Exception):
7575
"""Base exception for errors related to reading password files."""
7676

7777

78-
class MyCli(object):
78+
class MyCli:
7979
default_prompt = "\\t \\u@\\h:\\d> "
8080
default_prompt_splitln = "\\u@\\h\\n(\\t):\\d>"
8181
max_len_prompt = 45

mycli/packages/special/delimitercommand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sqlparse # type: ignore[import-untyped]
66

77

8-
class DelimiterCommand(object):
8+
class DelimiterCommand:
99
def __init__(self):
1010
self._delimiter = ";"
1111

mycli/packages/special/favoritequeries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# type: ignore
22

33

4-
class FavoriteQueries(object):
4+
class FavoriteQueries:
55
section_name = "favorite_queries"
66

77
usage = """

mycli/sqlexecute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __str__(self):
8080
return self.version_str
8181

8282

83-
class SQLExecute(object):
83+
class SQLExecute:
8484
databases_query = """SHOW DATABASES"""
8585

8686
tables_query = """SHOW TABLES"""

test/test_tabular_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_sql_output(mycli):
2323
"""Test the sql output adapter."""
2424
headers = ["letters", "number", "optional", "float", "binary"]
2525

26-
class FakeCursor(object):
26+
class FakeCursor:
2727
def __init__(self):
2828
self.data = [("abc", 1, None, 10.0, b"\xaa"), ("d", 456, "1", 0.5, b"\xaa\xbb")]
2929
self.description = [

0 commit comments

Comments
 (0)