Skip to content

Commit 2ebb695

Browse files
authored
add ruff Pyupgrade rules (#1520)
* add Pyupgrade rules * ruff format --------- Co-authored-by: Wil T <wil.t.me@pm.me>
1 parent 77b1c5e commit 2ebb695

File tree

93 files changed

+260
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+260
-280
lines changed

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# Configuration file for the Sphinx documentation builder.
43
#

parsons/actblue/actblue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
ACTBLUE_API_ENDPOINT = "https://secure.actblue.com/api/v1"
1212

1313

14-
class ActBlue(object):
14+
class ActBlue:
1515
"""
1616
Instantiate class.
1717

parsons/action_builder/action_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
API_URL = "https://{subdomain}.actionbuilder.org/api/rest/v1"
1111

1212

13-
class ActionBuilder(object):
13+
class ActionBuilder:
1414
"""
1515
`Args:`
1616
api_token: str

parsons/action_kit/action_kit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
logger = logging.getLogger(__name__)
1313

1414

15-
class ActionKit(object):
15+
class ActionKit:
1616
"""
1717
Instantiate the ActionKit class
1818

parsons/action_network/action_network.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
import re
44
import warnings
5-
from typing import Dict, List, Literal, Union
5+
from typing import Literal, Union
66

77
from parsons import Table
88
from parsons.utilities import check_env
@@ -13,7 +13,7 @@
1313
API_URL = "https://actionnetwork.org/api/v2"
1414

1515

16-
class ActionNetwork(object):
16+
class ActionNetwork:
1717
"""
1818
`Args:`
1919
api_token: str
@@ -1154,7 +1154,7 @@ def get_person(self, person_id):
11541154

11551155
def upsert_person(
11561156
self,
1157-
email_address: Union[str, List[str], List[Dict[str, str]]] = None,
1157+
email_address: Union[str, list[str], list[dict[str, str]]] = None,
11581158
given_name=None,
11591159
family_name=None,
11601160
tags=None,

parsons/airmeet/airmeet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
AIRMEET_DEFAULT_URI = "https://api-gateway.airmeet.com/prod/"
66

77

8-
class Airmeet(object):
8+
class Airmeet:
99
"""
1010
Instantiate class.
1111

parsons/airtable/airtable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
logger = logging.getLogger(__name__)
99

1010

11-
class Airtable(object):
11+
class Airtable:
1212
"""
1313
`Args:`
1414
base_key: str

parsons/alchemer/alchemer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def sg_compatibility():
2323
os.environ["ALCHEMER_API_VERSION"] = os.getenv("SURVEYGIZMO_API_VERSION")
2424

2525

26-
class Alchemer(object):
26+
class Alchemer:
2727
"""
2828
Instantiate Alchemer Class
2929

parsons/auth0/auth0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
logger = logging.getLogger(__name__)
1212

1313

14-
class Auth0(object):
14+
class Auth0:
1515
"""
1616
Instantiate the Auth0 class
1717

parsons/aws/lambda_distribute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_range(self, bucket, key, rangestart, rangeend):
5454
# so e.g. while python returns 2 bytes for data[2:4]
5555
# Range: bytes=2-4 will return 3!! So we subtract 1
5656
response = self.s3.client.get_object(
57-
Bucket=bucket, Key=key, Range="bytes={}-{}".format(rangestart, rangeend - 1)
57+
Bucket=bucket, Key=key, Range=f"bytes={rangestart}-{rangeend - 1}"
5858
)
5959
return response["Body"].read()
6060

0 commit comments

Comments
 (0)