From efb0ccf3c77b70250b3e4191a62b71171027629b Mon Sep 17 00:00:00 2001 From: Neil Kakkar Date: Tue, 30 Jan 2024 16:06:10 +0000 Subject: [PATCH] chore(flags): Update type hints for newer mypy versions (#114) * chore(flags): Update type hints for newer mypy versions * black --- CHANGELOG.md | 4 ++++ posthog/__init__.py | 17 +++++++++++------ posthog/version.py | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cf1016..7fd91fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.3.4 - 2024-01-30 + +1. Update type hints for module variables to work with newer versions of mypy + ## 3.3.3 - 2024-01-26 1. Remove new relative date operators, combine into regular date operators diff --git a/posthog/__init__.py b/posthog/__init__.py index ac3011c..55d9065 100644 --- a/posthog/__init__.py +++ b/posthog/__init__.py @@ -7,19 +7,19 @@ __version__ = VERSION """Settings.""" -api_key = None # type: str -host = None # type: str -on_error = None # type: Callable +api_key = None # type: Optional[str] +host = None # type: Optional[str] +on_error = None # type: Optional[Callable] debug = False # type: bool send = True # type: bool sync_mode = False # type: bool disabled = False # type: bool -personal_api_key = None # type: str -project_api_key = None # type: str +personal_api_key = None # type: Optional[str] +project_api_key = None # type: Optional[str] poll_interval = 30 # type: int disable_geoip = True # type: bool -default_client = None +default_client = None # type: Optional[Client] def capture( @@ -405,6 +405,11 @@ def feature_flag_definitions(): return _proxy("feature_flag_definitions") +def load_feature_flags(): + """Load feature flag definitions from PostHog.""" + return _proxy("load_feature_flags") + + def page(*args, **kwargs): """Send a page call.""" _proxy("page", *args, **kwargs) diff --git a/posthog/version.py b/posthog/version.py index df35467..76cc32f 100644 --- a/posthog/version.py +++ b/posthog/version.py @@ -1,4 +1,4 @@ -VERSION = "3.3.3" +VERSION = "3.3.4" if __name__ == "__main__": print(VERSION, end="") # noqa: T201