Skip to content

Commit 25b127f

Browse files
authored
fix polling mode pyright type error (#78)
1 parent c05d9bc commit 25b127f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

configcatclient/configcatoptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ConfigCatOptions(object):
7575

7676
def __init__(self,
7777
base_url=None,
78-
polling_mode=PollingMode.auto_poll(),
78+
polling_mode: PollingMode = PollingMode.auto_poll(),
7979
config_cache=None,
8080
proxies=None,
8181
proxy_auth=None,

configcatclient/configfetcher.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919

2020

2121
class RedirectMode(IntEnum):
22-
NoRedirect = 0,
23-
ShouldRedirect = 1,
22+
NoRedirect = 0
23+
ShouldRedirect = 1
2424
ForceRedirect = 2
2525

2626

2727
class Status(IntEnum):
28-
Fetched = 0,
29-
NotModified = 1,
28+
Fetched = 0
29+
NotModified = 1
3030
Failure = 2
3131

3232

configcatclient/overridedatasource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
class OverrideBehaviour(IntEnum):
66
# When evaluating values, the SDK will not use feature flags & settings from the ConfigCat CDN, but it will use
77
# all feature flags & settings that are loaded from local-override sources.
8-
LocalOnly = 0,
8+
LocalOnly = 0
99

1010
# When evaluating values, the SDK will use all feature flags & settings that are downloaded from the ConfigCat CDN,
1111
# plus all feature flags & settings that are loaded from local-override sources. If a feature flag or a setting is
1212
# defined both in the fetched and the local-override source then the local-override version will take precedence.
13-
LocalOverRemote = 1,
13+
LocalOverRemote = 1
1414

1515
# When evaluating values, the SDK will use all feature flags & settings that are downloaded from the ConfigCat CDN,
1616
# plus all feature flags & settings that are loaded from local-override sources. If a feature flag or a setting is

configcatclient/pollingmode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PollingMode(object):
88
__metaclass__ = ABCMeta
99

1010
@abstractmethod
11-
def identifier(self):
11+
def identifier(self) -> str:
1212
"""
1313
:return: the identifier of polling mode. Used for analytical purposes in HTTP User-Agent headers.
1414
"""

0 commit comments

Comments
 (0)