Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Users and Spaces V3 implementation#136

Open
seba-aln wants to merge 1 commit intomasterpubnub/python:masterfrom
fix/change-user-endpointpubnub/python:fix/change-user-endpointCopy head branch name to clipboard
Open

Users and Spaces V3 implementation#136
seba-aln wants to merge 1 commit intomasterpubnub/python:masterfrom
fix/change-user-endpointpubnub/python:fix/change-user-endpointCopy head branch name to clipboard

Conversation

@seba-aln
Copy link

No description provided.

if self.http_method() == HttpMethod.POST:
headers["Content-type"] = "application/json"

if self._custom_headers:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://peps.python.org/pep-0008/#programming-recommendations
Initially self._custom_headers is equal None. In this case you should check if your variable is None or not. I assume that custom_headers variable is a dict. So you can change initial value from None to empty dict ;)

else:
raise ValueError()

if len(inclusions) > 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if inclusions


params["sort"] = ",".join(joined_sort_params_array)

if self._page:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_page could be None? If yes you should check it here ;)

from pubnub.models.consumer.entities.space import PNCreateSpaceResult, PNFetchSpaceResult, PNFetchSpacesResult, \
PNUpdateSpaceResult, PNUpsertSpaceResult

from pubnub.pubnub import PubNub
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decide which import way you want to use in this file and then stick to it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.