Skip to content

Commit

Permalink
Fix errors with extra commas
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonCoderAS committed May 29, 2020
1 parent 8e8cdd7 commit b9b263a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions praw/models/reddit/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def add_post(self, submission: "Submission"):

self._reddit.post(
API_PATH["collection_add_post"],
data={"collection_id": self.collection_id, "link_fullname": link_fullname,},
data={"collection_id": self.collection_id, "link_fullname": link_fullname},
)

def delete(self):
Expand Down Expand Up @@ -318,7 +318,7 @@ def remove_post(self, submission: "Submission"):

self._reddit.post(
API_PATH["collection_remove_post"],
data={"collection_id": self.collection_id, "link_fullname": link_fullname,},
data={"collection_id": self.collection_id, "link_fullname": link_fullname},
)

def reorder(self, links: List[Union[str, Submission]]):
Expand Down Expand Up @@ -360,7 +360,7 @@ def update_description(self, description: str):
"""
self._reddit.post(
API_PATH["collection_desc"],
data={"collection_id": self.collection_id, "description": description,},
data={"collection_id": self.collection_id, "description": description},
)

def update_title(self, title: str):
Expand Down
2 changes: 1 addition & 1 deletion praw/models/subreddits.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def search_by_name(
"""
result = self._reddit.post(
API_PATH["subreddits_name_search"],
data={"include_over_18": include_nsfw, "exact": exact, "query": query,},
data={"include_over_18": include_nsfw, "exact": exact, "query": query},
)
return [self._reddit.subreddit(x) for x in result["names"]]

Expand Down
2 changes: 1 addition & 1 deletion praw/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def request(self, *args, **kwargs):
"constructor, or as an environment variable."
)
for attribute in ("client_id", "user_agent"):
if getattr(self.config, attribute) in (self.config.CONFIG_NOT_SET, None,):
if getattr(self.config, attribute) in (self.config.CONFIG_NOT_SET, None):
raise MissingRequiredAttributeException(
required_message.format(attribute)
)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
extras = {
"ci": ["coveralls"],
"dev": ["pre-commit"],
"lint": ["black", "flake8", "pydocstyle", "sphinx<3.0", "sphinx_rtd_theme",],
"lint": ["black", "flake8", "pydocstyle", "sphinx<3.0", "sphinx_rtd_theme"],
"test": [
"betamax >=0.8, <0.9",
"betamax-matchers >=0.3.0, <0.5",
Expand Down Expand Up @@ -59,7 +59,7 @@
keywords="reddit api wrapper",
license="Simplified BSD License",
long_description=README,
package_data={"": ["LICENSE.txt"], PACKAGE_NAME: ["*.ini", "images/*.jpg"],},
package_data={"": ["LICENSE.txt"], PACKAGE_NAME: ["*.ini", "images/*.jpg"]},
packages=find_packages(exclude=["tests", "tests.*", "tools", "tools.*"]),
url="https://praw.readthedocs.org/",
version=VERSION,
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class PrettyJSONSerializer(JSONSerializer):

def serialize(self, cassette_data):
return (
json.dumps(cassette_data, sort_keys=True, indent=2, separators=(",", ": "),)
json.dumps(cassette_data, sort_keys=True, indent=2, separators=(",", ": "))
+ "\n"
)

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/models/reddit/test_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class TestPollData(IntegrationTest):
def test_get_attrs(self,):
def test_get_attrs(self):
poll_id = "fo7p5b"
with self.recorder.use_cassette("TestPollData.test_get_attrs"):
submission = self.reddit.submission(poll_id)
Expand All @@ -22,7 +22,7 @@ def test_get_attrs(self,):
with pytest.raises(KeyError):
poll_data.option("badID")

def test_get_user_selection(self,):
def test_get_user_selection(self):
poll_id = "g9zfex"
self.reddit.read_only = False
with self.recorder.use_cassette("TestPollData.test_get_user_selection"):
Expand Down

0 comments on commit b9b263a

Please sign in to comment.