Skip to content

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